Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.ws.jaxme.sqls.impl.ConstraintImpl
org.apache.ws.jaxme.sqls.impl.CombinedConstraintImpl
Nested Class Summary | |
static class |
|
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
CombinedConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
void |
|
BooleanConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
BooleanConstraint |
|
CombinedConstraint |
|
int |
|
Iterator |
|
CombinedConstraint.Type |
|
boolean |
|
void |
|
Methods inherited from class org.apache.ws.jaxme.sqls.impl.ConstraintImpl | |
getConstrainedStatement |
protected CombinedConstraintImpl(ConstrainedStatement pConstrainedStatement, CombinedConstraint.Type pType)
public void addColumnSetQuery(ColumnSet pSet, TableReference pTableReference)
Adds a check for the columns of the given column set. For example, if the column set consists of the columnsA
andB
, then the following will be added:A=? AND B=?
.
- Specified by:
- addColumnSetQuery in interface CombinedConstraint
public void addConstraint(Map pMap, Constraint pConstraint)
Clones the givenConstraint
, mapping the column references from the given constraint to the values in the given map.
- Specified by:
- addConstraint in interface CombinedConstraint
- Parameters:
pMap
- A Map with the constraintspConstraint
table references as keys. The values are table references of the current constraints statement.pConstraint
- The constraint being cloned.
public void addJoin(ForeignKey pKey, TableReference pReferencingTable, TableReference pReferencedTable)
Creates a JOIN condition matching the given foreign key. In other words, if the foreign key consists of the columnsA
andB
referencing the columnsX
andY
, then the following will be added:A=X AND B=Y
.
- Specified by:
- addJoin in interface CombinedConstraint
- Parameters:
pKey
- The foreign key being matched.pReferencingTable
- A reference to the table returned by the foreign keysorg.apache.ws.jaxme.sqls.ForeignKey.getTable()
method.pReferencedTable
- A reference to the table returned by the foreign keysForeignKey.getReferencedTable()
method.
public void addJoin(TableReference pReferencingTable, ColumnSet pReferencingColumnSet, TableReference pReferencedTable, ColumnSet pReferencedColumnSet)
Creates a JOIN condition matching the given column reference. In other words, if the referencingColumnSet
contains the columns A and B, and the referenced column set containsColumnSet
, X and Y, then the following will be added:A=X AND B=Y
.
- Specified by:
- addJoin in interface CombinedConstraint
public CombinedConstraint createAndConstraint()
Creates an AndConstraint and inserts it at the current position.
- Specified by:
- createAndConstraint in interface CombinedConstraint
public BooleanConstraint createBETWEEN()
Creates a "BETWEEN" condition with the given select statement and inserts it at the current position.
- Specified by:
- createBETWEEN in interface CombinedConstraint
public BooleanConstraint createEQ()
Creates an "equals" condition (=) and inserts it at the current position.
- Specified by:
- createEQ in interface CombinedConstraint
public void createEXISTS(SelectStatement pStatement)
Creates an "EXISTS" condition with the given select statement and inserts it at the current position.
- Specified by:
- createEXISTS in interface CombinedConstraint
public BooleanConstraint createGE()
Creates a "greater or equal" condition (>=) and inserts it at the current position.
- Specified by:
- createGE in interface CombinedConstraint
public BooleanConstraint createGT()
Creates a "greater than" condition (>) and inserts it at the current position.
- Specified by:
- createGT in interface CombinedConstraint
public BooleanConstraint createIN()
Creates an "IN" condition and inserts it at the current position.
- Specified by:
- createIN in interface CombinedConstraint
public BooleanConstraint createISNULL()
Creates an "IS NULL" condition and inserts it at the current position.
- Specified by:
- createISNULL in interface CombinedConstraint
public BooleanConstraint createLE()
Creates a "lower or equal" condition (<=) and inserts it at the current position.
- Specified by:
- createLE in interface CombinedConstraint
public BooleanConstraint createLIKE()
Creates a "LIKE" condition and inserts it at the current position.
- Specified by:
- createLIKE in interface CombinedConstraint
public BooleanConstraint createLT()
Creates a "lower than" condition (<) and inserts it at the current position.
- Specified by:
- createLT in interface CombinedConstraint
public BooleanConstraint createNE()
Creates a "not equals" condition (<>) and inserts it at the current position.
- Specified by:
- createNE in interface CombinedConstraint
public CombinedConstraint createOrConstraint()
Creates an OrConstraint and inserts it at the current position.
- Specified by:
- createOrConstraint in interface CombinedConstraint
public int getNumParts()
Returns the number of parts, that have been added with the variouscreateSomething()
methods.
- Specified by:
- getNumParts in interface CombinedConstraint
public Iterator getParts()
Returns an Iterator to the parts, that have been added with the variouscreateSomething()
methods.
- Specified by:
- getParts in interface CombinedConstraint
public CombinedConstraint.Type getType()
Returns the type, either ofCombinedConstraint.Type.AND
orCombinedConstraint.Type.OR
.
- Specified by:
- getType in interface CombinedConstraint
public boolean isNOT()
Returns whether the combined constraint is inverted by adding a prependingNOT
.
- Specified by:
- isNOT in interface CombinedConstraint
public void setNOT(boolean pNot)
Sets whether the combined constraint is inverted by adding a prependingNOT
.
- Specified by:
- setNOT in interface CombinedConstraint