Class MultiArgFilter<T>

  • All Implemented Interfaces:
    Filter
    Direct Known Subclasses:
    BetweenFilter, InFilter

    public abstract class MultiArgFilter<T>
    extends BaseFilter<T>
    TwoArgFilter
    Since:
    1.8.1
    Version:
    $Id: $
    Author:
    brozow
    • Constructor Detail

      • MultiArgFilter

        public MultiArgFilter​(String filterType,
                              SQLType<T> sqlType,
                              String fieldName,
                              String propertyName,
                              T[] values)

        Constructor for MultiArgFilter.

        Type Parameters:
        T - a T object.
        Parameters:
        filterType - a String object.
        sqlType - a SQLType object.
        fieldName - a String object.
        propertyName - a String object.
        values - an array of T objects.
    • Method Detail

      • getValues

        public T[] getValues()

        getValues

        Returns:
        an array of T objects.
      • getValuesAsList

        public List<T> getValuesAsList()

        getValuesAsList

        Returns:
        a List object.
      • getSQLTemplate

        public abstract String getSQLTemplate()

        getSQLTemplate

        Returns:
        a String object.
      • bindParam

        public final int bindParam​(PreparedStatement ps,
                                   int parameterIndex)
                            throws SQLException
        Binds the parameter values corresponding to the ? tokens in the string returned from getParamSql() to a prepared statement. Returns the number of parameters that were bound.
        Specified by:
        bindParam in interface Filter
        Specified by:
        bindParam in class BaseFilter<T>
        Parameters:
        ps - a PreparedStatement object.
        parameterIndex - a int.
        Returns:
        a int.
        Throws:
        SQLException - if any.