T - Type of object mapping to cassandra rowpublic class HectorObjectMapper extends Object
HColumns to an object's
properties. See #createObject(Object, ColumnSlice) for more details.
As mentioned above all column names must be Strings - doesn't
really make sense to have other types when mapping to object properties.| Constructor and Description |
|---|
HectorObjectMapper(ClassCacheMgr cacheMgr) |
| Modifier and Type | Method and Description |
|---|---|
static Serializer<?> |
determineSerializer(Class<?> theType) |
<T,I> T |
getObject(Keyspace keyspace,
String colFamName,
I pkObj)
Retrieve columns from cassandra keyspace and column family, instantiate a
new object of required type, and then map them to the object's properties.
|
static boolean |
isImplementedBy(Class<?> clazz,
Class<?> target) |
static boolean |
isSerializable(Class<?> clazz) |
<T> T |
saveObj(Keyspace keyspace,
T obj) |
Collection<?> |
saveObjCollection(Keyspace keyspace,
Collection<?> objColl)
Persists the object collection using a single batch mutate.
|
Collection<?> |
saveObjCollection(Keyspace keyspace,
Collection<?> objColl,
Mutator<byte[]> m) |
void |
setKeyConcatStrategy(KeyConcatenationStrategy keyConcatStrategy) |
public HectorObjectMapper(ClassCacheMgr cacheMgr)
public <T,I> T getObject(Keyspace keyspace, String colFamName, I pkObj)
T - keyspace - colFamName - pkObj - public <T> T saveObj(Keyspace keyspace, T obj)
keyspace - obj - public Collection<?> saveObjCollection(Keyspace keyspace, Collection<?> objColl)
keyspace - objColl - public Collection<?> saveObjCollection(Keyspace keyspace, Collection<?> objColl, Mutator<byte[]> m)
public static Serializer<?> determineSerializer(Class<?> theType)
public static boolean isSerializable(Class<?> clazz)
public void setKeyConcatStrategy(KeyConcatenationStrategy keyConcatStrategy)
Copyright © 2014. All Rights Reserved.