use of com.datastax.driver.core.BoundStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method append.
/**
* Append value or values to the Set, List or Map.
*
* @param id Primary Key
* @param class Entity.class
* @param propertyName Entity property
* @param item can be a single value, a List, Set or a Map of values
* @param options WriteOptions
*/
public void append(Object id, Class<?> clazz, String propertyName, Object item, WriteOptions options) {
maybeSync(clazz);
BoundStatement bs = MappingBuilder.prepareAppendItemToCollection(id, clazz, propertyName, item, options, keyspace, session);
execute(bs);
}
use of com.datastax.driver.core.BoundStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method prepend.
/**
* Place item or items at the beginning of the List.
*
* @param id Primary Key
* @param class Entity.class
* @param propertyName Entity property
* @param item can be a single item or a List of items
* @param options WriteOptions
*/
public void prepend(Object id, Class<?> clazz, String propertyName, Object item, WriteOptions options) {
maybeSync(clazz);
BoundStatement bs = MappingBuilder.preparePrependItemToList(id, clazz, propertyName, item, options, keyspace, session);
execute(bs);
}
use of com.datastax.driver.core.BoundStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method appendAsync.
/**
* Asynchronously Append value or values to the Set, List or Map.
*
* @param id Primary Key
* @param class Entity.class
* @param propertyName Entity property
* @param item can be a single value, a List, Set or a Map of values
* @param options WriteOptions
* @return ResultSetFuture.
*/
public ResultSetFuture appendAsync(Object id, Class<?> clazz, String propertyName, Object item, WriteOptions options) {
maybeSync(clazz);
BoundStatement bs = MappingBuilder.prepareAppendItemToCollection(id, clazz, propertyName, item, options, keyspace, session);
return executeAsync(bs);
}
use of com.datastax.driver.core.BoundStatement in project cassandra-driver-mapping by valchkou.
the class MappingSession method updateValuesAsync.
/**
* Update values with options.
*
* @param id Primary Key
* @param class Entity.class
* @param propertyNames Array of properties to update
* @param value array of values to update
*/
public ResultSetFuture updateValuesAsync(Object id, Class<?> clazz, String[] propertyNames, Object[] values, WriteOptions options) {
maybeSync(clazz);
BoundStatement bs = MappingBuilder.prepareUpdateValues(id, clazz, propertyNames, values, options, keyspace, session);
return executeAsync(bs);
}
Aggregations