Modifier and Type | Field and Description |
---|---|
protected DbEntityCache |
dbEntityCache |
protected DbOperationExecutor |
dbOperationExecutor |
protected DbOperationManager |
dbOperationManager |
protected IdGenerator |
idGenerator |
protected List<OptimisticLockingListener> |
optimisticLockingListeners |
Constructor and Description |
---|
DbEntityManager(DbSqlSessionFactory dbSqlSessionFactory,
org.apache.ibatis.session.SqlSession sqlSession) |
Modifier and Type | Method and Description |
---|---|
void |
bulkDelete(Class<? extends PersistentObject> entityType,
String statement,
Object parameter) |
void |
bulkUpdate(Class<? extends PersistentObject> entityType,
String statement,
Object parameter) |
void |
close() |
void |
delete(PersistentObject persistentObject) |
protected void |
ensureHasId(PersistentObject persistentObject) |
void |
flush() |
protected void |
flushEntityCache()
Flushes the entity cache:
Depending on the entity state, the required
DbOperation is performed and the cache is updated. |
DbEntityCache |
getDbEntityCache() |
DbOperationExecutor |
getDbOperationExecutor() |
DbOperationManager |
getDbOperationManager() |
protected void |
handleOptimisticLockingException(DbOperation dbOperation) |
protected void |
initialize(DbSqlSessionFactory dbSqlSessionFactory,
org.apache.ibatis.session.SqlSession sqlSession) |
void |
insert(PersistentObject persistentObject) |
boolean |
isDeleted(PersistentObject object) |
protected void |
logFlushSummary(Collection<DbOperation> operations) |
void |
merge(PersistentObject persistentObject) |
protected DbBulkOperation |
performBulkOperation(Class<? extends PersistentObject> entityType,
String statement,
Object parameter,
DbOperationType operationType) |
protected void |
performEntityOperation(CachedDbEntity cachedDbEntity,
DbOperationType type) |
void |
registerOptimisticLockingListener(OptimisticLockingListener optimisticLockingListener) |
void |
setDbEntityCache(DbEntityCache dbEntityCache) |
void |
setDbOperationExecutor(DbOperationExecutor executor) |
void |
setDbOperationManager(DbOperationManager operationManager) |
protected List<OptimisticLockingListener> optimisticLockingListeners
protected IdGenerator idGenerator
protected DbEntityCache dbEntityCache
protected DbOperationManager dbOperationManager
protected DbOperationExecutor dbOperationExecutor
public DbEntityManager(DbSqlSessionFactory dbSqlSessionFactory, org.apache.ibatis.session.SqlSession sqlSession)
protected void initialize(DbSqlSessionFactory dbSqlSessionFactory, org.apache.ibatis.session.SqlSession sqlSession)
protected void handleOptimisticLockingException(DbOperation dbOperation)
protected void flushEntityCache()
DbOperation
is performed and the cache is updated.public void insert(PersistentObject persistentObject)
public void merge(PersistentObject persistentObject)
public void delete(PersistentObject persistentObject)
public void bulkUpdate(Class<? extends PersistentObject> entityType, String statement, Object parameter)
public void bulkDelete(Class<? extends PersistentObject> entityType, String statement, Object parameter)
protected DbBulkOperation performBulkOperation(Class<? extends PersistentObject> entityType, String statement, Object parameter, DbOperationType operationType)
protected void performEntityOperation(CachedDbEntity cachedDbEntity, DbOperationType type)
protected void logFlushSummary(Collection<DbOperation> operations)
public boolean isDeleted(PersistentObject object)
protected void ensureHasId(PersistentObject persistentObject)
public DbOperationExecutor getDbOperationExecutor()
public void setDbOperationExecutor(DbOperationExecutor executor)
public DbOperationManager getDbOperationManager()
public void setDbOperationManager(DbOperationManager operationManager)
public DbEntityCache getDbEntityCache()
public void setDbEntityCache(DbEntityCache dbEntityCache)
public void registerOptimisticLockingListener(OptimisticLockingListener optimisticLockingListener)
Copyright © 2015. All rights reserved.