Package org.hibernate.internal
Class FilterHelper
java.lang.Object
org.hibernate.internal.FilterHelper
Utility methods for dealing with filters.
-
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 void
applyBaseRestrictions
(Consumer<Predicate> predicateConsumer, Restrictable restrictable, TableGroup rootTableGroup, boolean useIdentificationVariable, LoadQueryInfluencers loadQueryInfluencers, SqlAstCreationState astCreationState) void
applyEnabledFilters
(Consumer<Predicate> predicateConsumer, FilterAliasGenerator aliasGenerator, Map<String, Filter> enabledFilters, boolean onlyApplyLoadByKeyFilters, TableGroup tableGroup, SqlAstCreationState creationState) String[]
boolean
isAffectedBy
(Map<String, Filter> enabledFilters) boolean
isAffectedBy
(Map<String, Filter> enabledFilters, boolean onlyApplyForLoadByKey) void
render
(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)
-