|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.sql.query.AbstractConstraint
public abstract class AbstractConstraint
An abstract representation of an item that can be present in the WHERE or HAVING sections of an SQL query.
| Field Summary | |
|---|---|
static int |
BOTH_FALSE
Describes two constraints as being both false. |
static int |
BOTH_TRUE
Describes two constraints as being both true. |
static int |
EQUAL
Describes one constraint as being equal to another constraint. |
static int |
EXCLUDES
Describes two constraints as being mutually exclusive. |
static int |
IMPLIED_BY
Describes one constraint as being implied by another constraint. |
static int |
IMPLIES
Describes one constraint as implying another constraint. |
static int |
INDEPENDENT
Describes two constraints as being independent. |
static int |
LEFT_FALSE
Describes two constraints, where the left is always false. |
static int |
LEFT_FALSE_RIGHT_TRUE
Describes two constraints, where the left is always false, and the right is always true. |
static int |
LEFT_TRUE
Describes two constraints, where the left is always true. |
static int |
LEFT_TRUE_RIGHT_FALSE
Describes two constraints, where the left is always true, and the right is always false. |
static int |
OPPOSITE
Describes two constraints as being opposite to each other. |
static int |
OR
Describes two constraints as following "constraint 1 OR constraint 2 IS TRUE". |
static int |
RIGHT_FALSE
Describes two constraints, where the right is always false. |
static int |
RIGHT_TRUE
Describes two constraints, where the right is always true. |
| Constructor Summary | |
|---|---|
AbstractConstraint()
|
|
| Method Summary | |
|---|---|
protected static int |
alterComparisonAnd(int compA,
int compB)
Take a couple of integers as if they are values returned by compare, and assume that they are two loose (and possibly different) descriptions of the relation between the same two AbstractConstraints, and return a value that is a more strict description. |
protected static int |
alterComparisonAORB(int compA,
int compB)
Take a couple of integers as if they are values returned by compare, for this compared to A, and this compared to B, and return the value that compare should return for this compared to (A OR B). |
protected static int |
alterComparisonNotObj(int comp)
Take an integer as if it is a value returned by compare, and return the value that compare would have returned if second constraint (obj) had been NOTed. |
protected static int |
alterComparisonNotThis(int comp)
Take an integer as if it is a value returned by compare, and return the value that compare would have returned if first constraint (this) had been NOTed. |
protected static int |
alterComparisonSwitch(int comp)
Take an integer as if it is a value returned by compare, and return the value that compare would have returned if this and obj had been switched. |
static boolean |
checkComparisonEquals(int comparison)
Take an integer as if it was created by compare, and return true if this implies that the left constraint is EQUAL to the right constraint, in a loose sense. |
static boolean |
checkComparisonImplies(int comparison)
Take an integer as if it was created by compare, and return true if this implies that the left constraint IMPLIES the right constraint, in a loose sense. |
int |
compare(AbstractConstraint obj)
Compare this AbstractConstraint with another, ignoring aliases in member fields and tables. |
abstract int |
compare(AbstractConstraint obj,
java.util.Map tableMap,
java.util.Map reverseTableMap)
Compare this AbstractConstraint with another, ignoring aliases in member fields and tables. |
boolean |
equals(java.lang.Object obj)
Overrides Object.equals(); |
abstract java.lang.String |
getSQLString()
Returns a String representation of this AbstractConstraint object, suitable for forming part of an SQL query. |
abstract int |
hashCode()
Overrides Object.hashcode(); |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INDEPENDENT
public static final int IMPLIED_BY
public static final int IMPLIES
public static final int EQUAL
public static final int OPPOSITE
public static final int EXCLUDES
public static final int OR
public static final int BOTH_TRUE
public static final int BOTH_FALSE
public static final int LEFT_TRUE_RIGHT_FALSE
public static final int LEFT_FALSE_RIGHT_TRUE
public static final int LEFT_TRUE
public static final int LEFT_FALSE
public static final int RIGHT_TRUE
public static final int RIGHT_FALSE
| Constructor Detail |
|---|
public AbstractConstraint()
| Method Detail |
|---|
public abstract java.lang.String getSQLString()
getSQLString in interface SQLStringablepublic int compare(AbstractConstraint obj)
obj - an AbstractConstraint to compare to
public abstract int compare(AbstractConstraint obj,
java.util.Map tableMap,
java.util.Map reverseTableMap)
obj - an AbstractConstraint to compare totableMap - a Map from tables in this constraint to tables in objreverseTableMap - a reverse of tableMap
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the Object to compare to
public abstract int hashCode()
hashCode in class java.lang.Objectprotected static int alterComparisonNotThis(int comp)
comp - a previous comparison value returned by compare
protected static int alterComparisonNotObj(int comp)
comp - a previous comparison value returned by compare
protected static int alterComparisonSwitch(int comp)
comp - a previous comparison value returned by compare
protected static int alterComparisonAORB(int compA,
int compB)
compA - a previous comparison returned by compare for this.compare(A)compB - a previous comparison returned by compare for this.compare(B)
protected static int alterComparisonAnd(int compA,
int compB)
compA - a previous comparison returned by compare.compB - another previous comparison returned by compare for the same set of
AbstractConstraints.
public static boolean checkComparisonImplies(int comparison)
comparison - the comparison to test
public static boolean checkComparisonEquals(int comparison)
comparison - the comparison to test
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||