Class ThreeEntityQueryGenerator
- java.lang.Object
-
- org.hibernate.envers.internal.entities.mapper.relation.query.AbstractRelationQueryGenerator
-
- org.hibernate.envers.internal.entities.mapper.relation.query.ThreeEntityQueryGenerator
-
- All Implemented Interfaces:
RelationQueryGenerator
public final class ThreeEntityQueryGenerator extends AbstractRelationQueryGenerator
Selects data from a relation middle-table and a two related versions 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 ThreeEntityQueryGenerator(Configuration configuration, String versionsMiddleEntityName, MiddleIdData referencingIdData, MiddleIdData referencedIdData, MiddleIdData indexIdData, boolean revisionTypeInId, String orderByCollectionRole, MiddleComponentData... componentData)
-
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
-
ThreeEntityQueryGenerator
public ThreeEntityQueryGenerator(Configuration configuration, String versionsMiddleEntityName, MiddleIdData referencingIdData, MiddleIdData referencedIdData, MiddleIdData indexIdData, boolean revisionTypeInId, String orderByCollectionRole, MiddleComponentData... componentData)
-
-
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.
-
-