DataType is the base class for all HBase data types. Data
type implementations are designed to be serialized to and deserialized from
byte[]. Serialized representations can retain the natural sort ordering of
the source object, when a suitable encoding is supported by the underlying
implementation. This is a desirable feature for use in rowkeys and column
qualifiers.

DataTypes are different from Hadoop
ImmutableBytesWritables in two
significant ways. First, DataType describes how to serialize a
value, it does not encapsulate a serialized value. Second, DataType
implementations provide hints to consumers about relationships between the
POJOs they represent and richness of the encoded representation.

Data type instances are designed to be stateless, thread-safe, and reused.
Implementations should provide static final instances corresponding
to each variation on configurable parameters. This is to encourage and
simplify instance reuse. For instance, order-preserving types should provide
static ASCENDING and DESCENDING instances. It is also encouraged for
implementations operating on Java primitive types to provide primitive
implementations of the encode and decode methods. This
advice is a performance consideration to clients reading and writing values
in tight loops.

getOrder

Retrieve the sort Order imposed by this data type, or null when
natural ordering is not preserved. Value is either ascending or
descending. Default is assumed to be Order.ASCENDING.

isNullable

boolean isNullable()

Indicates whether this instance supports encoding null values. This
depends on the implementation details of the encoding format. All
DataTypes that support null should treat null as comparing
less than any non-null value for default sort ordering purposes.

Returns:

true when null is supported, false otherwise.

isSkippable

boolean isSkippable()

Indicates whether this instance is able to skip over it's encoded value.
DataTypes that are not skippable can only be used as the
right-most field of a Struct.