public class VersioningServiceImpl extends java.lang.Object implements VersioningService
Constructor and Description |
---|
VersioningServiceImpl(<any> entityManagerProvider,
ReflectionService reflectionService,
EntityUtils entityUtils) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getAtRevision(java.lang.Class<T> clazz,
long objectId,
java.lang.Number revision) |
<T> T |
getAtRevision(java.lang.Class<T> clazz,
java.lang.Object object,
java.lang.Number revision)
Returns an instance of the given
Object at the given revision. |
AuditReader |
getAuditReader()
Returns the used
AuditReader |
java.util.Set<java.lang.Number> |
getRevisionNumbers(java.lang.Class<?> clazz,
long objectId) |
java.util.Set<java.lang.Number> |
getRevisionNumbers(java.lang.Object object)
Returns a
Set of Number s identified all revisions of the
given Object |
java.util.Set<Revision> |
getRevisions(java.lang.Object object)
|
java.util.Set<Revision> |
getRevisions(java.util.Set<java.lang.Number> revisionNumbers) |
public VersioningServiceImpl(<any> entityManagerProvider, ReflectionService reflectionService, EntityUtils entityUtils)
public <T> T getAtRevision(java.lang.Class<T> clazz, java.lang.Object object, java.lang.Number revision)
VersioningService
Object
at the given revision.
The result gets casted to the Class
TgetAtRevision
in interface VersioningService
T
- The class to cast toclazz
- The Class
objectobject
- The Object
revision
- The revision as a Number
Object
with the data of the given
revisionpublic <T> T getAtRevision(java.lang.Class<T> clazz, long objectId, java.lang.Number revision)
getAtRevision
in interface VersioningService
public AuditReader getAuditReader()
VersioningService
AuditReader
getAuditReader
in interface VersioningService
AuditReader
public java.util.Set<Revision> getRevisions(java.lang.Object object)
VersioningService
getRevisions
in interface VersioningService
object
- The Object
Set
of Revision
spublic java.util.Set<Revision> getRevisions(java.util.Set<java.lang.Number> revisionNumbers)
getRevisions
in interface VersioningService
public java.util.Set<java.lang.Number> getRevisionNumbers(java.lang.Object object)
VersioningService
Set
of Number
s identified all revisions of the
given Object
getRevisionNumbers
in interface VersioningService
object
- The Object
to get the revisions fromSet
holding the revision Number
spublic java.util.Set<java.lang.Number> getRevisionNumbers(java.lang.Class<?> clazz, long objectId)
getRevisionNumbers
in interface VersioningService