Interface ICrudPersistenceAdapter<PersistenceContext,​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.