Class ColumnImpl.SortOrder

  • Enclosing class:
    ColumnImpl

    public static final class ColumnImpl.SortOrder
    extends Object
    Information about the sort order (collation) for a textual column.

    The three parts together are the ms access sort id, a 4 byte value built as (version << 24) | (variant << 16) | value: the LCID in the low half, the variant within a collation in byte 2, and which of the two weight tables the collation uses in byte 3. A locale with more than one collation separates them with the variant, so German 1031 is plain German at variant 0 and German Phone Book at variant 1, which order differently.

    Usage:
    Intermediate: This class requires moderate API knowledge.
    • Constructor Detail

      • SortOrder

        public SortOrder​(short value,
                         short version)
      • SortOrder

        public SortOrder​(short value,
                         short variant,
                         short version)
    • Method Detail

      • getValue

        public short getValue()
      • getVariant

        public short getVariant()
        Returns:
        which collation of the locale this is, 0 for the plain one
      • getVersion

        public short getVersion()
      • getSortId

        public int getSortId()
        Returns:
        the ms access sort id, which names the collation on its own. A jet 3 sort order has no version byte and reports -1, so it has no sort id
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object