Class SQLTinyint

All Implemented Interfaces:
Externalizable, Serializable, Comparable, Formatable, Storable, TypedFormat, DataValueDescriptor, NumberDataValue, Orderable

public final class SQLTinyint extends NumberDataType
SQLTinyint satisfies the DataValueDescriptor interfaces (i.e., OrderableDataType). It implements a tinyint column, e.g. for storing a column value; it can be specified when constructed to not allow nulls. Nullability cannot be changed after construction, as it affects the storage size and mechanism.

Because OrderableDataType is a subtype of ValueColumn, SQLTinyint can play a role in either a ValueColumn/Row or a OrderableDataType/Row, interchangeably.

We assume the store has a flag for nullness of the value, and simply return a 0-length array for the stored form when the value is null.

See Also:
  • Field Details

    • TINYINT_LENGTH

      static final int TINYINT_LENGTH
      See Also:
    • value

      private byte value
    • isnull

      private boolean isnull
    • BASE_MEMORY_USAGE

      private static final int BASE_MEMORY_USAGE
  • Constructor Details

    • SQLTinyint

      public SQLTinyint()
      No-arg constructor, required by Formattable. This constructor also gets used when we are allocating space for a byte.
    • SQLTinyint

      public SQLTinyint(byte val)
    • SQLTinyint

      private SQLTinyint(byte val, boolean isnull)
    • SQLTinyint

      public SQLTinyint(Byte obj)
  • Method Details