psdi.util

Class CombineWhereClauses

  • java.lang.Object
    • psdi.util.CombineWhereClauses


  • public class CombineWhereClauses
    extends java.lang.Object
    Standarizes and eases the building of where clauses. Assumes all where clauses added are to be and'ed together. Empty or null where clauses are ignored. If there are multiple where clauses, they are put into parathesis and joined by the AND operator.

    Created on Friday, February 09, 2001

    • Constructor Summary

      Constructors 
      Constructor and Description
      CombineWhereClauses()
      Can construct with no initial where clause
      CombineWhereClauses(java.lang.String firstWhere)
      The first where clause can be null.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addWhere(java.lang.String clause)
      Supply where clauses to combine.
      java.lang.String getWhereClause()
      Builds the combined where clause.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CombineWhereClauses

        public CombineWhereClauses(java.lang.String firstWhere)
        The first where clause can be null.
        Parameters:
        firstWhere - The constructor takes the first where clause.
      • CombineWhereClauses

        public CombineWhereClauses()
        Can construct with no initial where clause
    • Method Detail

      • addWhere

        public void addWhere(java.lang.String clause)
        Supply where clauses to combine. Strings that are null or empty are ignored.
      • getWhereClause

        public java.lang.String getWhereClause()
        Builds the combined where clause. If there are multiple clauses, each one is wrapped in parenthesis and linked by the AND operator.