Package org.hibernate.internal
Class FilterHelper
java.lang.Object
org.hibernate.internal.FilterHelper
Implementation of FilterHelper.
- Author:
- Steve Ebersole, Rob Worsnop, Nathan Xu
-
Constructor Summary
ConstructorsConstructorDescriptionFilterHelper(List<FilterConfiguration> filters, Map<String, String> tableToEntityName, SessionFactoryImplementor factory) The map of defined filters.FilterHelper(List<FilterConfiguration> filters, SessionFactoryImplementor factory) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyBaseRestrictions(Consumer<Predicate> predicateConsumer, Restrictable restrictable, TableGroup rootTableGroup, boolean useIdentificationVariable, LoadQueryInfluencers loadQueryInfluencers, SqlAstCreationState astCreationState) voidapplyEnabledFilters(Consumer<Predicate> predicateConsumer, FilterAliasGenerator aliasGenerator, Map<String, Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, TableGroup tableGroup, SqlAstCreationState creationState) String[]booleanisAffectedBy(Map<String, Filter> enabledFilters) booleanisAffectedBy(Map<String, Filter> enabledFilters, boolean onlyApplyForLoadByKey) voidrender(StringBuilder buffer, FilterAliasGenerator aliasGenerator, Map<String, Filter> enabledFilters) render(FilterAliasGenerator aliasGenerator, Map<String, Filter> enabledFilters)
-
Constructor Details
-
FilterHelper
-
FilterHelper
public FilterHelper(List<FilterConfiguration> filters, Map<String, String> tableToEntityName, SessionFactoryImplementor factory) The map of defined filters. This is expected to be in format where the filter names are the map keys, and the defined conditions are the values.- Parameters:
filters- The map of defined filters.factory- The session factory
-
-
Method Details
-
getFilterNames
-
isAffectedBy
-
isAffectedBy
-
applyBaseRestrictions
public static void applyBaseRestrictions(Consumer<Predicate> predicateConsumer, Restrictable restrictable, TableGroup rootTableGroup, boolean useIdentificationVariable, LoadQueryInfluencers loadQueryInfluencers, SqlAstCreationState astCreationState) -
applyEnabledFilters
public void applyEnabledFilters(Consumer<Predicate> predicateConsumer, FilterAliasGenerator aliasGenerator, Map<String, Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, TableGroup tableGroup, SqlAstCreationState creationState) -
render
-
render
public void render(StringBuilder buffer, FilterAliasGenerator aliasGenerator, Map<String, Filter> enabledFilters)
-