org.bonitasoft.engine.persistence
public abstract class AbstractHibernatePersistenceService extends org.bonitasoft.engine.persistence.AbstractDBPersistenceService
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
cacheQueries |
protected List<Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> |
classMapping |
protected Map<String,Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> |
interfaceToClassMapping |
protected List<String> |
mappingExclusions |
| Constructor and Description |
|---|
AbstractHibernatePersistenceService(String name,
HibernateConfigurationProvider hbmConfigurationProvider,
org.bonitasoft.engine.persistence.DBConfigurationsProvider tenantConfigurationsProvider,
String statementDelimiter,
String likeEscapeCharacter,
org.bonitasoft.engine.log.technical.TechnicalLoggerService logger,
SequenceManager sequenceManager,
DataSource datasource) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkClassMapping(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) |
void |
delete(List<Long> ids,
Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) |
void |
delete(long id,
Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) |
void |
delete(org.bonitasoft.engine.persistence.PersistentObject entity) |
void |
deleteAll(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) |
void |
destroy() |
protected void |
doExecuteSQL(String sqlResource,
String statementDelimiter,
Map<String,String> replacements,
boolean useDataSourceConnection) |
protected void |
flushStatements(boolean useTenant) |
Map<String,String> |
getClassAliasMappings() |
protected Class<? extends org.bonitasoft.engine.persistence.PersistentObject> |
getMappedClass(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) |
protected String |
getQueryWithFilters(String query,
List<org.bonitasoft.engine.persistence.FilterOption> filters,
org.bonitasoft.engine.persistence.SearchFields multipleFilter) |
protected org.hibernate.Session |
getSession(boolean useTenant) |
void |
insert(org.bonitasoft.engine.persistence.PersistentObject entity) |
void |
insertInBatch(List<org.bonitasoft.engine.persistence.PersistentObject> entities) |
protected void |
logStats()
Log synthetic information about cache every 10.000 sessions, if hibernate.gather_statistics, is enabled.
|
protected <T> void |
logWarningMessage(org.bonitasoft.engine.persistence.SelectListDescriptor<T> selectDescriptor,
org.hibernate.Query query) |
void |
purge(String classToPurge) |
<T extends org.bonitasoft.engine.persistence.PersistentObject> |
selectById(org.bonitasoft.engine.persistence.SelectByIdDescriptor<T> selectDescriptor) |
<T> List<T> |
selectList(org.bonitasoft.engine.persistence.SelectListDescriptor<T> selectDescriptor) |
<T> T |
selectOne(org.bonitasoft.engine.persistence.SelectOneDescriptor<T> selectDescriptor) |
protected void |
setParameters(org.hibernate.Query query,
Map<String,Object> inputParameters) |
protected void |
setQueryCache(org.hibernate.Query query,
String name) |
void |
update(org.bonitasoft.engine.services.UpdateDescriptor updateDescriptor) |
cleanStructure, createStructure, deleteStructure, deleteTenant, getLikeEscapeClause, getName, getNumberOfEntities, getNumberOfEntities, getSequenceManager, getSqlTransformer, getSqlTransformers, getTenantId, initializeStructure, initializeStructure, initTablesFiles, postCreateStructure, preDropStructure, searchEntity, searchEntity, setIdprotected final List<Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> classMapping
protected final Map<String,Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> interfaceToClassMapping
public AbstractHibernatePersistenceService(String name, HibernateConfigurationProvider hbmConfigurationProvider, org.bonitasoft.engine.persistence.DBConfigurationsProvider tenantConfigurationsProvider, String statementDelimiter, String likeEscapeCharacter, org.bonitasoft.engine.log.technical.TechnicalLoggerService logger, SequenceManager sequenceManager, DataSource datasource) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionprotected void checkClassMapping(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void delete(List<Long> ids, Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void delete(long id,
Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void delete(org.bonitasoft.engine.persistence.PersistentObject entity)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void deleteAll(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void destroy()
protected void doExecuteSQL(String sqlResource, String statementDelimiter, Map<String,String> replacements, boolean useDataSourceConnection) throws org.bonitasoft.engine.services.SPersistenceException, IOException
doExecuteSQL in class org.bonitasoft.engine.persistence.AbstractDBPersistenceServiceorg.bonitasoft.engine.services.SPersistenceExceptionIOExceptionprotected void flushStatements(boolean useTenant)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionprotected Class<? extends org.bonitasoft.engine.persistence.PersistentObject> getMappedClass(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionprotected String getQueryWithFilters(String query, List<org.bonitasoft.engine.persistence.FilterOption> filters, org.bonitasoft.engine.persistence.SearchFields multipleFilter)
protected org.hibernate.Session getSession(boolean useTenant)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void insert(org.bonitasoft.engine.persistence.PersistentObject entity)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void insertInBatch(List<org.bonitasoft.engine.persistence.PersistentObject> entities) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionprotected void logStats()
protected <T> void logWarningMessage(org.bonitasoft.engine.persistence.SelectListDescriptor<T> selectDescriptor,
org.hibernate.Query query)
public void purge(String classToPurge) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic <T extends org.bonitasoft.engine.persistence.PersistentObject> T selectById(org.bonitasoft.engine.persistence.SelectByIdDescriptor<T> selectDescriptor)
throws org.bonitasoft.engine.persistence.SBonitaReadException
org.bonitasoft.engine.persistence.SBonitaReadExceptionpublic <T> List<T> selectList(org.bonitasoft.engine.persistence.SelectListDescriptor<T> selectDescriptor) throws org.bonitasoft.engine.persistence.SBonitaReadException
org.bonitasoft.engine.persistence.SBonitaReadExceptionpublic <T> T selectOne(org.bonitasoft.engine.persistence.SelectOneDescriptor<T> selectDescriptor)
throws org.bonitasoft.engine.persistence.SBonitaReadException
org.bonitasoft.engine.persistence.SBonitaReadExceptionprotected void setParameters(org.hibernate.Query query,
Map<String,Object> inputParameters)
protected void setQueryCache(org.hibernate.Query query,
String name)
public void update(org.bonitasoft.engine.services.UpdateDescriptor updateDescriptor)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionCopyright © 2014 Bonitasoft S.A.. All Rights Reserved.