public class CombinedConstraintImpl extends ConstraintImpl implements CombinedConstraint
| Modifier and Type | Class and Description |
|---|---|
static class |
CombinedConstraintImpl.TypeImpl
Default implementation of
CombinedConstraint.Type. |
CombinedConstraint.Type| Modifier | Constructor and Description |
|---|---|
protected |
CombinedConstraintImpl(ConstrainedStatement pConstrainedStatement,
CombinedConstraint.Type pType) |
| Modifier and Type | Method and Description |
|---|---|
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
Constraint,
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 |
createBETWEEN()
Creates a "BETWEEN" condition with the given select
statement and inserts it at the current position.
|
BooleanConstraint |
createEQ()
Creates an "equals" condition (=) and inserts it at the current position.
|
void |
createEXISTS(SelectStatement pStatement)
Creates an "EXISTS" condition with the given select
statement and inserts it at the current position.
|
BooleanConstraint |
createGE()
Creates a "greater or equal" condition (>=) and inserts it at the current position.
|
BooleanConstraint |
createGT()
Creates a "greater than" condition (>) and inserts it at the current position.
|
BooleanConstraint |
createIN()
Creates an "IN" condition and inserts it at the current position.
|
BooleanConstraint |
createISNULL()
Creates an "IS NULL" condition and inserts it at the current position.
|
BooleanConstraint |
createLE()
Creates a "lower or equal" condition (<=) and inserts it at the current position.
|
BooleanConstraint |
createLIKE()
Creates a "LIKE" condition and inserts it at the current position.
|
BooleanConstraint |
createLT()
Creates a "lower than" condition (<) and inserts it at the current position.
|
BooleanConstraint |
createNE()
Creates a "not equals" condition (<>) 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. |
getConstrainedStatementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConstrainedStatementprotected CombinedConstraintImpl(ConstrainedStatement pConstrainedStatement, CombinedConstraint.Type pType)
public CombinedConstraint.Type getType()
CombinedConstraintCombinedConstraint.Type.AND or
CombinedConstraint.Type.OR.getType in interface CombinedConstraintpublic CombinedConstraint createAndConstraint()
CombinedConstraintcreateAndConstraint in interface CombinedConstraintpublic CombinedConstraint createOrConstraint()
CombinedConstraintcreateOrConstraint in interface CombinedConstraintpublic BooleanConstraint createEQ()
CombinedConstraintcreateEQ in interface CombinedConstraintpublic BooleanConstraint createNE()
CombinedConstraintcreateNE in interface CombinedConstraintpublic BooleanConstraint createLT()
CombinedConstraintcreateLT in interface CombinedConstraintpublic BooleanConstraint createGT()
CombinedConstraintcreateGT in interface CombinedConstraintpublic BooleanConstraint createLE()
CombinedConstraintcreateLE in interface CombinedConstraintpublic BooleanConstraint createGE()
CombinedConstraintcreateGE in interface CombinedConstraintpublic BooleanConstraint createLIKE()
CombinedConstraintcreateLIKE in interface CombinedConstraintpublic BooleanConstraint createISNULL()
CombinedConstraintcreateISNULL in interface CombinedConstraintpublic BooleanConstraint createIN()
CombinedConstraintcreateIN in interface CombinedConstraintpublic void createEXISTS(SelectStatement pStatement)
CombinedConstraintcreateEXISTS in interface CombinedConstraintpublic BooleanConstraint createBETWEEN()
CombinedConstraintcreateBETWEEN in interface CombinedConstraintpublic void addColumnSetQuery(ColumnSet pSet, TableReference pTableReference)
CombinedConstraintA and B,
then the following will be added: A=? AND B=?.addColumnSetQuery in interface CombinedConstraintpublic void addJoin(ForeignKey pKey, TableReference pReferencingTable, TableReference pReferencedTable)
CombinedConstraintA 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)
CombinedConstraintColumnSet 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()
CombinedConstraintcreateSomething() methods.getNumParts in interface CombinedConstraintpublic java.util.Iterator getParts()
CombinedConstraintcreateSomething() methods.getParts in interface CombinedConstraintpublic void addConstraint(java.util.Map pMap,
Constraint pConstraint)
CombinedConstraintConstraint,
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)
CombinedConstraintNOT.setNOT in interface CombinedConstraintpublic boolean isNOT()
CombinedConstraintNOT.isNOT in interface CombinedConstraint