public class CassandraMapperTestDB
extends pro.foundev.cassandra.commons.test.CassandraTestDB
| Constructor and Description |
|---|
CassandraMapperTestDB(CassandraSessionFactory cassandraSessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
Long |
count(Class<?> klazz)
Gets the count of a given table.
|
<T> void |
delete(Class<T> klazz,
Object... keys)
Deletes a record.
|
<T> T |
get(Class<T> klazz,
Object... keys)
Gets a record by full primary key and marks the table for cleanup later.
|
void |
markForCleanUp(Class<?> klazz)
simple method to make a table for cleanup in case you've not managed to visit it by other means.
|
<T> void |
save(Class<T> klazz,
T t)
Upserts a record to the database.
|
public CassandraMapperTestDB(CassandraSessionFactory cassandraSessionFactory)
public <T> void save(Class<T> klazz, T t)
T - klazz - t - public Long count(Class<?> klazz)
klazz - class needed for interrogation of @Table annotation and it depends on the optional
keyspace parameter being set todaypublic void markForCleanUp(Class<?> klazz)
klazz - must have @Table annotation from datastax mapping projectpublic <T> T get(Class<T> klazz, Object... keys)
T - Must be a class with the DataStax Java Driver @Table annotationklazz - keys - must contain all objects that make up the primary keyCopyright © 2015. All rights reserved.