Package org.hibernate.internal
Class FilterHelper
- java.lang.Object
-
- org.hibernate.internal.FilterHelper
-
public class FilterHelper extends Object
Implementation of FilterHelper.
-
-
Constructor Summary
Constructors Constructor Description FilterHelper(List<FilterConfiguration> filters, Map<String,String> tableToEntityName, SessionFactoryImplementor factory)The map of defined filters.FilterHelper(List<FilterConfiguration> filters, SessionFactoryImplementor factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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[]getFilterNames()booleanisAffectedBy(Map<String,Filter> enabledFilters)booleanisAffectedBy(Map<String,Filter> enabledFilters, boolean onlyApplyForLoadByKey)voidrender(StringBuilder buffer, FilterAliasGenerator aliasGenerator, Map<String,Filter> enabledFilters)Stringrender(FilterAliasGenerator aliasGenerator, Map<String,Filter> enabledFilters)
-
-
-
Constructor Detail
-
FilterHelper
public FilterHelper(List<FilterConfiguration> filters, SessionFactoryImplementor factory)
-
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 Detail
-
getFilterNames
public String[] getFilterNames()
-
isAffectedBy
public boolean isAffectedBy(Map<String,Filter> enabledFilters, boolean onlyApplyForLoadByKey)
-
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
public String render(FilterAliasGenerator aliasGenerator, Map<String,Filter> enabledFilters)
-
render
public void render(StringBuilder buffer, FilterAliasGenerator aliasGenerator, Map<String,Filter> enabledFilters)
-
-