Package | Description |
---|---|
com.datastax.driver.core |
The main package for the DataStax Java driver for Cassandra.
|
com.datastax.driver.extras.codecs |
This package and its subpackages contain several convenience
TypeCodec s. |
com.datastax.driver.extras.codecs.arrays |
This package contains a collection of convenience
TypeCodec instances useful for
serializing between CQL lists and Java arrays. |
com.datastax.driver.extras.codecs.date |
This package contains a collection of convenience
TypeCodec instances useful for
serializing between CQL temporal types and Java primitive types. |
com.datastax.driver.extras.codecs.enums |
This package contains a collection of convenience
TypeCodec instances useful for
serializing between CQL types and Java enums. |
com.datastax.driver.extras.codecs.guava |
This package contains a collection of convenience
TypeCodec instances useful for
serializing between CQL types and Guava-specific Java types. |
com.datastax.driver.extras.codecs.jdk8 |
This package contains a collection of convenience
TypeCodec instances useful for
serializing between CQL types and Java 8 types, such as the ones from the
java.time API and java.util.Optional . |
com.datastax.driver.extras.codecs.joda | |
com.datastax.driver.extras.codecs.json |
This package contains a collection of convenience
TypeCodec instances useful for
serializing JSON structures. |
com.datastax.driver.mapping | |
com.datastax.driver.mapping.annotations |
Modifier and Type | Class and Description |
---|---|
static class |
TypeCodec.AbstractCollectionCodec<E,C extends Collection<E>>
|
static class |
TypeCodec.AbstractMapCodec<K,V>
|
static class |
TypeCodec.AbstractTupleCodec<T>
Base class for codecs mapping CQL
tuples to Java objects. |
static class |
TypeCodec.AbstractUDTCodec<T>
Base class for codecs mapping CQL
user-defined types (UDTs) to Java objects. |
static class |
TypeCodec.PrimitiveBooleanCodec
A codec that is capable of handling primitive booleans,
thus avoiding the overhead of boxing and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveByteCodec
A codec that is capable of handling primitive bytes,
thus avoiding the overhead of boxing and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveDoubleCodec
A codec that is capable of handling primitive doubles,
thus avoiding the overhead of boxing and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveFloatCodec
A codec that is capable of handling primitive floats,
thus avoiding the overhead of boxing and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveIntCodec
A codec that is capable of handling primitive ints,
thus avoiding the overhead of boxing and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveLongCodec
A codec that is capable of handling primitive longs,
thus avoiding the overhead of boxing and unboxing such primitives.
|
static class |
TypeCodec.PrimitiveShortCodec
A codec that is capable of handling primitive shorts,
thus avoiding the overhead of boxing and unboxing such primitives.
|
Modifier and Type | Field and Description |
---|---|
protected TypeCodec<E> |
TypeCodec.AbstractCollectionCodec.eltCodec |
protected TypeCodec<K> |
TypeCodec.AbstractMapCodec.keyCodec |
protected TypeCodec<V> |
TypeCodec.AbstractMapCodec.valueCodec |
Modifier and Type | Method and Description |
---|---|
static TypeCodec<String> |
TypeCodec.ascii()
Return the default codec for the CQL type
ascii . |
static TypeCodec<ByteBuffer> |
TypeCodec.blob()
Return the default codec for the CQL type
blob . |
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
Class<T> javaType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
T value)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(DataType cqlType,
TypeToken<T> javaType)
|
<T> TypeCodec<T> |
CodecRegistry.codecFor(T value)
Returns a
codec that accepts the given value. |
static TypeCodec<ByteBuffer> |
TypeCodec.custom(DataType.CustomType type)
Return a newly-created codec for the given CQL custom type.
|
static TypeCodec<LocalDate> |
TypeCodec.date()
Return the default codec for the CQL type
date . |
static TypeCodec<BigDecimal> |
TypeCodec.decimal()
Return the default codec for the CQL type
decimal . |
static TypeCodec<Duration> |
TypeCodec.duration()
Returns the default codec for the
Duration type . |
static TypeCodec<InetAddress> |
TypeCodec.inet()
Return the default codec for the CQL type
inet . |
static <T> TypeCodec<List<T>> |
TypeCodec.list(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
list whose element type
is determined by the given element codec. |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodec.map(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Return a newly-created codec for the CQL type
map whose key type
and value type are determined by the given codecs. |
static <T> TypeCodec<Set<T>> |
TypeCodec.set(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
set whose element type
is determined by the given element codec. |
static TypeCodec<Date> |
TypeCodec.timestamp()
Return the default codec for the CQL type
timestamp . |
static TypeCodec<UUID> |
TypeCodec.timeUUID()
Return the default codec for the CQL type
timeuuid . |
static TypeCodec<TupleValue> |
TypeCodec.tuple(TupleType type)
Return a newly-created codec for the given CQL tuple type.
|
static TypeCodec<UDTValue> |
TypeCodec.userType(UserType type)
Return a newly-created codec for the given user-defined CQL type.
|
static TypeCodec<UUID> |
TypeCodec.uuid()
Return the default codec for the CQL type
uuid . |
static TypeCodec<String> |
TypeCodec.varchar()
Return the default codec for the CQL type
varchar . |
static TypeCodec<BigInteger> |
TypeCodec.varint()
Return the default codec for the CQL type
varint . |
Modifier and Type | Method and Description |
---|---|
<T> T |
GettableByIndexData.get(int i,
TypeCodec<T> codec)
Returns the
i th value converted using the given TypeCodec . |
<T> T |
BoundStatement.get(int i,
TypeCodec<T> codec)
Returns the
i th value converted using the given TypeCodec . |
<T> T |
GettableByNameData.get(String name,
TypeCodec<T> codec)
Returns the value for
name converted using the given TypeCodec . |
<T> T |
BoundStatement.get(String name,
TypeCodec<T> codec)
Returns the value for
name converted using the given TypeCodec . |
<T> T |
AbstractGettableData.get(String name,
TypeCodec<T> codec)
Returns the value for
name converted using the given TypeCodec . |
static <T> TypeCodec<List<T>> |
TypeCodec.list(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
list whose element type
is determined by the given element codec. |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodec.map(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Return a newly-created codec for the CQL type
map whose key type
and value type are determined by the given codecs. |
static <K,V> TypeCodec<Map<K,V>> |
TypeCodec.map(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec)
Return a newly-created codec for the CQL type
map whose key type
and value type are determined by the given codecs. |
CodecRegistry |
CodecRegistry.register(TypeCodec<?>... codecs)
Register the given codecs with this registry.
|
CodecRegistry |
CodecRegistry.register(TypeCodec<?> newCodec)
Register the given codec with this registry.
|
<V> T |
SettableByIndexData.set(int i,
V v,
TypeCodec<V> codec)
Sets the
i th value to the provided value, converted using the given TypeCodec . |
<V> BoundStatement |
BoundStatement.set(int i,
V v,
TypeCodec<V> codec)
Sets the
i th value to the provided value, converted using the given TypeCodec . |
<V> T |
SettableByNameData.set(String name,
V v,
TypeCodec<V> codec)
Sets the value for (all occurrences of) variable
name to the provided value,
converted using the given TypeCodec . |
<V> BoundStatement |
BoundStatement.set(String name,
V v,
TypeCodec<V> codec)
Sets the value for (all occurrences of) variable
name to the provided value,
converted using the given TypeCodec . |
static <T> TypeCodec<Set<T>> |
TypeCodec.set(TypeCodec<T> elementCodec)
Return a newly-created codec for the CQL type
set whose element type
is determined by the given element codec. |
Modifier and Type | Method and Description |
---|---|
CodecRegistry |
CodecRegistry.register(Iterable<? extends TypeCodec<?>> codecs)
Register the given codecs with this registry.
|
Constructor and Description |
---|
AbstractCollectionCodec(DataType.CollectionType cqlType,
TypeToken<C> javaType,
TypeCodec<E> eltCodec) |
AbstractMapCodec(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec) |
AbstractMapCodec(TypeCodec<K> keyCodec,
TypeCodec<V> valueCodec) |
Modifier and Type | Class and Description |
---|---|
class |
MappingCodec<O,I>
An abstract
TypeCodec that maps a Java Pojo to another Java object
that can in turn be serialized into a CQL type. |
class |
ParsingCodec<T>
An abstract
TypeCodec that stores JAVA objects as serialized strings. |
Modifier and Type | Field and Description |
---|---|
protected TypeCodec<I> |
MappingCodec.innerCodec |
Constructor and Description |
---|
MappingCodec(TypeCodec<I> innerCodec,
Class<O> javaType) |
MappingCodec(TypeCodec<I> innerCodec,
TypeToken<O> javaType) |
ParsingCodec(TypeCodec<String> innerCodec,
Class<T> javaType) |
ParsingCodec(TypeCodec<String> innerCodec,
TypeToken<T> javaType) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractArrayCodec<T>
Base class for all codecs dealing with Java arrays.
|
class |
AbstractPrimitiveArrayCodec<T>
Base class for all codecs dealing with Java primitive arrays.
|
class |
DoubleArrayCodec
A codec that maps the CQL type
list<double> to the Java type double[] . |
class |
FloatArrayCodec
A codec that maps the CQL type
list<float> to the Java type float[] . |
class |
IntArrayCodec
A codec that maps the CQL type
list<int> to the Java type int[] . |
class |
LongArrayCodec
A codec that maps the CQL type
list<long> to the Java type long[] . |
class |
ObjectArrayCodec<E>
Codec dealing with Java object arrays.
|
Modifier and Type | Field and Description |
---|---|
protected TypeCodec<E> |
ObjectArrayCodec.eltCodec |
Constructor and Description |
---|
ObjectArrayCodec(DataType.CollectionType cqlType,
Class<E[]> javaClass,
TypeCodec<E> eltCodec) |
Modifier and Type | Class and Description |
---|---|
class |
SimpleDateCodec
A
TypeCodec that maps CQL dates to Java primitive ints,
representing the number of days since the Epoch. |
class |
SimpleTimestampCodec
A
TypeCodec that maps CQL timestamps to Java primitive longs,
representing the number of milliseconds since the Epoch. |
Modifier and Type | Class and Description |
---|---|
class |
EnumNameCodec<E extends Enum<E>>
A codec that serializes
Enum instances as CQL varchar s
representing their programmatic names as returned by Enum.name() . |
class |
EnumOrdinalCodec<E extends Enum<E>>
A codec that serializes
Enum instances as CQL int s
representing their ordinal values as returned by Enum.ordinal() . |
Constructor and Description |
---|
EnumNameCodec(TypeCodec<String> innerCodec,
Class<E> enumClass) |
EnumOrdinalCodec(TypeCodec<Integer> innerCodec,
Class<E> enumClass) |
Constructor and Description |
---|
OptionalCodec(TypeCodec<T> codec) |
OptionalCodec(TypeCodec<T> codec,
Predicate<T> isAbsent) |
Modifier and Type | Class and Description |
---|---|
class |
InstantCodec
|
class |
LocalDateCodec
|
class |
LocalTimeCodec
|
class |
OptionalCodec<T>
A codec that wraps other codecs around JDK 8's
Optional API. |
class |
ZonedDateTimeCodec
TypeCodec that maps
ZonedDateTime to CQL tuple<timestamp,varchar> ,
providing a pattern for maintaining timezone information in
Cassandra. |
Constructor and Description |
---|
OptionalCodec(TypeCodec<T> codec) |
OptionalCodec(TypeCodec<T> codec,
Predicate<T> isAbsent) |
Modifier and Type | Class and Description |
---|---|
class |
DateTimeCodec
|
Modifier and Type | Class and Description |
---|---|
class |
JacksonJsonCodec<T>
A JSON codec that uses the Jackson
library to perform serialization and deserialization of JSON objects.
|
class |
Jsr353JsonCodec
A JSON codec that uses the
Java API for JSON processing
to perform serialization and deserialization of JSON structures.
|
Modifier and Type | Method and Description |
---|---|
TypeCodec<T> |
MappedProperty.getCustomCodec()
Returns the
codec to use
to serialize and deserialize this property. |
<T> TypeCodec<T> |
MappingManager.udtCodec(Class<T> klass)
Creates a
TypeCodec for the provided class, using the default keyspace (either the one declared in the
Table annotation, or the logged keyspace on the session). |
<T> TypeCodec<T> |
MappingManager.udtCodec(Class<T> klass,
String keyspace)
Creates a
TypeCodec for the provided class (that must be annotated by
a UDT annotation). |
Modifier and Type | Class and Description |
---|---|
static class |
Defaults.NoCodec
A fake codec implementation to use as the default in mapping annotations.
|
Copyright © 2012–2018. All rights reserved.