public static class TypeCodec.TimeCodec extends TypeCodec.LongCodec
DataType.time()
to a Java Long
.TypeCodec.AbstractUUIDCodec, TypeCodec.AsciiCodec, TypeCodec.BigintCodec, TypeCodec.BlobCodec, TypeCodec.BooleanCodec, TypeCodec.CollectionCodec<E,C extends Collection<E>>, TypeCodec.CounterCodec, TypeCodec.CustomCodec, TypeCodec.DateCodec, TypeCodec.DecimalCodec, TypeCodec.DoubleCodec, TypeCodec.EnumIntCodec<E extends Enum<E>>, TypeCodec.EnumStringCodec<E extends Enum<E>>, TypeCodec.FloatCodec, TypeCodec.InetCodec, TypeCodec.IntCodec, TypeCodec.ListCodec<T>, TypeCodec.LongCodec, TypeCodec.MapCodec<K,V>, TypeCodec.MappingCodec<T,U>, TypeCodec.PrimitiveBooleanCodec, TypeCodec.PrimitiveByteCodec, TypeCodec.PrimitiveDoubleCodec, TypeCodec.PrimitiveFloatCodec, TypeCodec.PrimitiveIntCodec, TypeCodec.PrimitiveLongCodec, TypeCodec.PrimitiveShortCodec, TypeCodec.SetCodec<T>, TypeCodec.SmallIntCodec, TypeCodec.StringCodec, TypeCodec.StringParsingCodec<T>, TypeCodec.TimeCodec, TypeCodec.TimestampCodec, TypeCodec.TimeUUIDCodec, TypeCodec.TinyIntCodec, TypeCodec.TupleCodec, TypeCodec.UDTCodec, TypeCodec.UUIDCodec, TypeCodec.VarcharCodec, TypeCodec.VarintCodec
Modifier and Type | Field and Description |
---|---|
static TypeCodec.TimeCodec |
instance |
Modifier and Type | Method and Description |
---|---|
String |
format(Long value)
Format the given value as a valid CQL literal according
to the CQL type handled by this codec.
|
Long |
parse(String value)
Parse the given CQL literal into an instance of the Java type
handled by this codec.
|
deserialize, deserializeNoBoxing, serialize, serializeNoBoxing
accepts, accepts, accepts, equals, getCqlType, getJavaType, hashCode, toString
public static final TypeCodec.TimeCodec instance
public Long parse(String value)
TypeCodec
"NULL"
;
in most cases, implementations should interpret these inputs has equivalent to a null
reference.parse
in class TypeCodec.LongCodec
value
- The CQL string to parse, may be null
or empty.null
on a null input
.public String format(Long value)
TypeCodec
"NULL"
for null
inputs.format
in class TypeCodec.LongCodec
value
- An instance of T; may be null
.Copyright © 2012–2015. All rights reserved.