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
ConstructorsConstructorDescriptionAbstractDataManager(ProcessEngineConfigurationImpl processEngineConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(EntityImpl entity) voidprotected DbSqlSessionprotected EntityImplgetEntity(String selectQuery, Object parameter, SingleCachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkDatabase) protected EntityCacheprotected List<EntityImpl> getList(String dbQueryName, Object parameter, CachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkCache) Gets a list by querying the database and the cache usingCachedEntityMatcher.protected List<EntityImpl> getListFromCache(CachedEntityMatcher<EntityImpl> entityMatcher, Object parameter) abstract Class<? extends EntityImpl> List<Class<? extends EntityImpl>> voidinsert(EntityImpl entity) update(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, getVariableInstanceEntityManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.activiti.engine.impl.persistence.entity.data.DataManager
create
-
Constructor Details
-
AbstractDataManager
-
-
Method Details
-
getManagedEntityClass
-
getManagedEntitySubClasses
-
getDbSqlSession
-
getEntityCache
-
findById
- Specified by:
findByIdin interfaceDataManager<EntityImpl extends Entity>
-
insert
- Specified by:
insertin interfaceDataManager<EntityImpl extends Entity>
-
update
- Specified by:
updatein interfaceDataManager<EntityImpl extends Entity>
-
delete
- Specified by:
deletein interfaceDataManager<EntityImpl extends Entity>
-
delete
- Specified by:
deletein interfaceDataManager<EntityImpl extends Entity>
-
getEntity
protected EntityImpl getEntity(String selectQuery, Object parameter, SingleCachedEntityMatcher<EntityImpl> cachedEntityMatcher, boolean checkDatabase) -
getList
protected List<EntityImpl> getList(String dbQueryName, 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.checkCache- If false, no cache check will be done, and the returned list will simply be the list from the database.entityMatcher- The matcher used to determine which entities from the cache needs to be retained
-
getListFromCache
protected List<EntityImpl> getListFromCache(CachedEntityMatcher<EntityImpl> entityMatcher, Object parameter)
-