public class AuditQueryCreator extends Object
| Constructor and Description |
|---|
AuditQueryCreator(org.hibernate.envers.boot.internal.EnversService enversService,
org.hibernate.envers.internal.reader.AuditReaderImplementor auditReaderImplementor) |
| Modifier and Type | Method and Description |
|---|---|
AuditQuery |
forEntitiesAtRevision(Class<?> c,
Number revision)
Creates a query, which will return entities satisfying some conditions (specified later),
at a given revision.
|
AuditQuery |
forEntitiesAtRevision(Class<?> c,
String entityName,
Number revision)
Creates a query, which will return entities satisfying some conditions (specified later),
at a given revision and a given entityName.
|
AuditQuery |
forEntitiesAtRevision(Class<?> c,
String entityName,
Number revision,
boolean includeDeletions)
Creates a query, which will return entities satisfying some conditions (specified later),
at a given revision and a given entityName.
|
AuditQuery |
forEntitiesModifiedAtRevision(Class<?> c,
Number revision)
Creates a query, which will return entities modified at the specified revision.
|
AuditQuery |
forEntitiesModifiedAtRevision(Class<?> c,
String entityName,
Number revision)
Creates a query, which will return entities modified at the specified revision.
|
AuditQuery |
forRevisionsOfEntity(Class<?> c,
boolean selectEntitiesOnly,
boolean selectDeletedEntities)
Creates a query, which selects the revisions, at which the given entity was modified.
|
AuditQuery |
forRevisionsOfEntity(Class<?> c,
String entityName,
boolean selectEntitiesOnly,
boolean selectDeletedEntities)
Creates a query, which selects the revisions, at which the given entity was modified and with a given entityName.
|
public AuditQueryCreator(org.hibernate.envers.boot.internal.EnversService enversService,
org.hibernate.envers.internal.reader.AuditReaderImplementor auditReaderImplementor)
public AuditQuery forEntitiesAtRevision(Class<?> c, Number revision)
Creates a query, which will return entities satisfying some conditions (specified later), at a given revision. Deleted entities are not included.
c - Class of the entities for which to query.revision - Revision number at which to execute the query.public AuditQuery forEntitiesAtRevision(Class<?> c, String entityName, Number revision)
Creates a query, which will return entities satisfying some conditions (specified later), at a given revision and a given entityName. Deleted entities are not included.
c - Class of the entities for which to query.entityName - Name of the entity (if can’t be guessed basing on the c).revision - Revision number at which to execute the query.public AuditQuery forEntitiesAtRevision(Class<?> c, String entityName, Number revision, boolean includeDeletions)
Creates a query, which will return entities satisfying some conditions (specified later), at a given revision and a given entityName. Deleted entities may be optionally included.
c - Class of the entities for which to query.entityName - Name of the entity (if can’t be guessed basing on the c).revision - Revision number at which to execute the query.includeDeletions - Whether to include deleted entities in the search.public AuditQuery forEntitiesModifiedAtRevision(Class<?> c, String entityName, Number revision)
Creates a query, which will return entities modified at the specified revision.
<p/>
In comparison, the forEntitiesAtRevision(Class, String, Number) query takes into all entities
which were present at a given revision, even if they were not modified.
c - Class of the entities for which to query.entityName - Name of the entity (if can’t be guessed basing on the c).revision - Revision number at which to execute the query.forEntitiesAtRevision(Class, String, Number)public AuditQuery forEntitiesModifiedAtRevision(Class<?> c, Number revision)
Creates a query, which will return entities modified at the specified revision.
<p/>
In comparison, the forEntitiesAtRevision(Class, String, Number) query takes into all entities
which were present at a given revision, even if they were not modified.
c - Class of the entities for which to query.revision - Revision number at which to execute the query.forEntitiesAtRevision(Class, Number)public AuditQuery forRevisionsOfEntity(Class<?> c, boolean selectEntitiesOnly, boolean selectDeletedEntities)
Creates a query, which selects the revisions, at which the given entity was modified.
Unless an explicit projection is set, the result will be a list of three-element arrays, containing:
<ol>
<li>the entity instance</li>
<li>revision entity, corresponding to the revision at which the entity was modified. If no custom
revision entity is used, this will be an instance of DefaultRevisionEntity</li>
<li>type of the revision (an enum instance of class RevisionType)</li>.
</ol>
Additional conditions that the results must satisfy may be specified.
c - Class of the entities for which to query.selectEntitiesOnly - If true, instead of a list of three-element arrays, a list of entities will be
returned as a result of executing this query.selectDeletedEntities - If true, also revisions where entities were deleted will be returned. The additional
entities will have revision type "delete", and contain no data (all fields null), except for the id field.public AuditQuery forRevisionsOfEntity(Class<?> c, String entityName, boolean selectEntitiesOnly, boolean selectDeletedEntities)
Creates a query, which selects the revisions, at which the given entity was modified and with a given entityName.
Unless an explicit projection is set, the result will be a list of three-element arrays, containing:
<ol>
<li>the entity instance</li>
<li>revision entity, corresponding to the revision at which the entity was modified. If no custom
revision entity is used, this will be an instance of DefaultRevisionEntity</li>
<li>type of the revision (an enum instance of class RevisionType)</li>.
</ol>
Additional conditions that the results must satisfy may be specified.
c - Class of the entities for which to query.entityName - Name of the entity (if can’t be guessed basing on the c).selectEntitiesOnly - If true, instead of a list of three-element arrays, a list of entities will be
returned as a result of executing this query.selectDeletedEntities - If true, also revisions where entities were deleted will be returned. The additional
entities will have revision type "delete", and contain no data (all fields null), except for the id field.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.