|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VersionsReader
AuditReader| Method Summary | ||
|---|---|---|
VersionsQueryCreator |
createQuery()
Deprecated. |
|
|
find(Class<T> cls,
Object primaryKey,
Number revision)
Deprecated. Find an entity by primary key at the given revision. |
|
|
findRevision(Class<T> revisionEntityClass,
Number revision)
Deprecated. A helper method; should be used only if a custom revision entity is used. |
|
Date |
getRevisionDate(Number revision)
Deprecated. Get the date, at which a revision was created. |
|
Number |
getRevisionNumberForDate(Date date)
Deprecated. Gets the revision number, that corresponds to the given date. |
|
List<Number> |
getRevisions(Class<?> cls,
Object primaryKey)
Deprecated. Get a list of revision numbers, at which an entity was modified. |
|
| Method Detail |
|---|
<T> T find(Class<T> cls,
Object primaryKey,
Number revision)
throws IllegalArgumentException,
NotVersionedException,
IllegalStateException
AuditReader
find in interface AuditReadercls - Class of the entity.primaryKey - Primary key of the entity.revision - Revision in which to get the entity.
IllegalArgumentException - If cls or primaryKey is null or revision is less or equal to 0.
NotAuditedException - When entities of the given class are not audited.
IllegalStateException - If the associated entity manager is closed.
NotVersionedException
List<Number> getRevisions(Class<?> cls,
Object primaryKey)
throws IllegalArgumentException,
NotVersionedException,
IllegalStateException
AuditReader
getRevisions in interface AuditReadercls - Class of the entity.primaryKey - Primary key of the entity.
IllegalArgumentException - If cls or primaryKey is null.
NotAuditedException - When entities of the given class are not audited.
IllegalStateException - If the associated entity manager is closed.
NotVersionedException
Date getRevisionDate(Number revision)
throws IllegalArgumentException,
RevisionDoesNotExistException,
IllegalStateException
AuditReader
getRevisionDate in interface AuditReaderrevision - Number of the revision for which to get the date.
IllegalArgumentException - If revision is less or equal to 0.
RevisionDoesNotExistException - If the revision does not exist.
IllegalStateException - If the associated entity manager is closed.
RevisionDoesNotExistException
Number getRevisionNumberForDate(Date date)
throws IllegalStateException,
RevisionDoesNotExistException,
IllegalArgumentException
AuditReadergetRevisionDate(getRevisionNumberForDate(date)) <= date and
getRevisionDate(getRevisionNumberForDate(date)+1) > date.
getRevisionNumberForDate in interface AuditReaderdate - Date for which to get the revision.
IllegalStateException - If the associated entity manager is closed.
RevisionDoesNotExistException - If the given date is before the first revision.
IllegalArgumentException - If date is null.
RevisionDoesNotExistException
<T> T findRevision(Class<T> revisionEntityClass,
Number revision)
throws IllegalArgumentException,
RevisionDoesNotExistException,
IllegalStateException
AuditReaderRevisionEntity.
findRevision in interface AuditReaderrevisionEntityClass - Class of the revision entity. Should be annotated with RevisionEntity.revision - Number of the revision for which to get the data.
IllegalArgumentException - If revision is less or equal to 0 or if the class of the revision entity
is invalid.
RevisionDoesNotExistException - If the revision does not exist.
IllegalStateException - If the associated entity manager is closed.
RevisionDoesNotExistExceptionVersionsQueryCreator createQuery()
createQuery in interface AuditReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||