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 the first occurrence 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 the first occurrence of
name , using the given codec for the
conversion. |
Modifier and Type | Field and Description |
---|---|
protected List<TypeCodec<?>> |
SessionBuilder.typeCodecs |
Modifier and Type | Method and Description |
---|---|
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)
This must return an instance of
InternalDriverContext (it's not expressed
directly in the signature to avoid leaking that type through the protected API). |
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 | Field and Description |
---|---|
static TypeCodec<String> |
TypeCodecs.ASCII |
static TypeCodec<ByteBuffer> |
TypeCodecs.BLOB |
static TypeCodec<LocalDate> |
TypeCodecs.DATE |
static TypeCodec<BigDecimal> |
TypeCodecs.DECIMAL |
static TypeCodec<CqlDuration> |
TypeCodecs.DURATION |
static TypeCodec<InetAddress> |
TypeCodecs.INET |
static TypeCodec<String> |
TypeCodecs.TEXT |
static TypeCodec<LocalTime> |
TypeCodecs.TIME |
static TypeCodec<Instant> |
TypeCodecs.TIMESTAMP |
static TypeCodec<UUID> |
TypeCodecs.TIMEUUID |
static TypeCodec<UUID> |
TypeCodecs.UUID |
static TypeCodec<BigInteger> |
TypeCodecs.VARINT |
static TypeCodec<ZonedDateTime> |
TypeCodecs.ZONED_TIMESTAMP_SYSTEM
A codec that handles Apache Cassandra(R)'s timestamp type and maps it to Java's
ZonedDateTime , using the system's default time zone as its
source of time zone information. |
static TypeCodec<ZonedDateTime> |
TypeCodecs.ZONED_TIMESTAMP_UTC
A codec that handles Apache Cassandra(R)'s timestamp type and maps it to Java's
ZonedDateTime , using ZoneOffset.UTC as its source of time zone information. |
Modifier and Type | Method and Description |
---|---|
static TypeCodec<ByteBuffer> |
TypeCodecs.custom(DataType cqlType) |
static <T> TypeCodec<List<T>> |
TypeCodecs.listOf(TypeCodec<T> elementCodec) |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodecs.mapOf(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec) |
static <T> TypeCodec<Set<T>> |
TypeCodecs.setOf(TypeCodec<T> elementCodec) |
static TypeCodec<TupleValue> |
TypeCodecs.tupleOf(TupleType cqlType) |
static TypeCodec<UdtValue> |
TypeCodecs.udtOf(UserDefinedType cqlType) |
static TypeCodec<ZonedDateTime> |
TypeCodecs.zonedTimestampAt(ZoneId timeZone)
Returns a codec that handles Apache Cassandra(R)'s timestamp type and maps it to Java's
ZonedDateTime , using the supplied ZoneId as its source of time zone information. |
Modifier and Type | Method and Description |
---|---|
static <T> TypeCodec<List<T>> |
TypeCodecs.listOf(TypeCodec<T> elementCodec) |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodecs.mapOf(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec) |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodecs.mapOf(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec) |
static <T> TypeCodec<Set<T>> |
TypeCodecs.setOf(TypeCodec<T> elementCodec) |
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 |
---|---|
static <T> Literal |
QueryBuilder.literal(T value,
TypeCodec<T> codec)
A literal term, as in
WHERE k = 1 . |
Modifier and Type | Method and Description |
---|---|
<T> JsonInsert |
InsertInto.json(T value,
TypeCodec<T> codec)
Makes this statement an INSERT JSON with a custom type mapping.
|
Modifier and Type | Method and Description |
---|---|
default <T> Select |
OngoingSelection.literal(T value,
TypeCodec<T> codec)
Selects a literal value, as in
WHERE k = 1 . |
Copyright © 2017–2019. All rights reserved.