Class Overview
Higher level mapping functions. Methods that behave similar to a Map.
Summary
Public Methods |
<T, K>
T
|
get(ColumnFamily<K, String> columnFamily, K id, Class<T> itemClass)
Get the specified item by its key/id
|
<T, K>
List<T>
|
getAll(ColumnFamily<K, String> columnFamily, Class<T> itemClass)
Get all rows of the specified item
|
<T>
Mapping<T>
|
getMapping(Class<T> clazz)
Return the mapping instance for the given class
|
<T, K>
void
|
put(ColumnFamily<K, String> columnFamily, T item)
Add/update the given item
|
<T, K>
void
|
remove(ColumnFamily<K, String> columnFamily, T item)
Remove the given item
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
MappingUtil
(Keyspace keyspace, AnnotationSet<?, ?> annotationSet)
Parameters
keyspace
| keyspace to use |
annotationSet
| annotation set to use
|
Parameters
keyspace
| keyspace to use |
cache
| cache to use
|
Parameters
keyspace
| keyspace to use |
cache
| cache to use |
annotationSet
| annotation set to use
|
Public Methods
public
T
get
(ColumnFamily<K, String> columnFamily, K id, Class<T> itemClass)
Get the specified item by its key/id
Parameters
columnFamily
| column family of the item |
id
| id/key of the item |
itemClass
| item's class |
Returns
- new instance with the item's columns propagated
Get all rows of the specified item
Parameters
columnFamily
| column family of the item |
itemClass
| item's class |
Returns
- new instances with the item's columns propagated
public
Mapping<T>
getMapping
(Class<T> clazz)
Return the mapping instance for the given class
Returns
- mapping instance (new or from cache)
public
void
put
(ColumnFamily<K, String> columnFamily, T item)
Add/update the given item
Parameters
columnFamily
| column family of the item |
item
| the item to add/update |
public
void
remove
(ColumnFamily<K, String> columnFamily, T item)
Parameters
columnFamily
| column family of the item |
item
| the item to remove |