Interface ICrudPersistenceAdapter<PersistenceContext,Entity>
-
- Type Parameters:
PersistenceContext
- Type of the persistence context used for accessing the persistence layer.Entity
- Type of the entity on which the CRUD operations are performed.
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IEntityFileSystemPersistenceAdapter<PersistenceContext,Entity,Scope>
- All Known Implementing Classes:
FileEntityPersistenceAdapter
,FileEntityViewPersistenceAdapter
,FileProvidingEntityAdapter
,FormThemeFileViewPersistenceAdapter
public interface ICrudPersistenceAdapter<PersistenceContext,Entity> extends Serializable
A persistence adapter for entities that allows CRUD operations, e.g. create, read, update, delete. All changes must be synchronized immediately with the persistence layer.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Entity
create(PersistenceContext persistenceContext, Entity entity)
Persists the file entity in the database and returns the persisted entity.void
delete(PersistenceContext persistenceContext, Entity entity)
Deletes the file entity and all its children (such as file data).Entity
read(PersistenceContext persistenceContext, Entity entity)
Reads the entity from the persistence layer, returning a fresh version of the entity.Entity
update(PersistenceContext persistenceContext, Entity entity)
Updates the file entity in the persistence layer and returns the updated entity.
-
-
-
Method Detail
-
create
Entity create(PersistenceContext persistenceContext, Entity entity)
Persists the file entity in the database and returns the persisted entity.- Parameters:
persistenceContext
- Persistence context to use for accessing the database.entity
- The entity to create.- Returns:
- The persisted entity.
-
delete
void delete(PersistenceContext persistenceContext, Entity entity)
Deletes the file entity and all its children (such as file data).- Parameters:
persistenceContext
- Persistence context to use for accessing the persistence layer.entity
- The entity to delete.
-
read
Entity read(PersistenceContext persistenceContext, Entity entity)
Reads the entity from the persistence layer, returning a fresh version of the entity.- Parameters:
persistenceContext
- Persistence context to use for accessing the persistence layer.entity
- The entity to read.- Returns:
- The entity read from the persistence layer.
-
update
Entity update(PersistenceContext persistenceContext, Entity entity)
Updates the file entity in the persistence layer and returns the updated entity.- Parameters:
persistenceContext
- Persistence context to use for accessing the database.entity
- The entity to update.- Returns:
- The updated entity.
-
-