public interface PersistenceService extends ReadPersistenceService
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.util.List<java.lang.Long> ids,
java.lang.Class<? extends PersistentObject> entityClass)
Delete records from the table.
|
void |
delete(long id,
java.lang.Class<? extends PersistentObject> entityClass)
Delete a record from the table by id and its class type.
|
void |
delete(PersistentObject entity)
Delete a record from the table by given persistentObject.
|
void |
deleteAll(java.lang.Class<? extends PersistentObject> entityClass)
Delete all records belong to the given entity class from the table.
|
void |
deleteByTenant(java.lang.Class<? extends PersistentObject> entityClass,
java.util.List<FilterOption> filters)
Delete all elements of a specific table for a specific tenant
|
void |
flushStatements() |
void |
insert(PersistentObject entity)
Add a record into the table by given persistentObject.
|
void |
insertInBatch(java.util.List<? extends PersistentObject> entities) |
int |
update(java.lang.String updateQueryName)
Executes a query update.
|
int |
update(java.lang.String updateQueryName,
java.util.Map<java.lang.String,java.lang.Object> inputParameters)
Executes a query update.
|
void |
update(UpdateDescriptor desc) |
getName, getNumberOfEntities, getNumberOfEntities, searchEntity, searchEntity, selectById, selectList, selectOnevoid insert(PersistentObject entity) throws SPersistenceException
entity - SPersistenceExceptionvoid insertInBatch(java.util.List<? extends PersistentObject> entities) throws SPersistenceException
entities - SPersistenceExceptionvoid delete(PersistentObject entity) throws SPersistenceException
entity - SPersistenceExceptionvoid deleteAll(java.lang.Class<? extends PersistentObject> entityClass) throws SPersistenceException
entityClass - The class which extends persistentObjectSPersistenceExceptionint update(java.lang.String updateQueryName)
throws SPersistenceException
updateQueryName - the name of the declared query that represent the update.SPersistenceException - if a persistence problem occurs when executing the update query.int update(java.lang.String updateQueryName,
java.util.Map<java.lang.String,java.lang.Object> inputParameters)
throws SPersistenceException
updateQueryName - inputParameters - SPersistenceExceptionvoid deleteByTenant(java.lang.Class<? extends PersistentObject> entityClass, java.util.List<FilterOption> filters) throws SPersistenceException
entityClass - Entity class corresponding to the table to emptyfilters - FiltersSPersistenceExceptionvoid update(UpdateDescriptor desc) throws SPersistenceException
desc - SPersistenceExceptionvoid flushStatements()
throws SPersistenceException
SPersistenceExceptionvoid delete(long id,
java.lang.Class<? extends PersistentObject> entityClass)
throws SPersistenceException
id - entity's identityClass - The class which extends persistentObjectSPersistenceExceptionvoid delete(java.util.List<java.lang.Long> ids,
java.lang.Class<? extends PersistentObject> entityClass)
throws SPersistenceException
ids - A list contains entity idsentityClass - The class which extends persistentObjectSPersistenceException