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.<T extends PersistentObject>
voiddelete(T 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.voiddeleteAll(Class<? extends PersistentObject> entityClass, List<FilterOption> filters) Delete all elements of a specific tablevoid<T extends PersistentObject>
Tinsert(T entity) Add a record into the table by given PersistentObject.<T extends PersistentObject>
List<T>insertInBatch(List<T> 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.- Throws:
SPersistenceException- Since:
- 6.0
-
insertInBatch
- Throws:
SPersistenceException
-
delete
Delete a record from the table by given PersistentObject.- 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.- Throws:
SPersistenceException
-
deleteAll
void deleteAll(Class<? extends PersistentObject> entityClass, List<FilterOption> filters) throws SPersistenceException Delete all elements of a specific table- Parameters:
entityClass- Entity class corresponding to the table to emptyfilters- filter options to restrict the deletion- Throws:
SPersistenceException- Since:
- 6.1
-
update
- 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
-