Class OneEntityQueryGenerator
- java.lang.Object
-
- org.hibernate.envers.internal.entities.mapper.relation.query.AbstractRelationQueryGenerator
-
- org.hibernate.envers.internal.entities.mapper.relation.query.OneEntityQueryGenerator
-
- All Implemented Interfaces:
RelationQueryGenerator
public final class OneEntityQueryGenerator extends AbstractRelationQueryGenerator
Selects data from a relation middle-table only.
-
-
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 OneEntityQueryGenerator(Configuration configuration, String versionsMiddleEntityName, MiddleIdData referencingIdData, boolean revisionTypeInId, 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
-
OneEntityQueryGenerator
public OneEntityQueryGenerator(Configuration configuration, String versionsMiddleEntityName, MiddleIdData referencingIdData, boolean revisionTypeInId, 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.
-
-