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

    Modifier and Type
    Method
    Description
    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).
    read(PersistenceContext persistenceContext, Entity entity)
    Reads the entity from the persistence layer, returning a fresh version of the entity.
    update(PersistenceContext persistenceContext, Entity entity)
    Updates the file entity in the persistence layer and returns the updated entity.
  • Method Details

    • 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.