Modifier and Type | Field and Description |
---|---|
static TypeCodec<DateRange> |
DseTypeCodecs.DATE_RANGE |
static TypeCodec<LineString> |
DseTypeCodecs.LINE_STRING |
static TypeCodec<Point> |
DseTypeCodecs.POINT |
static TypeCodec<Polygon> |
DseTypeCodecs.POLYGON |
Modifier and Type | Method and Description |
---|---|
default <ValueT> ValueT |
GettableById.get(CqlIdentifier id,
TypeCodec<ValueT> codec)
Returns the value for the first occurrence of
id , using the given codec for the
conversion. |
default <ValueT> ValueT |
GettableByIndex.get(int i,
TypeCodec<ValueT> codec)
Returns the
i th value, using the given codec for the conversion. |
default <ValueT> ValueT |
GettableByName.get(String name,
TypeCodec<ValueT> codec)
Returns the value for the first occurrence of
name , using the given codec for the
conversion. |
default <ValueT> SelfT |
SettableById.set(CqlIdentifier id,
ValueT v,
TypeCodec<ValueT> codec)
Sets the value for all occurrences of
id , using the given codec for the conversion. |
default <ValueT> SelfT |
SettableByIndex.set(int i,
ValueT v,
TypeCodec<ValueT> codec)
Sets the
i th value, using the given codec for the conversion. |
default <ValueT> SelfT |
SettableByName.set(String name,
ValueT v,
TypeCodec<ValueT> codec)
Sets the value for all occurrences of
name , using the given codec for the conversion. |
Modifier and Type | Method and Description |
---|---|
List<TypeCodec<?>> |
ProgrammaticArguments.getTypeCodecs() |
Modifier and Type | Method and Description |
---|---|
ProgrammaticArguments.Builder |
ProgrammaticArguments.Builder.addTypeCodecs(TypeCodec<?>... typeCodecs) |
SelfT |
SessionBuilder.addTypeCodecs(TypeCodec<?>... typeCodecs)
Registers additional codecs for custom type mappings.
|
Modifier and Type | Method and Description |
---|---|
protected DriverContext |
SessionBuilder.buildContext(DriverConfigLoader configLoader,
List<TypeCodec<?>> typeCodecs,
NodeStateListener nodeStateListener,
SchemaChangeListener schemaChangeListener,
RequestTracker requestTracker,
Map<String,String> localDatacenters,
Map<String,Predicate<Node>> nodeFilters,
ClassLoader classLoader)
Deprecated.
this method only exists for backward compatibility (if a subclass written for
driver 4.1.0 returns a non-null result, that value will be used). Please override
SessionBuilder.buildContext(DriverConfigLoader, ProgrammaticArguments) instead. |
Modifier and Type | Interface and Description |
---|---|
interface |
PrimitiveBooleanCodec
A specialized boolean codec that knows how to deal with primitive types.
|
interface |
PrimitiveByteCodec
A specialized byte codec that knows how to deal with primitive types.
|
interface |
PrimitiveDoubleCodec
A specialized double codec that knows how to deal with primitive types.
|
interface |
PrimitiveFloatCodec
A specialized float codec that knows how to deal with primitive types.
|
interface |
PrimitiveIntCodec
A specialized integer codec that knows how to deal with primitive types.
|
interface |
PrimitiveLongCodec
A specialized long codec that knows how to deal with primitive types.
|
interface |
PrimitiveShortCodec
A specialized short codec that knows how to deal with primitive types.
|
Modifier and Type | Class and Description |
---|---|
class |
MappingCodec<InnerT,OuterT>
A
TypeCodec that maps instances of InnerT , a driver supported Java type, to
instances of a target OuterT Java type. |
Modifier and Type | Field and Description |
---|---|
static TypeCodec<String> |
TypeCodecs.ASCII
The default codec that maps CQL type
ascii to Java's String . |
static TypeCodec<ByteBuffer> |
TypeCodecs.BLOB
The default codec that maps CQL type
blob to Java's ByteBuffer . |
static TypeCodec<byte[]> |
ExtraTypeCodecs.BLOB_TO_ARRAY
A codec that maps CQL type
blob to Java's byte[] . |
static TypeCodec<boolean[]> |
ExtraTypeCodecs.BOOLEAN_LIST_TO_ARRAY
A codec that maps CQL type
list<boolean> to Java's boolean[] . |
static TypeCodec<byte[]> |
ExtraTypeCodecs.BYTE_LIST_TO_ARRAY
A codec that maps CQL type
list<tinyint> to Java's byte[] . |
static TypeCodec<LocalDate> |
TypeCodecs.DATE
The default codec that maps CQL type
date to Java's LocalDate . |
static TypeCodec<BigDecimal> |
TypeCodecs.DECIMAL
The default codec that maps CQL type
decimal to Java's BigDecimal . |
static TypeCodec<double[]> |
ExtraTypeCodecs.DOUBLE_LIST_TO_ARRAY
A codec that maps CQL type
list<double> to Java's double[] . |
static TypeCodec<CqlDuration> |
TypeCodecs.DURATION
The default codec that maps CQL type
duration to the driver's CqlDuration . |
static TypeCodec<float[]> |
ExtraTypeCodecs.FLOAT_LIST_TO_ARRAY
A codec that maps CQL type
list<float> to Java's float[] . |
static TypeCodec<InetAddress> |
TypeCodecs.INET
The default codec that maps CQL type
inet to Java's InetAddress . |
protected TypeCodec<InnerT> |
MappingCodec.innerCodec |
static TypeCodec<int[]> |
ExtraTypeCodecs.INT_LIST_TO_ARRAY
A codec that maps CQL type
list<int> to Java's int[] . |
static TypeCodec<LocalDateTime> |
ExtraTypeCodecs.LOCAL_TIMESTAMP_SYSTEM
A codec that maps CQL type
timestamp to Java's LocalDateTime , using the
system's default time zone. |
static TypeCodec<LocalDateTime> |
ExtraTypeCodecs.LOCAL_TIMESTAMP_UTC
A codec that maps CQL type
timestamp to Java's LocalDateTime , using the UTC
time zone. |
static TypeCodec<long[]> |
ExtraTypeCodecs.LONG_LIST_TO_ARRAY
A codec that maps CQL type
list<bigint> to Java's long[] . |
static TypeCodec<short[]> |
ExtraTypeCodecs.SHORT_LIST_TO_ARRAY
A codec that maps CQL type
list<smallint> to Java's short[] . |
static TypeCodec<String> |
TypeCodecs.TEXT
The default codec that maps CQL type
text to Java's String . |
static TypeCodec<LocalTime> |
TypeCodecs.TIME
The default codec that maps CQL type
time to Java's LocalTime . |
static TypeCodec<Instant> |
TypeCodecs.TIMESTAMP
The default codec that maps CQL type
timestamp to Java's Instant , using the
system's default time zone to parse and format CQL literals. |
static TypeCodec<Instant> |
ExtraTypeCodecs.TIMESTAMP_UTC
A codec that maps CQL type
timestamp to Java's Instant , using the UTC time zone
to parse and format CQL literals. |
static TypeCodec<UUID> |
TypeCodecs.TIMEUUID
The default codec that maps CQL type
timeuuid to Java's UUID . |
static TypeCodec<UUID> |
TypeCodecs.UUID
The default codec that maps CQL type
uuid to Java's UUID . |
static TypeCodec<BigInteger> |
TypeCodecs.VARINT
The default codec that maps CQL type
varint to Java's BigInteger . |
static TypeCodec<ZonedDateTime> |
ExtraTypeCodecs.ZONED_TIMESTAMP_PERSISTED
A codec that maps CQL type
tuple<timestamp,text> to Java's ZonedDateTime ,
providing a pattern for maintaining timezone information in Cassandra. |
static TypeCodec<ZonedDateTime> |
TypeCodecs.ZONED_TIMESTAMP_SYSTEM
An alias for
ExtraTypeCodecs.ZONED_TIMESTAMP_SYSTEM . |
static TypeCodec<ZonedDateTime> |
ExtraTypeCodecs.ZONED_TIMESTAMP_SYSTEM
A codec that maps CQL type
timestamp to Java's ZonedDateTime , using the
system's default time zone. |
static TypeCodec<ZonedDateTime> |
TypeCodecs.ZONED_TIMESTAMP_UTC
An alias for
ExtraTypeCodecs.ZONED_TIMESTAMP_UTC . |
static TypeCodec<ZonedDateTime> |
ExtraTypeCodecs.ZONED_TIMESTAMP_UTC
A codec that maps CQL type
timestamp to Java's ZonedDateTime , using the UTC
time zone. |
Modifier and Type | Method and Description |
---|---|
static TypeCodec<ByteBuffer> |
TypeCodecs.custom(DataType cqlType)
Builds a new codec that maps a CQL custom type to Java's
ByteBuffer . |
static <EnumT extends Enum<EnumT>> |
ExtraTypeCodecs.enumNamesOf(Class<EnumT> enumClass)
Builds a new codec that maps CQL type
text to a Java Enum, according to its constants'
programmatic names. |
static <EnumT extends Enum<EnumT>> |
ExtraTypeCodecs.enumOrdinalsOf(Class<EnumT> enumClass)
Builds a new codec that maps CQL type
int to a Java Enum, according to its constants'
ordinals (STRONGLY discouraged, see explanations below). |
static <T> TypeCodec<T> |
ExtraTypeCodecs.json(Class<T> javaType)
Builds a new codec that maps CQL type
text to the given Java type, using JSON
serialization with a default Jackson mapper. |
static <T> TypeCodec<T> |
ExtraTypeCodecs.json(Class<T> javaType,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Builds a new codec that maps CQL type
text to the given Java type, using JSON
serialization with the provided Jackson mapper. |
static <T> TypeCodec<T> |
ExtraTypeCodecs.json(GenericType<T> javaType)
Builds a new codec that maps CQL type
text to the given Java type, using JSON
serialization with a default Jackson mapper. |
static <T> TypeCodec<T> |
ExtraTypeCodecs.json(GenericType<T> javaType,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Builds a new codec that maps CQL type
text to the given Java type, using JSON
serialization with the provided Jackson mapper. |
static <T> TypeCodec<List<T>> |
TypeCodecs.listOf(TypeCodec<T> elementCodec)
Builds a new codec that maps a CQL list to a Java list, using the given codec to map each
element.
|
static <T> TypeCodec<T[]> |
ExtraTypeCodecs.listToArrayOf(TypeCodec<T> elementCodec)
Builds a new codec that maps a CQL list to a Java array.
|
static TypeCodec<LocalDateTime> |
ExtraTypeCodecs.localTimestampAt(ZoneId timeZone)
Builds a new codec that maps CQL type
timestamp to Java's LocalDateTime . |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodecs.mapOf(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Builds a new codec that maps a CQL map to a Java map, using the given codecs to map each key
and value.
|
static <T> TypeCodec<Optional<T>> |
ExtraTypeCodecs.optionalOf(TypeCodec<T> innerCodec)
Builds a new codec that wraps another codec's Java type into
Optional instances
(mapping CQL null to Optional.empty() ). |
static <T> TypeCodec<Set<T>> |
TypeCodecs.setOf(TypeCodec<T> elementCodec)
Builds a new codec that maps a CQL set to a Java set, using the given codec to map each
element.
|
static TypeCodec<Instant> |
ExtraTypeCodecs.timestampAt(ZoneId timeZone)
Builds a new codec that maps CQL type
timestamp to Java's Instant , using the
given time zone to parse and format CQL literals. |
static TypeCodec<TupleValue> |
TypeCodecs.tupleOf(TupleType cqlType)
Builds a new codec that maps a CQL tuple to the driver's
TupleValue , for the given type
definition. |
static TypeCodec<UdtValue> |
TypeCodecs.udtOf(UserDefinedType cqlType)
Builds a new codec that maps a CQL user defined type to the driver's
UdtValue , for the
given type definition. |
static TypeCodec<ZonedDateTime> |
TypeCodecs.zonedTimestampAt(ZoneId timeZone)
An alias for
ExtraTypeCodecs.zonedTimestampAt(ZoneId) . |
static TypeCodec<ZonedDateTime> |
ExtraTypeCodecs.zonedTimestampAt(ZoneId timeZone)
Builds a new codec that maps CQL type
timestamp to Java's ZonedDateTime . |
Modifier and Type | Method and Description |
---|---|
static <T> TypeCodec<List<T>> |
TypeCodecs.listOf(TypeCodec<T> elementCodec)
Builds a new codec that maps a CQL list to a Java list, using the given codec to map each
element.
|
static <T> TypeCodec<T[]> |
ExtraTypeCodecs.listToArrayOf(TypeCodec<T> elementCodec)
Builds a new codec that maps a CQL list to a Java array.
|
static <K,V> TypeCodec<Map<K,V>> |
TypeCodecs.mapOf(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Builds a new codec that maps a CQL map to a Java map, using the given codecs to map each key
and value.
|
static <K,V> TypeCodec<Map<K,V>> |
TypeCodecs.mapOf(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Builds a new codec that maps a CQL map to a Java map, using the given codecs to map each key
and value.
|
static <T> TypeCodec<Optional<T>> |
ExtraTypeCodecs.optionalOf(TypeCodec<T> innerCodec)
Builds a new codec that wraps another codec's Java type into
Optional instances
(mapping CQL null to Optional.empty() ). |
static <T> TypeCodec<Set<T>> |
TypeCodecs.setOf(TypeCodec<T> elementCodec)
Builds a new codec that maps a CQL set to a Java set, using the given codec to map each
element.
|
Constructor and Description |
---|
MappingCodec(TypeCodec<InnerT> innerCodec,
GenericType<OuterT> outerJavaType)
Creates a new mapping codec providing support for
OuterT based on an existing codec for
InnerT . |
Modifier and Type | Method and Description |
---|---|
default <JavaTypeT> |
CodecRegistry.codecFor(Class<JavaTypeT> javaType)
Shortcut for
codecFor(GenericType.of(javaType)) . |
<JavaTypeT> |
CodecRegistry.codecFor(DataType cqlType)
Returns a codec to convert the given CQL type to the Java type deemed most appropriate to
represent it.
|
default <JavaTypeT> |
CodecRegistry.codecFor(DataType cqlType,
Class<JavaTypeT> javaType)
Shortcut for
codecFor(cqlType,
GenericType.of(javaType)) . |
<JavaTypeT> |
CodecRegistry.codecFor(DataType cqlType,
GenericType<JavaTypeT> javaType)
Returns a codec to handle the conversion between the given types.
|
<JavaTypeT> |
CodecRegistry.codecFor(DataType cqlType,
JavaTypeT value)
Returns a codec to convert the given Java object to the given CQL type.
|
<JavaTypeT> |
CodecRegistry.codecFor(GenericType<JavaTypeT> javaType)
Returns a codec to convert the given Java type to the CQL type deemed most appropriate to
represent it.
|
<JavaTypeT> |
CodecRegistry.codecFor(JavaTypeT value)
Returns a codec to convert the given Java object to the CQL type deemed most appropriate to
represent it.
|
Modifier and Type | Method and Description |
---|---|
default void |
MutableCodecRegistry.register(TypeCodec<?>... codecs)
Invokes
MutableCodecRegistry.register(TypeCodec) for every codec in the given list. |
void |
MutableCodecRegistry.register(TypeCodec<?> codec)
Adds the given codec to the registry.
|
Modifier and Type | Method and Description |
---|---|
default void |
MutableCodecRegistry.register(Iterable<TypeCodec<?>> codecs)
Invokes
MutableCodecRegistry.register(TypeCodec) for every codec in the given list. |
Copyright © 2017–2025. All rights reserved.