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 |
protected OrderByBuilder |
orderByBuilder |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHibernatePersistenceService(org.hibernate.SessionFactory sessionFactory,
List<Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> classMapping,
Map<String,String> classAliasMappings,
boolean enableWordSearch,
Set<String> wordSearchExclusionMappings,
org.bonitasoft.engine.log.technical.TechnicalLoggerService logger) |
|
AbstractHibernatePersistenceService(String name,
HibernateConfigurationProvider hbmConfigurationProvider,
Properties extraHibernateProperties,
char likeEscapeCharacter,
org.bonitasoft.engine.log.technical.TechnicalLoggerService logger,
SequenceManager sequenceManager,
DataSource datasource,
boolean enableWordSearch,
Set<String> wordSearchExclusionMappings) |
| 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 |
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 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) |
<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 |
setId(org.bonitasoft.engine.persistence.PersistentObject entity) |
protected void |
setParameters(org.hibernate.Query query,
Map<String,Object> inputParameters) |
protected void |
setQueryCache(org.hibernate.Query query,
String name) |
int |
update(String updateQueryName) |
int |
update(String updateQueryName,
Map<String,Object> inputParameters) |
void |
update(org.bonitasoft.engine.services.UpdateDescriptor updateDescriptor) |
getLikeEscapeCharacter, getName, getNumberOfEntities, getNumberOfEntities, getSequenceManager, getTenantId, isWordSearchEnabled, searchEntity, searchEntityprotected final List<Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> classMapping
protected final Map<String,Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> interfaceToClassMapping
protected final OrderByBuilder orderByBuilder
protected AbstractHibernatePersistenceService(org.hibernate.SessionFactory sessionFactory,
List<Class<? extends org.bonitasoft.engine.persistence.PersistentObject>> classMapping,
Map<String,String> classAliasMappings,
boolean enableWordSearch,
Set<String> wordSearchExclusionMappings,
org.bonitasoft.engine.log.technical.TechnicalLoggerService logger)
throws ClassNotFoundException
sessionFactory - classMapping - classAliasMappings - enableWordSearch - wordSearchExclusionMappings - logger - ClassNotFoundExceptionpublic AbstractHibernatePersistenceService(String name, HibernateConfigurationProvider hbmConfigurationProvider, Properties extraHibernateProperties, char likeEscapeCharacter, org.bonitasoft.engine.log.technical.TechnicalLoggerService logger, SequenceManager sequenceManager, DataSource datasource, boolean enableWordSearch, Set<String> wordSearchExclusionMappings) throws org.bonitasoft.engine.services.SPersistenceException, ClassNotFoundException
name - hbmConfigurationProvider - likeEscapeCharacter - logger - sequenceManager - datasource - enableWordSearch - wordSearchExclusionMappings - org.bonitasoft.engine.services.SPersistenceExceptionClassNotFoundExceptionprotected void logStats()
protected org.hibernate.Session getSession(boolean useTenant)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionprotected void flushStatements(boolean useTenant)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionprotected <T> void logWarningMessage(org.bonitasoft.engine.persistence.SelectListDescriptor<T> selectDescriptor,
org.hibernate.Query query)
public void delete(org.bonitasoft.engine.persistence.PersistentObject entity)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic int update(String updateQueryName) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic int update(String updateQueryName, Map<String,Object> inputParameters) 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 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.SPersistenceExceptionpublic void update(org.bonitasoft.engine.services.UpdateDescriptor updateDescriptor)
throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic <T> T selectOne(org.bonitasoft.engine.persistence.SelectOneDescriptor<T> selectDescriptor)
throws org.bonitasoft.engine.persistence.SBonitaReadException
org.bonitasoft.engine.persistence.SBonitaReadExceptionprotected 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 void checkClassMapping(Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) 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.SBonitaReadExceptionprotected void setId(org.bonitasoft.engine.persistence.PersistentObject entity)
throws org.bonitasoft.engine.services.SPersistenceException
setId in class org.bonitasoft.engine.persistence.AbstractDBPersistenceServiceorg.bonitasoft.engine.services.SPersistenceExceptionprotected void setQueryCache(org.hibernate.Query query,
String name)
public <T> List<T> selectList(org.bonitasoft.engine.persistence.SelectListDescriptor<T> selectDescriptor) throws org.bonitasoft.engine.persistence.SBonitaReadException
org.bonitasoft.engine.persistence.SBonitaReadExceptionprotected void setParameters(org.hibernate.Query query,
Map<String,Object> inputParameters)
public 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(List<Long> ids, Class<? extends org.bonitasoft.engine.persistence.PersistentObject> entityClass) throws org.bonitasoft.engine.services.SPersistenceException
org.bonitasoft.engine.services.SPersistenceExceptionpublic void destroy()
Copyright © 2017 Bonitasoft S.A.. All rights reserved.