Class AbstractCrudServiceEnvers

java.lang.Object
org.fryske_akademy.services.AbstractCrudService
org.fryske_akademy.services.AbstractCrudServiceEnvers
All Implemented Interfaces:
Auditing, CrudReadService, CrudWriteService

public abstract class AbstractCrudServiceEnvers extends AbstractCrudService implements Auditing
Author:
eduard
  • Constructor Details

    • AbstractCrudServiceEnvers

      public AbstractCrudServiceEnvers()
  • Method Details

    • getRevision

      public <T> T getRevision(Number n, Class<T> type)
      When more revisions of the same entity are found for this revision, the last is returned
      Specified by:
      getRevision in interface Auditing
      Type Parameters:
      T -
      Parameters:
      n -
      type -
      Returns:
    • getRevisionInfo

      public <T> List<RevInfo<T>> getRevisionInfo(Serializable id, Integer max, Class<T> type)
      Description copied from interface: Auditing
      return a list holding revision information, newest come first
      Specified by:
      getRevisionInfo in interface Auditing
      max - the maximum to number of results to return, defaults to 5
      Returns:
    • getRevisionNumbers

      public <T> List<Number> getRevisionNumbers(Serializable id, Class<T> type)
      Description copied from interface: Auditing
      return list of revision numbers, first is the oldest
      Specified by:
      getRevisionNumbers in interface Auditing
      Returns:
    • previousState

      public <T extends EntityInterface> T previousState(Serializable id, Class<T> type, int stepsBack)
      Description copied from interface: Auditing
      Return the state before the last crud operation on an entity, or null when not found (or for insert). This can be used to build undo functionality
      Specified by:
      previousState in interface Auditing
      stepsBack - how may steps back in history, 1 is the first step back
    • changes

      public <E> List<RevInfo<E>> changes(E e, Integer max)
      Specified by:
      changes in interface Auditing
      Returns: