|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.jaxme.sqls.impl.ConstraintImpl
org.apache.ws.jaxme.sqls.impl.CombinedConstraintImpl
| Nested Class Summary | |
static class |
CombinedConstraintImpl.TypeImpl
|
| Nested classes inherited from class org.apache.ws.jaxme.sqls.CombinedConstraint |
CombinedConstraint.Type |
| Constructor Summary | |
protected |
CombinedConstraintImpl(ConstrainedStatement pConstrainedStatement,
CombinedConstraint.Type pType)
|
| Method Summary | |
void |
addColumnSetQuery(ColumnSet pSet,
TableReference pTableReference)
Adds a check for the columns of the given column set. |
void |
addConstraint(java.util.Map pMap,
Constraint pConstraint)
Clones the given CombinedConstraint, mapping the column references from the given constraint to the values in the given map. |
void |
addJoin(ForeignKey pKey,
TableReference pReferencingTable,
TableReference pReferencedTable)
Creates a JOIN condition matching the given foreign key. |
void |
addJoin(TableReference pReferencingTable,
ColumnSet pReferencingColumnSet,
TableReference pReferencedTable,
ColumnSet pReferencedColumnSet)
Creates a JOIN condition matching the given column reference. |
CombinedConstraint |
createAndConstraint()
Creates an AndConstraint and inserts it at the current position. |
BooleanConstraint |
createEQ()
Creates a condition "equals" (=) and inserts it at the current position. |
void |
createEXISTS(SelectStatement pStatement)
Creates a condition "EXISTS" with the given select statement and inserts it at the current position. |
BooleanConstraint |
createGE()
Creates a condition "greater or equals" (>=) and inserts it at the current position. |
BooleanConstraint |
createGT()
Creates a condition "greater than" (<) and inserts it at the current position. |
BooleanConstraint |
createIN()
Creates a condition "IN" and inserts it at the current position. |
BooleanConstraint |
createISNULL()
Creates a condition "IS NULL" and inserts it at the current position. |
BooleanConstraint |
createLE()
Creates a condition "lower or equals" (<=) and inserts it at the current position. |
BooleanConstraint |
createLIKE()
Creates a condition "LIKE" and inserts it at the current position. |
BooleanConstraint |
createLT()
Creates a condition "lower than" (<) and inserts it at the current position. |
BooleanConstraint |
createNE()
Creates a condition "doesn't equal" (!=) and inserts it at the current position. |
CombinedConstraint |
createOrConstraint()
Creates an OrConstraint and inserts it at the current position. |
int |
getNumParts()
Returns the number of parts, that have been added with the various createSomething() methods. |
java.util.Iterator |
getParts()
Returns an Iterator to the parts, that have been added with the various createSomething() methods. |
CombinedConstraint.Type |
getType()
Returns the type, either of CombinedConstraint.Type.AND or
CombinedConstraint.Type.OR. |
boolean |
isNOT()
Returns whether the combined constraint is inverted by adding a prepending NOT. |
void |
setNOT(boolean pNot)
Sets whether the combined constraint is inverted by adding a prepending NOT. |
| Methods inherited from class org.apache.ws.jaxme.sqls.impl.ConstraintImpl |
getConstrainedStatement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.ws.jaxme.sqls.Constraint |
getConstrainedStatement |
| Constructor Detail |
protected CombinedConstraintImpl(ConstrainedStatement pConstrainedStatement,
CombinedConstraint.Type pType)
| Method Detail |
public CombinedConstraint.Type getType()
CombinedConstraintReturns the type, either of
CombinedConstraint.Type.AND or
CombinedConstraint.Type.OR.
getType in interface CombinedConstraintpublic CombinedConstraint createAndConstraint()
CombinedConstraintCreates an AndConstraint and inserts it at the current position.
createAndConstraint in interface CombinedConstraintpublic CombinedConstraint createOrConstraint()
CombinedConstraintCreates an OrConstraint and inserts it at the current position.
createOrConstraint in interface CombinedConstraintpublic BooleanConstraint createEQ()
CombinedConstraintCreates a condition "equals" (=) and inserts it at the current position.
createEQ in interface CombinedConstraintpublic BooleanConstraint createNE()
CombinedConstraintCreates a condition "doesn't equal" (!=) and inserts it at the current position.
createNE in interface CombinedConstraintpublic BooleanConstraint createLT()
CombinedConstraintCreates a condition "lower than" (<) and inserts it at the current position.
createLT in interface CombinedConstraintpublic BooleanConstraint createGT()
CombinedConstraintCreates a condition "greater than" (<) and inserts it at the current position.
createGT in interface CombinedConstraintpublic BooleanConstraint createLE()
CombinedConstraintCreates a condition "lower or equals" (<=) and inserts it at the current position.
createLE in interface CombinedConstraintpublic BooleanConstraint createGE()
CombinedConstraintCreates a condition "greater or equals" (>=) and inserts it at the current position.
createGE in interface CombinedConstraintpublic BooleanConstraint createLIKE()
CombinedConstraintCreates a condition "LIKE" and inserts it at the current position.
createLIKE in interface CombinedConstraintpublic BooleanConstraint createISNULL()
CombinedConstraintCreates a condition "IS NULL" and inserts it at the current position.
createISNULL in interface CombinedConstraintpublic BooleanConstraint createIN()
CombinedConstraintCreates a condition "IN" and inserts it at the current position.
createIN in interface CombinedConstraintpublic void createEXISTS(SelectStatement pStatement)
CombinedConstraintCreates a condition "EXISTS" with the given select statement and inserts it at the current position.
createEXISTS in interface CombinedConstraint
public void addColumnSetQuery(ColumnSet pSet,
TableReference pTableReference)
CombinedConstraintAdds a check for the columns of the given column set. For example,
if the column set consists of the columns A and B,
then the following will be added: A=? AND B=?.
addColumnSetQuery in interface CombinedConstraint
public void addJoin(ForeignKey pKey,
TableReference pReferencingTable,
TableReference pReferencedTable)
CombinedConstraintCreates a JOIN condition matching the given foreign key. In other
words, if the foreign key consists of the columns A and
B referencing the columns X and Y,
then the following will be added: A=X AND B=Y.
addJoin in interface CombinedConstraintpKey - The foreign key being matched.pReferencingTable - A reference to the table returned by the
foreign keys ColumnSet.getTable() method.pReferencedTable - A reference to the table returned by the
foreign keys ForeignKey.getReferencedTable() method.
public void addJoin(TableReference pReferencingTable,
ColumnSet pReferencingColumnSet,
TableReference pReferencedTable,
ColumnSet pReferencedColumnSet)
CombinedConstraintCreates a JOIN condition matching the given column reference.
In other words, if the referencing ColumnSet contains the
columns A and B, and the referenced column set contains ColumnSet,
X and Y, then the following will be added: A=X AND B=Y.
addJoin in interface CombinedConstraintpublic int getNumParts()
CombinedConstraintReturns the number of parts, that have been added with the
various createSomething() methods.
getNumParts in interface CombinedConstraintpublic java.util.Iterator getParts()
CombinedConstraintReturns an Iterator to the parts, that have been added with the
various createSomething() methods.
getParts in interface CombinedConstraint
public void addConstraint(java.util.Map pMap,
Constraint pConstraint)
CombinedConstraintClones the given CombinedConstraint, mapping the column references from the given constraint to the values in the given map.
addConstraint in interface CombinedConstraintpMap - A Map with the constraints pConstraint table
references as keys. The values are table references of the current
constraints statement.pConstraint - The constraint being cloned.public void setNOT(boolean pNot)
CombinedConstraintSets whether the combined constraint is inverted by adding
a prepending NOT.
setNOT in interface CombinedConstraintpublic boolean isNOT()
CombinedConstraintReturns whether the combined constraint is inverted by adding
a prepending NOT.
isNOT in interface CombinedConstraint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||