public final class CassandraDataTranslator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CassandraDataTranslator.CassandraType
CassandradataType enum.
|
| Constructor and Description |
|---|
CassandraDataTranslator() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compose(Class<?> dataTypeClazz,
Object dataValue,
boolean isCql3Enabled)
Calls compose function of respective data type of object.
|
static byte[] |
compose(Class<?> dataTypeClazz,
Object dataValue,
Class<?> mapGenericClassses,
boolean isCql3Enabled)
Calls compose function of respective data type of object.
|
static byte[] |
compose(Class<?> dataTypeClazz,
Object dataValue,
List<Class<?>> mapGenericClassses,
boolean isCql3Enabled)
Calls compose function of respective data type of object.
|
static Object |
decompose(Class<?> dataTypeClazz,
Object dataValue,
boolean isCql3Enabled)
Calls decompose function of respective data type of object.
|
static Object |
decompose(Class<?> dataTypeClazz,
Object dataValue,
Class<?> mapGenericClassses,
boolean isCql3Enabled)
Calls decompose function of respective data type of object.
|
static Object |
decompose(Class<?> dataTypeClazz,
Object dataValue,
List<Class<?>> mapGenericClassses,
boolean isCql3Enabled)
Calls decompose function of respective data type of object.
|
static CassandraDataTranslator.CassandraType |
getCassandraDataTypeClass(Class clazz)
Gets the cassandra data type class.
|
static boolean |
isCassandraDataTypeClass(Class clazz)
Checks whether the data type object is that of cassandra.
|
static Collection |
marshalCollection(Class cassandraTypeClazz,
Collection result,
Class clazz,
Class resultTypeClass)
Marshal collection.
|
static Map |
marshalMap(List<Class<?>> mapGenericClasses,
Class keyClass,
Class valueClass,
Map rawMap)
In case, key or value class is of type blob.
|
public static CassandraDataTranslator.CassandraType getCassandraDataTypeClass(Class clazz)
clazz - the clazzpublic static boolean isCassandraDataTypeClass(Class clazz)
clazz - the clazzpublic static byte[] compose(Class<?> dataTypeClazz, Object dataValue, boolean isCql3Enabled)
dataTypeClazz - the data type clazzdataValue - the data valueisCql3Enabled - the is cql3 enabledpublic static byte[] compose(Class<?> dataTypeClazz, Object dataValue, List<Class<?>> mapGenericClassses, boolean isCql3Enabled)
dataTypeClazz - the data type clazzdataValue - the data valuemapGenericClassses - the map generic classsesisCql3Enabled - the is cql3 enabledpublic static byte[] compose(Class<?> dataTypeClazz, Object dataValue, Class<?> mapGenericClassses, boolean isCql3Enabled)
dataTypeClazz - the data type clazzdataValue - the data valuemapGenericClassses - the map generic classsesisCql3Enabled - the is cql3 enabledpublic static Object decompose(Class<?> dataTypeClazz, Object dataValue, boolean isCql3Enabled)
dataTypeClazz - the data type clazzdataValue - the data valueisCql3Enabled - the is cql3 enabledpublic static Object decompose(Class<?> dataTypeClazz, Object dataValue, List<Class<?>> mapGenericClassses, boolean isCql3Enabled)
dataTypeClazz - the data type clazzdataValue - the data valuemapGenericClassses - the map generic classsesisCql3Enabled - the is cql3 enabledpublic static Object decompose(Class<?> dataTypeClazz, Object dataValue, Class<?> mapGenericClassses, boolean isCql3Enabled)
dataTypeClazz - the data type clazzdataValue - the data valuemapGenericClassses - the map generic classsesisCql3Enabled - the is cql3 enabledpublic static Map marshalMap(List<Class<?>> mapGenericClasses, Class keyClass, Class valueClass, Map rawMap)
mapGenericClasses - the map generic classeskeyClass - the key classvalueClass - the value classrawMap - the raw mappublic static Collection marshalCollection(Class cassandraTypeClazz, Collection result, Class clazz, Class resultTypeClass)
cassandraTypeClazz - the cassandra type clazzresult - the resultclazz - the clazzCopyright © 2015. All Rights Reserved.