Package org.hibernate.engine.spi
Class FilterDefinition
java.lang.Object
org.hibernate.engine.spi.FilterDefinition
- All Implemented Interfaces:
Serializable
Represents the definition of a
filter
.
This information includes the name of the
filter, along with the names and types of
every parameter of the filter. A filter may optionally have a
default condition.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFilterDefinition
(String name, String defaultCondition, boolean autoEnabled, boolean applyToLoadByKey, @Nullable Map<String, JdbcMapping> explicitParamJaMappings, @Nullable Map<String, ManagedBean<? extends Supplier<?>>> parameterResolverMap) FilterDefinition
(String name, String defaultCondition, @Nullable Map<String, JdbcMapping> explicitParamJaMappings) Construct a new FilterDefinition instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the filter this configuration defines.@Nullable JdbcMapping
getParameterJdbcMapping
(String parameterName) Retrieve the type of the named parameter defined for this filter.Get a set of the parameters defined by this configuration.@Nullable Supplier<?>
getParameterResolver
(String parameterName) boolean
Get a flag that defines if the filter should be applied on direct fetches or not.boolean
Get a flag that defines if the filter should be enabled by default.processArgument
(Object value) Called before binding a JDBC parameter
-
Constructor Details
-
FilterDefinition
public FilterDefinition(String name, String defaultCondition, @Nullable Map<String, JdbcMapping> explicitParamJaMappings) Construct a new FilterDefinition instance.- Parameters:
name
- The name of the filter for which this configuration is in effect.
-
FilterDefinition
public FilterDefinition(String name, String defaultCondition, boolean autoEnabled, boolean applyToLoadByKey, @Nullable Map<String, JdbcMapping> explicitParamJaMappings, @Nullable Map<String, ManagedBean<? extends Supplier<?>>> parameterResolverMap)
-
-
Method Details
-
getFilterName
Get the name of the filter this configuration defines.- Returns:
- The filter name for this configuration.
-
getParameterNames
Get a set of the parameters defined by this configuration.- Returns:
- The parameters named by this configuration.
-
getParameterJdbcMapping
Retrieve the type of the named parameter defined for this filter.- Parameters:
parameterName
- The name of the filter parameter for which to return the type.- Returns:
- The type of the named parameter.
-
getParameterResolver
-
getDefaultFilterCondition
-
isAppliedToLoadByKey
public boolean isAppliedToLoadByKey()Get a flag that defines if the filter should be applied on direct fetches or not.- Returns:
- The flag value.
-
processArgument
Called before binding a JDBC parameter- Parameters:
value
- the argument to the parameter, as set viaFilter.setParameter(String, Object)
- Returns:
- the argument that will actually be bound to the parameter
-
isAutoEnabled
public boolean isAutoEnabled()Get a flag that defines if the filter should be enabled by default.- Returns:
- The flag value.
-