Package com.im.commons.db.dml
Class SQLWhereClauseCompositeElement
- java.lang.Object
-
- com.im.commons.db.dml.SQLWhereClauseCompositeElement
-
- All Implemented Interfaces:
SQLStringRenderer,SQLWhereClauseElement
public final class SQLWhereClauseCompositeElement extends java.lang.Object implements SQLWhereClauseElement
- Author:
- Tim Dudgeon
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSQLWhereClauseCompositeElement.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLWhereClauseElementaddElement(SQLWhereClauseElement el)Add a new element to the exisitng terms in this element.SQLWhereClauseElementaddElement(SQLWhereClauseElement term, SQLWhereClauseCompositeElement.Type type)Add the new term, rebuilding this term if necessary.voidaddJoins(java.util.Set<SQLJoin> joins)voidappendTo(java.lang.StringBuilder buf, TermEncoder encoder)static SQLWhereClauseCompositeElementcreateAndClause()static SQLWhereClauseCompositeElementcreateOrClause()java.lang.StringtoString()
-
-
-
Method Detail
-
createAndClause
public static SQLWhereClauseCompositeElement createAndClause()
-
createOrClause
public static SQLWhereClauseCompositeElement createOrClause()
-
addElement
public SQLWhereClauseElement addElement(SQLWhereClauseElement term, SQLWhereClauseCompositeElement.Type type)
Add the new term, rebuilding this term if necessary. This term may become an inner term of the rebuilt expression. The outer most expression is retunred. It is important that you use the new outer term if you want to hold the outer most term.- Specified by:
addElementin interfaceSQLWhereClauseElement- Parameters:
term-type-- Returns:
- The (possibly new) outer most element
-
addElement
public SQLWhereClauseElement addElement(SQLWhereClauseElement el)
Add a new element to the exisitng terms in this element. The new element must be from the same table as the existing elements. If not then use the other form of this method.- Parameters:
el-- Returns:
- This SQLWhereCompositeElement
-
addJoins
public void addJoins(java.util.Set<SQLJoin> joins)
- Specified by:
addJoinsin interfaceSQLWhereClauseElement
-
appendTo
public void appendTo(java.lang.StringBuilder buf, TermEncoder encoder)- Specified by:
appendToin interfaceSQLStringRenderer
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-