Class OneArgFilter<T>

    • Constructor Detail

      • OneArgFilter

        public OneArgFilter​(java.lang.String filterType,
                            SQLType<T> sqlType,
                            java.lang.String fieldName,
                            java.lang.String propertyName,
                            T value)

        Constructor for OneArgFilter.

        Type Parameters:
        T - a T object.
        Parameters:
        filterType - a String object.
        sqlType - a SQLType object.
        fieldName - a String object.
        propertyName - a String object.
        value - a T object.
    • Method Detail

      • getValue

        public final T getValue()

        getValue

        Returns:
        a T object.
      • getSQLTemplate

        public abstract java.lang.String getSQLTemplate()

        getSQLTemplate

        Returns:
        a String object.
      • getBoundValue

        public T getBoundValue​(T value)

        getBoundValue

        Parameters:
        value - a T object.
        Returns:
        a T object.
      • bindParam

        public final int bindParam​(java.sql.PreparedStatement ps,
                                   int parameterIndex)
                            throws java.sql.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:
        java.sql.SQLException - if any.
      • getValueString

        public final java.lang.String getValueString()

        getValueString

        Specified by:
        getValueString in class BaseFilter<T>
        Returns:
        a String object.
      • getParamSql

        public final java.lang.String getParamSql()

        getParamSql

        Specified by:
        getParamSql in interface Filter
        Specified by:
        getParamSql in class BaseFilter<T>
        Returns:
        a String object.
      • getSql

        public final java.lang.String getSql()

        getSql

        Specified by:
        getSql in interface Filter
        Specified by:
        getSql in class BaseFilter<T>
        Returns:
        a String object.