类 FilterImpl
- java.lang.Object
-
- org.hibernate.internal.FilterImpl
-
- 所有已实现的接口:
Serializable,Filter
public class FilterImpl extends Object implements Filter, Serializable
Implementation of FilterImpl. FilterImpl implements the user's view into enabled dynamic filters, allowing them to set filter parameter values.- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 FilterImpl(FilterDefinition configuration)Constructs a new FilterImpl.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 FilterDefinitiongetFilterDefinition()Get the filter definition containing additional information about the filter (such as default-condition and expected parameter names/types).StringgetName()Get the name of this filter.ObjectgetParameter(String name)Get the value of the named parameter for the current filter.Map<String,?>getParameters()FiltersetParameter(String name, Object value)Set the named parameter's value for this filter.FiltersetParameterList(String name, Object[] values)Set the named parameter's value list for this filter.FiltersetParameterList(String name, Collection values)Set the named parameter's value list for this filter.voidvalidate()Perform validation of the filter state.
-
-
-
构造器详细资料
-
FilterImpl
public FilterImpl(FilterDefinition configuration)
Constructs a new FilterImpl.- 参数:
configuration- The filter's global configuration.
-
-
方法详细资料
-
getFilterDefinition
public FilterDefinition getFilterDefinition()
从接口复制的说明:FilterGet the filter definition containing additional information about the filter (such as default-condition and expected parameter names/types).- 指定者:
getFilterDefinition在接口中Filter- 返回:
- The filter definition
-
getName
public String getName()
Get the name of this filter.
-
setParameter
public Filter setParameter(String name, Object value) throws IllegalArgumentException
Set the named parameter's value for this filter.- 指定者:
setParameter在接口中Filter- 参数:
name- The parameter's name.value- The value to be applied.- 返回:
- This FilterImpl instance (for method chaining).
- 抛出:
IllegalArgumentException- Indicates that either the parameter was undefined or that the type of the passed value did not match the configured type.
-
setParameterList
public Filter setParameterList(String name, Collection values) throws HibernateException
Set the named parameter's value list for this filter. Used in conjunction with IN-style filter criteria.- 指定者:
setParameterList在接口中Filter- 参数:
name- The parameter's name.values- The values to be expanded into an SQL IN list.- 返回:
- This FilterImpl instance (for method chaining).
- 抛出:
HibernateException
-
setParameterList
public Filter setParameterList(String name, Object[] values) throws IllegalArgumentException
Set the named parameter's value list for this filter. Used in conjunction with IN-style filter criteria.- 指定者:
setParameterList在接口中Filter- 参数:
name- The parameter's name.values- The values to be expanded into an SQL IN list.- 返回:
- This FilterImpl instance (for method chaining).
- 抛出:
IllegalArgumentException
-
getParameter
public Object getParameter(String name)
Get the value of the named parameter for the current filter.- 参数:
name- The name of the parameter for which to return the value.- 返回:
- The value of the named parameter.
-
validate
public void validate() throws HibernateExceptionPerform validation of the filter state. This is used to verify the state of the filter after its enablement and before its use.- 指定者:
validate在接口中Filter- 抛出:
HibernateException- If the state is not currently valid.
-
-