Package org.bonitasoft.engine.services
Interface PersistenceService
- All Superinterfaces:
ReadPersistenceService
- All Known Implementing Classes:
HibernatePersistenceService
- Author:
- Charles Souillard, Elias Ricken de Medeiros, Celine Souchet, Matthieu Chaffotte
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(long id, Class<? extends PersistentObject> entityClass) Delete a record from the table by id and its class type.voiddelete(List<Long> ids, Class<? extends PersistentObject> entityClass) Delete records from the table.voiddelete(PersistentObject entity) Delete a record from the table by given persistentObject.voiddeleteAll(Class<? extends PersistentObject> entityClass) Delete all records belong to the given entity class from the table.voiddeleteByTenant(Class<? extends PersistentObject> entityClass, List<FilterOption> filters) Delete all elements of a specific table for a specific tenantvoidvoidinsert(PersistentObject entity) Add a record into the table by given persistentObject.voidinsertInBatch(List<? extends PersistentObject> entities) intExecutes a query update.intExecutes a query update.voidupdate(UpdateDescriptor desc) Methods inherited from interface org.bonitasoft.engine.persistence.ReadPersistenceService
getNumberOfEntities, getNumberOfEntities, searchEntity, searchEntity, selectById, selectList, selectOne
-
Method Details
-
insert
Add a record into the table by given persistentObject.- Parameters:
entity-- Throws:
SPersistenceException- Since:
- 6.0
-
insertInBatch
- Parameters:
entities-- Throws:
SPersistenceException
-
delete
Delete a record from the table by given persistentObject.- Parameters:
entity-- Throws:
SPersistenceException- Since:
- 6.0
-
deleteAll
Delete all records belong to the given entity class from the table.- Parameters:
entityClass- The class which extends persistentObject- Throws:
SPersistenceException- Since:
- 6.0
-
update
Executes a query update.- Parameters:
updateQueryName- the name of the declared query that represent the update.- Returns:
- the number of updated rows, as returned by the underlining persistence implementation.
- Throws:
SPersistenceException- if a persistence problem occurs when executing the update query.
-
update
Executes a query update.- Parameters:
updateQueryName-inputParameters-- Returns:
- Throws:
SPersistenceException
-
deleteByTenant
void deleteByTenant(Class<? extends PersistentObject> entityClass, List<FilterOption> filters) throws SPersistenceException Delete all elements of a specific table for a specific tenant- Parameters:
entityClass- Entity class corresponding to the table to emptyfilters- Filters- Throws:
SPersistenceException- Since:
- 6.1
-
update
- Parameters:
desc-- Throws:
SPersistenceException
-
flushStatements
- Throws:
SPersistenceException
-
delete
Delete a record from the table by id and its class type.- Parameters:
id- entity's identityClass- The class which extends persistentObject- Throws:
SPersistenceException- Since:
- 6.0
-
delete
void delete(List<Long> ids, Class<? extends PersistentObject> entityClass) throws SPersistenceException Delete records from the table.- Parameters:
ids- A list contains entity idsentityClass- The class which extends persistentObject- Throws:
SPersistenceException- Since:
- 6.0
-