public class BatchingPersistenceManager extends PersistenceManager
| Modifier and Type | Field and Description |
|---|---|
protected BatchingFlushContext |
flushContext |
configContext, contextFactory, daoContext, entityMetaMap, proxifier| Modifier and Type | Method and Description |
|---|---|
void |
cleanBatch()
Cleaning all pending statements for the current batch session.
|
void |
endBatch()
End an existing batch and flush all the pending statements.
|
<T> T |
find(Class<T> entityClass,
Object primaryKey,
ConsistencyLevel readLevel)
Find an entity with the given Consistency Level for read
|
<T> T |
getProxy(Class<T> entityClass,
Object primaryKey,
ConsistencyLevel readLevel)
Create a proxy for the entity.
|
protected PersistenceContext |
initPersistenceContext(Class<?> entityClass,
Object primaryKey,
Options options) |
protected PersistenceContext |
initPersistenceContext(Object entity,
Options options) |
<T> T |
persist(T entity,
Options options)
Persist an entity with the given options.
|
void |
refresh(Object entity,
ConsistencyLevel readLevel)
Refresh an entity with the given Consistency Level for read.
|
void |
remove(Object entity,
Options options)
Remove an entity with the given Consistency Level for write.
|
void |
startBatch()
Start a batch session.
|
void |
startBatch(ConsistencyLevel consistencyLevel)
Start a batch session with read/write consistency levels
|
void |
update(Object entity,
Options options)
Update a "managed" entity
|
find, getConfigContext, getEntityMetaMap, getNativeSession, getProxy, indexedQuery, initAndRemoveProxy, initAndRemoveProxy, initAndRemoveProxy, initialize, initialize, initialize, nativeQuery, persist, rawTypedQuery, refresh, remove, removeById, removeById, removeProxy, removeProxy, setConfigContext, setEntityMetaMap, sliceQuery, typedQuery, unwrap, updateprotected BatchingFlushContext flushContext
public void startBatch()
public void startBatch(ConsistencyLevel consistencyLevel)
public void endBatch()
public void cleanBatch()
public <T> T persist(T entity,
Options options)
PersistenceManagerpersist in class PersistenceManagerentity - Entity to be persistedoptions - options for consistency level, ttl and timestamppublic void update(Object entity, Options options)
PersistenceManagerupdate in class PersistenceManagerentity - Managed entity to be updatedoptions - options for consistency level, ttl and timestamppublic void remove(Object entity, Options options)
PersistenceManagerremove in class PersistenceManagerentity - Entity to be removedoptions - options for consistency level and timestamppublic <T> T find(Class<T> entityClass, Object primaryKey, ConsistencyLevel readLevel)
PersistenceManagerfind in class PersistenceManagerentityClass - Entity typeprimaryKey - Primary key (Cassandra row key) of the entity to loadreadLevel - Consistency Level for readpublic <T> T getProxy(Class<T> entityClass, Object primaryKey, ConsistencyLevel readLevel)
PersistenceManagergetProxy in class PersistenceManagerentityClass - Entity typeprimaryKey - Primary key (Cassandra row key) of the entity to initializereadLevel - Consistency Level for readpublic void refresh(Object entity, ConsistencyLevel readLevel) throws AchillesStaleObjectStateException
PersistenceManagerrefresh in class PersistenceManagerentity - Entity to be refreshedreadLevel - Consistency Level for readAchillesStaleObjectStateExceptionprotected PersistenceContext initPersistenceContext(Class<?> entityClass, Object primaryKey, Options options)
initPersistenceContext in class PersistenceManagerprotected PersistenceContext initPersistenceContext(Object entity, Options options)
initPersistenceContext in class PersistenceManagerCopyright © 2012-2014. All Rights Reserved.