use of com.datastax.driver.core.querybuilder.BuiltStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method delete.
/**
* Delete Entity
*
* @param entity
*/
public <E> void delete(E entity) {
maybeSync(entity.getClass());
BuiltStatement bs = MappingBuilder.buildDelete(entity, keyspace);
execute(bs);
}
use of com.datastax.driver.core.querybuilder.BuiltStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method deleteAsync.
/**
* Asynchronously Delete Entity
*
* @param entity
* @return ResultSetFuture
*/
public <E> ResultSetFuture deleteAsync(E entity) {
maybeSync(entity.getClass());
BuiltStatement bs = MappingBuilder.buildDelete(entity, keyspace);
return executeAsync(bs);
}
use of com.datastax.driver.core.querybuilder.BuiltStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method delete.
/**
* Delete Entity by ID(Primary key)
*
* @param class Entity.class
* @param id Primary Key
*/
public <T> void delete(Class<T> clazz, Object id) {
maybeSync(clazz);
BuiltStatement bs = MappingBuilder.buildDelete(clazz, id, keyspace);
execute(bs);
}
use of com.datastax.driver.core.querybuilder.BuiltStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method deleteAsync.
/**
* Asynchronously Delete Entity by ID(Primary key)
*
* @param class Entity.class
* @param id Primary Key
*/
public <T> ResultSetFuture deleteAsync(Class<T> clazz, Object id) {
maybeSync(clazz);
BuiltStatement bs = MappingBuilder.buildDelete(clazz, id, keyspace);
return executeAsync(bs);
}
Aggregations