Class AbstractDataManager<EntityImpl extends Entity>
- java.lang.Object
-
- org.activiti.engine.impl.persistence.AbstractManager
-
- org.activiti.engine.impl.persistence.entity.data.AbstractDataManager<EntityImpl>
-
- All Implemented Interfaces:
DataManager<EntityImpl>
- Direct Known Subclasses:
MybatisAttachmentDataManager,MybatisByteArrayDataManager,MybatisCommentDataManager,MybatisDeadLetterJobDataManager,MybatisDeploymentDataManager,MybatisEventLogEntryDataManager,MybatisEventSubscriptionDataManager,MybatisExecutionDataManager,MybatisHistoricActivityInstanceDataManager,MybatisHistoricDetailDataManager,MybatisHistoricIdentityLinkDataManager,MybatisHistoricProcessInstanceDataManager,MybatisHistoricTaskInstanceDataManager,MybatisHistoricVariableInstanceDataManager,MybatisIdentityLinkDataManager,MybatisIntegrationContextDataManager,MybatisJobDataManager,MybatisModelDataManager,MybatisProcessDefinitionDataManager,MybatisProcessDefinitionInfoDataManager,MybatisPropertyDataManager,MybatisResourceDataManager,MybatisSuspendedJobDataManager,MybatisTaskDataManager,MybatisTimerJobDataManager,MybatisVariableInstanceDataManager
public abstract class AbstractDataManager<EntityImpl extends Entity> extends AbstractManager implements DataManager<EntityImpl>
-
-
Field Summary
-
Fields inherited from class org.activiti.engine.impl.persistence.AbstractManager
processEngineConfiguration
-
-
Constructor Summary
Constructors Constructor Description AbstractDataManager(ProcessEngineConfigurationImpl processEngineConfiguration)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddelete(EntityImpl entity)voiddelete(java.lang.String id)EntityImplfindById(java.lang.String entityId)protected DbSqlSessiongetDbSqlSession()protected EntityImplgetEntity(java.lang.String selectQuery, java.lang.Object parameter, SingleCachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkDatabase)protected EntityCachegetEntityCache()protected java.util.List<EntityImpl>getList(java.lang.String dbQueryName, java.lang.Object parameter, CachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkCache)Gets a list by querying the database and the cache usingCachedEntityMatcher.protected java.util.List<EntityImpl>getListFromCache(CachedEntityMatcher<EntityImpl> entityMatcher, java.lang.Object parameter)abstract java.lang.Class<? extends EntityImpl>getManagedEntityClass()java.util.List<java.lang.Class<? extends EntityImpl>>getManagedEntitySubClasses()voidinsert(EntityImpl entity)EntityImplupdate(EntityImpl entity)-
Methods inherited from class org.activiti.engine.impl.persistence.AbstractManager
getAsyncExecutor, getAttachmentEntityManager, getByteArrayEntityManager, getClock, getCommandContext, getCommandExecutor, getCommentEntityManager, getDeadLetterJobEntityManager, getDeploymentEntityManager, getEventDispatcher, getEventSubscriptionEntityManager, getExecutionEntityManager, getHistoricActivityInstanceEntityManager, getHistoricDetailEntityManager, getHistoricIdentityLinkEntityManager, getHistoricProcessInstanceEntityManager, getHistoricTaskInstanceEntityManager, getHistoricVariableInstanceEntityManager, getHistoryManager, getIdentityLinkEntityManager, getJobEntityManager, getJobManager, getModelEntityManager, getProcessDefinitionEntityManager, getProcessDefinitionInfoEntityManager, getProcessEngineConfiguration, getResourceEntityManager, getSession, getSuspendedJobEntityManager, getTaskEntityManager, getTimerJobEntityManager, getVariableInstanceEntityManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.activiti.engine.impl.persistence.entity.data.DataManager
create
-
-
-
-
Constructor Detail
-
AbstractDataManager
public AbstractDataManager(ProcessEngineConfigurationImpl processEngineConfiguration)
-
-
Method Detail
-
getManagedEntityClass
public abstract java.lang.Class<? extends EntityImpl> getManagedEntityClass()
-
getManagedEntitySubClasses
public java.util.List<java.lang.Class<? extends EntityImpl>> getManagedEntitySubClasses()
-
getDbSqlSession
protected DbSqlSession getDbSqlSession()
-
getEntityCache
protected EntityCache getEntityCache()
-
findById
public EntityImpl findById(java.lang.String entityId)
- Specified by:
findByIdin interfaceDataManager<EntityImpl extends Entity>
-
insert
public void insert(EntityImpl entity)
- Specified by:
insertin interfaceDataManager<EntityImpl extends Entity>
-
update
public EntityImpl update(EntityImpl entity)
- Specified by:
updatein interfaceDataManager<EntityImpl extends Entity>
-
delete
public void delete(java.lang.String id)
- Specified by:
deletein interfaceDataManager<EntityImpl extends Entity>
-
delete
public void delete(EntityImpl entity)
- Specified by:
deletein interfaceDataManager<EntityImpl extends Entity>
-
getEntity
protected EntityImpl getEntity(java.lang.String selectQuery, java.lang.Object parameter, SingleCachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkDatabase)
-
getList
protected java.util.List<EntityImpl> getList(java.lang.String dbQueryName, java.lang.Object parameter, CachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkCache)
Gets a list by querying the database and the cache usingCachedEntityMatcher. 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 theCachedEntityMatchercondition, it replaces the entity from the database (as it is newer).- Parameters:
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.
-
getListFromCache
protected java.util.List<EntityImpl> getListFromCache(CachedEntityMatcher<EntityImpl> entityMatcher, java.lang.Object parameter)
-
-