public class FilterImpl extends Object implements Filter, Serializable
Constructor and Description |
---|
FilterImpl(FilterDefinition configuration)
Constructs a new FilterImpl.
|
Modifier and Type | Method and Description |
---|---|
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<String,?> |
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.
|
public static final String MARKER
public FilterImpl(FilterDefinition configuration)
configuration
- The filter's global configuration.public FilterDefinition getFilterDefinition()
Filter
getFilterDefinition
in interface Filter
public String getName()
public Filter setParameter(String name, Object value) throws IllegalArgumentException
setParameter
in interface Filter
name
- The parameter's name.value
- The value to be applied.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) throws HibernateException
setParameterList
in interface Filter
name
- The parameter's name.values
- The values to be expanded into an SQL IN list.HibernateException
public Filter setParameterList(String name, Object[] values) throws IllegalArgumentException
setParameterList
in interface Filter
name
- The parameter's name.values
- The values to be expanded into an SQL IN list.IllegalArgumentException
public Object getParameter(String name)
name
- The name of the parameter for which to return the value.public void validate() throws HibernateException
validate
in interface Filter
HibernateException
- If the state is not currently valid.Copyright © 2020 JBoss by Red Hat. All rights reserved.