类 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

        public FilterImpl​(FilterDefinition configuration)
        Constructs a new FilterImpl.
        参数:
        configuration - The filter's global configuration.
    • 方法详细资料

      • getFilterDefinition

        public FilterDefinition getFilterDefinition()
        从接口复制的说明: Filter
        Get 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.
        指定者:
        getName 在接口中 Filter
        返回:
        This filter's name.
      • getParameters

        public Map<String,​?> getParameters()
      • 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 HibernateException
        Perform 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.