|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.Junction
public class Junction
A conjunction or disjunction of Terms as part of a SQL statement.
CheckConstraint,
Query| Field Summary |
|---|
| Fields inherited from interface de.mguennewig.pobjects.Condition |
|---|
AND, OR |
| Constructor Summary | |
|---|---|
Junction(int op,
Term... terms)
Creates a new Junction. |
|
| Method Summary | |
|---|---|
static Junction |
and(Term... terms)
|
static Junction |
convert(Predicate pred)
Converts a given AND or OR Predicate into a Junction. |
boolean |
equals(java.lang.Object o)
|
Junction |
flatten()
|
int |
getNumTerms()
|
int |
getOperand()
|
java.lang.String |
getSqlValue(EvalContext eval)
Returns the SQL expression for this term. |
Term |
getTerm(int i)
|
int |
hashCode()
|
boolean |
isConstant()
Tests whether the expression can be evaluated without an object. |
boolean |
isJoin()
Tests whether this expression enforces any kind of join. |
boolean |
isSelection()
Tests whether this expression is a selection. |
java.util.Iterator<Term> |
iterator()
|
static Junction |
or(Term... terms)
|
Junction |
removeDuplicates()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Junction(int op,
Term... terms)
| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSqlValue(EvalContext eval)
getSqlValue in interface Termpublic boolean isConstant()
isConstant in interface Termpublic boolean isJoin()
isJoin in interface Termpublic boolean isSelection()
With selection is an expression meant that binds a Member to
one Literal.
isSelection in interface Termpublic java.util.Iterator<Term> iterator()
iterator in interface java.lang.Iterable<Term>public Junction flatten()
public final int getOperand()
getOperand in interface Conditionpublic final int getNumTerms()
public final Term getTerm(int i)
public Junction removeDuplicates()
public static Junction and(Term... terms)
public static Junction or(Term... terms)
public static Junction convert(Predicate pred)
Predicate into a Junction.
NOTE: This conversion is just done on the top-most level and it is
advisable to call flatten() on the resulting junction.
java.lang.IllegalArgumentException - if pred is not an
AND or OR expression.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||