Package org.fryske_akademy.services
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.fryske_akademy.services.CrudReadService
CrudReadService.SORTORDER
-
-
Field Summary
-
Fields inherited from class org.fryske_akademy.services.AbstractCrudService
DEFAULT_PAGE_SIZE, EDITORROLE
-
-
Constructor Summary
Constructors Constructor Description AbstractCrudServiceEnvers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E> List<RevInfo<E>>changes(E e, Integer max)<T> TgetRevision(Number n, Class<T> type)When more revisions of the same entity are found for this revision, the last is returned<T> List<RevInfo<T>>getRevisionInfo(Serializable id, Integer max, Class<T> type)return a list holding revision information, newest come first<T> List<Number>getRevisionNumbers(Serializable id, Class<T> type)return list of revision numbers, first is the oldest<T extends EntityInterface>
TpreviousState(Serializable id, Class<T> type, int stepsBack)Return the state before the last crud operation on an entity, or null when not found (or for insert).-
Methods inherited from class org.fryske_akademy.services.AbstractCrudService
batchDelete, batchSave, count, countDynamic, create, delete, find, find, find, findAll, findDynamic, findExactlyOne, findNative, findNative, findOne, getDefaultPageSize, getJpqlBuilder, refresh, save, setJpqlBuilder, stream, streamAll, streamDynamic, streamNative, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fryske_akademy.services.CrudReadService
count, countDynamic, find, find, find, findAll, findDynamic, findExactlyOne, findNative, findNative, findOne, getDefaultPageSize, stream, streamAll, streamDynamic, streamNative
-
Methods inherited from interface org.fryske_akademy.services.CrudWriteService
getEntityManager
-
-
-
-
Method Detail
-
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:
getRevisionin interfaceAuditing- 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:Auditingreturn a list holding revision information, newest come first- Specified by:
getRevisionInfoin interfaceAuditingmax- 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:Auditingreturn list of revision numbers, first is the oldest- Specified by:
getRevisionNumbersin interfaceAuditing- Returns:
-
previousState
public <T extends EntityInterface> T previousState(Serializable id, Class<T> type, int stepsBack)
Description copied from interface:AuditingReturn 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:
previousStatein interfaceAuditingstepsBack- how may steps back in history, 1 is the first step back
-
-