public abstract class AbstractDataManager<EntityImpl extends Entity> extends AbstractManager implements DataManager<EntityImpl>
processEngineConfiguration
Constructor and Description |
---|
AbstractDataManager(ProcessEngineConfigurationImpl processEngineConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
delete(EntityImpl entity) |
void |
delete(String id) |
EntityImpl |
findById(String entityId) |
EntityImpl |
findById(String entityId,
boolean checkCache) |
protected EntityImpl |
findByQuery(String selectQuery,
Object parameter,
CachedEntityMatcher<EntityImpl> cachedEntityMatcher) |
protected DbSqlSession |
getDbSqlSession() |
protected EntityCache |
getEntityCache() |
protected List<EntityImpl> |
getList(String dbQueryName,
Object parameter,
CachedEntityMatcher<EntityImpl> retainEntityCondition,
boolean checkCache)
Gets a list by querying the database and the cache using
CachedEntityMatcher . |
abstract Class<? extends EntityImpl> |
getManagedEntityClass() |
List<Class<? extends EntityImpl>> |
getManagedEntitySubClasses() |
void |
insert(EntityImpl entity) |
EntityImpl |
update(EntityImpl entity) |
getAsyncExecutor, getAttachmentEntityManager, getByteArrayEntityManager, getClock, getCommandContext, getCommandExecutor, getCommentEntityManager, getDeploymentEntityManager, getEventDispatcher, getEventSubscriptionEntityManager, getExecutionEntityManager, getGroupEntityManager, getHistoricActivityInstanceEntityManager, getHistoricDetailEntityManager, getHistoricIdentityLinkEntityManager, getHistoricProcessInstanceEntityManager, getHistoricTaskInstanceEntityManager, getHistoricVariableInstanceEntityManager, getHistoryManager, getIdentityInfoEntityManager, getIdentityLinkEntityManager, getJobEntityManager, getJobExecutor, getMembershipEntityManager, getModelEntityManager, getProcessDefinitionEntityManager, getProcessDefinitionInfoEntityManager, getProcessEngineConfiguration, getResourceEntityManager, getSession, getTaskEntityManager, getUserIdentityEntityManager, getVariableInstanceEntityManager
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public AbstractDataManager(ProcessEngineConfigurationImpl processEngineConfiguration)
public abstract Class<? extends EntityImpl> getManagedEntityClass()
public List<Class<? extends EntityImpl>> getManagedEntitySubClasses()
protected DbSqlSession getDbSqlSession()
protected EntityCache getEntityCache()
public EntityImpl findById(String entityId)
findById
in interface DataManager<EntityImpl extends Entity>
public EntityImpl findById(String entityId, boolean checkCache)
public void insert(EntityImpl entity)
insert
in interface DataManager<EntityImpl extends Entity>
public EntityImpl update(EntityImpl entity)
update
in interface DataManager<EntityImpl extends Entity>
public void delete(String id)
delete
in interface DataManager<EntityImpl extends Entity>
public void delete(EntityImpl entity)
delete
in interface DataManager<EntityImpl extends Entity>
protected EntityImpl findByQuery(String selectQuery, Object parameter, CachedEntityMatcher<EntityImpl> cachedEntityMatcher)
protected List<EntityImpl> getList(String dbQueryName, Object parameter, CachedEntityMatcher<EntityImpl> retainEntityCondition, boolean checkCache)
CachedEntityMatcher
.
First, the entities are fetched from the database using the provided query.
The cache is then queried for the entities of the same type. If an entity matches
the CachedEntityMatcher
condition, it replaces the entity from the database (as it is newer).dbQueryName
- The query name that needs to be executed.parameter
- The parameters for the query.entityMatcher
- The matcher used to determine which entities from the cache needs to be retainedcheckCache
- If false, no cache check will be done, and the returned list will simply be the list from the database.Copyright © 2015 Alfresco. All rights reserved.