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 class
SQLWhereClauseCompositeElement.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLWhereClauseElement
addElement(SQLWhereClauseElement el)
Add a new element to the exisitng terms in this element.SQLWhereClauseElement
addElement(SQLWhereClauseElement term, SQLWhereClauseCompositeElement.Type type)
Add the new term, rebuilding this term if necessary.void
addJoins(java.util.Set<SQLJoin> joins)
void
appendTo(java.lang.StringBuilder buf, TermEncoder encoder)
static SQLWhereClauseCompositeElement
createAndClause()
static SQLWhereClauseCompositeElement
createOrClause()
java.lang.String
toString()
-
-
-
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:
addElement
in 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:
addJoins
in interfaceSQLWhereClauseElement
-
appendTo
public void appendTo(java.lang.StringBuilder buf, TermEncoder encoder)
- Specified by:
appendTo
in interfaceSQLStringRenderer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-