Class OneAuditEntityQueryGenerator
- java.lang.Object
-
- org.hibernate.envers.internal.entities.mapper.relation.query.AbstractRelationQueryGenerator
-
- org.hibernate.envers.internal.entities.mapper.relation.query.OneAuditEntityQueryGenerator
-
- All Implemented Interfaces:
RelationQueryGenerator
public final class OneAuditEntityQueryGenerator extends AbstractRelationQueryGenerator
Selects data from an audit entity.
-
-
Field Summary
-
Fields inherited from class org.hibernate.envers.internal.entities.mapper.relation.query.AbstractRelationQueryGenerator
auditStrategy, configuration, entityName, orderByCollectionRole, referencingIdData, revisionTypeInId
-
-
Constructor Summary
Constructors Constructor Description OneAuditEntityQueryGenerator(Configuration configuration, MiddleIdData referencingIdData, String referencedEntityName, MiddleIdData referencedIdData, boolean revisionTypeInId, String mappedBy, boolean mappedByKey, String orderByCollectionRole)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyValidAndRemovePredicates(QueryBuilder remQb)
Apply predicates to fetch data and deletions that took place during the same revision.protected void
applyValidPredicates(QueryBuilder qb, Parameters rootParameters, boolean inclusive)
Apply predicates used to fetch actual data.protected QueryBuilder
buildQueryBuilderCommon(SessionFactoryImplementor sessionFactory)
Build the common aspects of aQueryBuilder
used by both query and query-remove strings.-
Methods inherited from class org.hibernate.envers.internal.entities.mapper.relation.query.AbstractRelationQueryGenerator
getQuery, getRevisionTypePath
-
-
-
-
Constructor Detail
-
OneAuditEntityQueryGenerator
public OneAuditEntityQueryGenerator(Configuration configuration, MiddleIdData referencingIdData, String referencedEntityName, MiddleIdData referencedIdData, boolean revisionTypeInId, String mappedBy, boolean mappedByKey, String orderByCollectionRole)
-
-
Method Detail
-
buildQueryBuilderCommon
protected QueryBuilder buildQueryBuilderCommon(SessionFactoryImplementor sessionFactory)
Description copied from class:AbstractRelationQueryGenerator
Build the common aspects of aQueryBuilder
used by both query and query-remove strings.- Specified by:
buildQueryBuilderCommon
in classAbstractRelationQueryGenerator
- Parameters:
sessionFactory
- The session factory.- Returns:
- The constructed query builder instance.
-
applyValidPredicates
protected void applyValidPredicates(QueryBuilder qb, Parameters rootParameters, boolean inclusive)
Description copied from class:AbstractRelationQueryGenerator
Apply predicates used to fetch actual data.- Specified by:
applyValidPredicates
in classAbstractRelationQueryGenerator
- Parameters:
qb
- The query builder instance to apply predicates against.rootParameters
- The root query parametersinclusive
- Whether its inclusive or not.
-
applyValidAndRemovePredicates
protected void applyValidAndRemovePredicates(QueryBuilder remQb)
Description copied from class:AbstractRelationQueryGenerator
Apply predicates to fetch data and deletions that took place during the same revision.- Specified by:
applyValidAndRemovePredicates
in classAbstractRelationQueryGenerator
- Parameters:
remQb
- The query builder instance to apply predicates against.
-
-