Class AbstractAuditQuery
java.lang.Object
org.hibernate.envers.query.internal.impl.AbstractAuditQuery
- All Implemented Interfaces:
AuditQuery
- Direct Known Subclasses:
EntitiesAtRevisionQuery
,EntitiesModifiedAtRevisionQuery
,RevisionsOfEntityQuery
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<AbstractAuditAssociationQuery<?>>
protected final Map<String,
AbstractAuditAssociationQuery<org.hibernate.envers.query.internal.impl.AuditQueryImplementor>> protected List<AuditCriterion>
protected String
protected EntityInstantiator
protected String
protected final EnversService
protected boolean
protected final List<Pair<String,
AuditProjection>> protected QueryBuilder
protected String
protected final AuditReaderImplementor
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAuditQuery
(EnversService enversService, AuditReaderImplementor versionsReader, Class<?> cls) protected
AbstractAuditQuery
(EnversService enversService, AuditReaderImplementor versionsReader, Class<?> cls, String entityName) -
Method Summary
Modifier and TypeMethodDescriptionadd
(AuditCriterion criterion) protected void
addAssociationQuery
(String associationName, AbstractAuditAssociationQuery<org.hibernate.envers.query.internal.impl.AuditQueryImplementor> query) addOrder
(AuditOrder order) addProjection
(AuditProjection projection) protected List
applyProjections
(List queryResult, Number revision) protected List
protected Query
getAlias()
protected EntityConfiguration
protected String
protected boolean
abstract List
list()
void
registerProjection
(String entityName, AuditProjection projection) setCacheable
(boolean cacheable) setCacheMode
(CacheMode cacheMode) setCacheRegion
(String cacheRegion) setComment
(String comment) setFirstResult
(int firstResult) setFlushMode
(FlushMode flushMode) setLockMode
(LockMode lockMode) Deprecated.Instead use setLockOptionssetLockOptions
(LockOptions lockOptions) Set lock optionssetMaxResults
(int maxResults) protected void
setQueryProperties
(Query query) setTimeout
(int timeout) AuditAssociationQuery<? extends AuditQuery>
traverseRelation
(String associationName, JoinType joinType) AuditAssociationQuery<? extends AuditQuery>
traverseRelation
(String associationName, JoinType joinType, String alias) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.envers.query.AuditQuery
traverseRelation
-
Field Details
-
entityInstantiator
-
criterions
-
entityName
-
entityClassName
-
versionsEntityName
-
qb
-
aliasToEntityNameMap
-
aliasToComponentPropertyNameMap
-
hasOrder
protected boolean hasOrder -
enversService
-
versionsReader
-
associationQueries
-
associationQueryMap
protected final Map<String,AbstractAuditAssociationQuery<org.hibernate.envers.query.internal.impl.AuditQueryImplementor>> associationQueryMap -
projections
-
-
Constructor Details
-
AbstractAuditQuery
protected AbstractAuditQuery(EnversService enversService, AuditReaderImplementor versionsReader, Class<?> cls) -
AbstractAuditQuery
protected AbstractAuditQuery(EnversService enversService, AuditReaderImplementor versionsReader, Class<?> cls, String entityName)
-
-
Method Details
-
getAlias
- Specified by:
getAlias
in interfaceAuditQuery
-
buildQuery
-
buildAndExecuteQuery
-
list
- Throws:
AuditException
-
getResultList
- Specified by:
getResultList
in interfaceAuditQuery
- Throws:
AuditException
-
getSingleResult
- Specified by:
getSingleResult
in interfaceAuditQuery
- Throws:
AuditException
NonUniqueResultException
NoResultException
-
add
- Specified by:
add
in interfaceAuditQuery
-
addProjection
- Specified by:
addProjection
in interfaceAuditQuery
-
registerProjection
-
hasProjection
protected boolean hasProjection() -
addOrder
- Specified by:
addOrder
in interfaceAuditQuery
-
traverseRelation
public AuditAssociationQuery<? extends AuditQuery> traverseRelation(String associationName, JoinType joinType) - Specified by:
traverseRelation
in interfaceAuditQuery
-
traverseRelation
public AuditAssociationQuery<? extends AuditQuery> traverseRelation(String associationName, JoinType joinType, String alias) - Specified by:
traverseRelation
in interfaceAuditQuery
-
setMaxResults
- Specified by:
setMaxResults
in interfaceAuditQuery
-
setFirstResult
- Specified by:
setFirstResult
in interfaceAuditQuery
-
setCacheable
- Specified by:
setCacheable
in interfaceAuditQuery
-
setCacheRegion
- Specified by:
setCacheRegion
in interfaceAuditQuery
-
setComment
- Specified by:
setComment
in interfaceAuditQuery
-
setFlushMode
- Specified by:
setFlushMode
in interfaceAuditQuery
-
setCacheMode
- Specified by:
setCacheMode
in interfaceAuditQuery
-
setTimeout
- Specified by:
setTimeout
in interfaceAuditQuery
-
setLockMode
Deprecated.Instead use setLockOptionsSet lock mode- Specified by:
setLockMode
in interfaceAuditQuery
- Parameters:
lockMode
- TheLockMode
used for this query.- Returns:
- this object
-
setLockOptions
Set lock options- Parameters:
lockOptions
- The @{link LockOptions} used for this query.- Returns:
- this object
-
setQueryProperties
-
applyProjections
-
getEntityConfiguration
-
getEntityName
-
addAssociationQuery
protected void addAssociationQuery(String associationName, AbstractAuditAssociationQuery<org.hibernate.envers.query.internal.impl.AuditQueryImplementor> query)
-