Class BaseFilter<T>

    • Field Detail

      • m_filterName

        protected String m_filterName
      • m_sqlType

        protected SQLType<T> m_sqlType
    • Constructor Detail

      • BaseFilter

        public BaseFilter​(String filterType,
                          SQLType<T> sqlType,
                          String fieldName,
                          String propertyName)

        Constructor for BaseFilter.

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

      • getSQLFieldName

        public String getSQLFieldName()

        getSQLFieldName

        Returns:
        a String object.
      • getPropertyName

        public String getPropertyName()

        getPropertyName

        Returns:
        a String object.
      • formatValue

        public String formatValue​(T value)

        formatValue

        Parameters:
        value - a T object.
        Returns:
        a String object.
      • getValueAsString

        public final String getValueAsString​(T value)

        getValueAsString

        Parameters:
        value - a T object.
        Returns:
        a String object.
      • getValueString

        public abstract String getValueString()

        getValueString

        Returns:
        a String object.
      • getCriterion

        public abstract org.hibernate.criterion.Criterion getCriterion()

        getCriterion

        Specified by:
        getCriterion in interface Filter
        Returns:
        a Criterion object.
      • bindParam

        public abstract 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
        Parameters:
        ps - a PreparedStatement object.
        parameterIndex - a int.
        Returns:
        a int.
        Throws:
        SQLException - if any.