Package db

Class Field

  • All Implemented Interfaces:
    java.lang.Comparable<Field>
    Direct Known Subclasses:
    BinaryField, BooleanField, ByteField, IntField, LongField, ShortField, StringField

    public abstract class Field
    extends java.lang.Object
    implements java.lang.Comparable<Field>
    Field is an abstract data wrapper for use with Records. Note that when comparing two Field instances both must be of the same class.

    Stored Schema Field Type Encoding:

    8-bit Legacy Field Type Encoding (I....FFF)

    Supported encodings: 0x00..0x06 and 0x80..0x86, where:
         FFF  - indexed field type (0..6)
         I    - index field indicator (only long primary keys were supported)
     

    8-bit Field Type Encoding (PPPPFFFF)

    (Reserved for future field extensions: 0x88 and 0xf0..0xff)
         0xff - see Schema.FIELD_EXTENSION_INDICATOR
     
    where:
         FFFF - normal/indexed field type
         PPPP - indexed table primary key type (1000b: LegacyIndexField)  
     
    • Field Detail

      • EMPTY_ARRAY NEW

        public static final Field[] EMPTY_ARRAY

Method Detail

  • isSameType NEW

    public boolean isSameType​(Field field)
    Determine if specified field is same type as this field
    Parameters:
    field - a Field instance
    Returns:
    true if field is same type as this field
  • copyField NEW

    public abstract Field copyField()
    Create new instance of this field with the same value.
    Returns:
    new field instance with same value
  • canIndex NEW

    public static boolean canIndex​(Field field)
    Determine if a specified field instance may be indexed
    Parameters:
    field - field to be checked
    Returns:
    true if field can be indexed