Class FilterWhereBuilder


  • public class FilterWhereBuilder
    extends Object
    The Filter Where builder is component intended to be used within subclass of * AbstractFilterTranslator to help create the database WHERE query clause.

    The main functionality of this helper class is create SQL WHERE query clause

    The builder can return a List of params to be used within preparedStatement creation

    Since:
    1.0
    Version:
    $Revision 1.0$
    • Constructor Detail

      • FilterWhereBuilder

        public FilterWhereBuilder()
    • Method Detail

      • getParams

        public List<SQLParam> getParams()
        Returns:
        the params
      • addBind

        public void addBind​(SQLParam param,
                            String operator,
                            boolean lowercase)
        Add name value pair bindings with operator, this is lazy bindings resolved at getWhereClause()
        Parameters:
        param - value to builder
        operator - an operator to compare
        lowercase - whether case-insensitive comparison should be performed
        See Also:
        getWhereClause()
      • addNull

        public void addNull​(String name)
        Add null value.
        Parameters:
        name - of the column
        See Also:
        getWhereClause()
      • isIn

        public boolean isIn()
        There is a need to put the content into brackets
        Returns:
        boolean a in
      • getWhereClause

        public String getWhereClause()
        Returns:
        the where clause as a String