public class

FilterImpl

extends Object
implements Serializable Filter
java.lang.Object
   ↳ org.hibernate.impl.FilterImpl

Class Overview

Implementation of FilterImpl. FilterImpl implements the user's view into enabled dynamic filters, allowing them to set filter parameter values.

Summary

Constants
String MARKER
Public Constructors
FilterImpl(FilterDefinition configuration)
Constructs a new FilterImpl.
Public Methods
FilterDefinition getFilterDefinition()
Get the filter definition containing additional information about the filter (such as default-condition and expected parameter names/types).
String getName()
Get the name of this filter.
Object getParameter(String name)
Get the value of the named parameter for the current filter.
Map getParameters()
Filter setParameter(String name, Object value)
Set the named parameter's value for this filter.
Filter setParameterList(String name, Collection values)
Set the named parameter's value list for this filter.
Filter setParameterList(String name, Object[] values)
Set the named parameter's value list for this filter.
void validate()
Perform validation of the filter state.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.Filter

Constants

public static final String MARKER

Constant Value: "$FILTER_PLACEHOLDER$"

Public Constructors

public FilterImpl (FilterDefinition configuration)

Constructs a new FilterImpl.

Parameters
configuration The filter's global configuration.

Public Methods

public FilterDefinition getFilterDefinition ()

Get the filter definition containing additional information about the filter (such as default-condition and expected parameter names/types).

Returns
  • The filter definition

public String getName ()

Get the name of this filter.

Returns
  • This filter's name.

public Object getParameter (String name)

Get the value of the named parameter for the current filter.

Parameters
name The name of the parameter for which to return the value.
Returns
  • The value of the named parameter.

public Map getParameters ()

public Filter setParameter (String name, Object value)

Set the named parameter's value for this filter.

Parameters
name The parameter's name.
value The value to be applied.
Returns
  • This FilterImpl instance (for method chaining).
Throws
IllegalArgumentException Indicates that either the parameter was undefined or that the type of the passed value did not match the configured type.

public Filter setParameterList (String name, Collection values)

Set the named parameter's value list for this filter. Used in conjunction with IN-style filter criteria.

Parameters
name The parameter's name.
values The values to be expanded into an SQL IN list.
Returns
  • This FilterImpl instance (for method chaining).

public Filter setParameterList (String name, Object[] values)

Set the named parameter's value list for this filter. Used in conjunction with IN-style filter criteria.

Parameters
name The parameter's name.
values The values to be expanded into an SQL IN list.
Returns
  • This FilterImpl instance (for method chaining).

public void validate ()

Perform validation of the filter state. This is used to verify the state of the filter after its enablement and before its use.

Throws
HibernateException If the state is not currently valid.