|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.sql.query.AbstractConstraint
org.intermine.sql.query.Constraint
public class Constraint
A representation of a normal constraint, comparing two AbstractValue objects.
| Field Summary | |
|---|---|
static int |
EQ
An operation for this constraint indicating that left is equal to right. |
static int |
GORNULL
An operation for this constraint indicating that the left is greater than the right, or the left is null. |
protected AbstractValue |
left
|
static int |
LIKE
An operation for this constraint indicating that left should be pattern-matched against right. |
static int |
LT
An operation for this constraint indicating that left is less than right. |
protected int |
operation
|
protected AbstractValue |
right
|
| Fields inherited from class org.intermine.sql.query.AbstractConstraint |
|---|
BOTH_FALSE, BOTH_TRUE, EQUAL, EXCLUDES, IMPLIED_BY, IMPLIES, INDEPENDENT, LEFT_FALSE, LEFT_FALSE_RIGHT_TRUE, LEFT_TRUE, LEFT_TRUE_RIGHT_FALSE, OPPOSITE, OR, RIGHT_FALSE, RIGHT_TRUE |
| Constructor Summary | |
|---|---|
Constraint(AbstractValue left,
int operation,
AbstractValue right)
Constructor for a Constraint object. |
|
| Method Summary | |
|---|---|
int |
compare(AbstractConstraint obj,
java.util.Map<AbstractTable,AbstractTable> tableMap,
java.util.Map<AbstractTable,AbstractTable> reverseTableMap)
Compare this Constraint with another AbstractConstraint, ignoring aliases in member fields and tables. |
AbstractValue |
getLeft()
Returns the left argument of the constraint. |
int |
getOperation()
Returns the operation of the constraint. |
AbstractValue |
getRight()
Returns the right argument of the constraint. |
java.lang.String |
getSQLString()
Returns a String representation of this Constraint object, suitable for forming part of an SQL query. |
int |
hashCode()
Overrides Object.hashCode(). |
java.lang.String |
toString()
|
| Methods inherited from class org.intermine.sql.query.AbstractConstraint |
|---|
alterComparisonAnd, alterComparisonAORB, alterComparisonNotObj, alterComparisonNotThis, alterComparisonSwitch, checkComparisonEquals, checkComparisonImplies, compare, equals |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EQ
public static final int LT
public static final int LIKE
public static final int GORNULL
protected AbstractValue left
protected AbstractValue right
protected int operation
| Constructor Detail |
|---|
public Constraint(AbstractValue left,
int operation,
AbstractValue right)
left - the AbstractValue on the left of the constraintoperation - EQ for an equivalence constraint,
LT for a Less-Than constraint,
LIKE for a String pattern match constraint - right must be the pattern to
match against the value of leftright - the AbstractValue on the right of the constraint
java.lang.IllegalArgumentException - if operation is not EQ, LT, or LIKE| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSQLString()
getSQLString in interface SQLStringablegetSQLString in class AbstractConstraint
public int compare(AbstractConstraint obj,
java.util.Map<AbstractTable,AbstractTable> tableMap,
java.util.Map<AbstractTable,AbstractTable> reverseTableMap)
compare in class AbstractConstraintobj - an AbstractConstraint to compare totableMap - a Map from tables in this constraint to tables in objreverseTableMap - a reverse of tableMap
public int hashCode()
hashCode in class AbstractConstraintpublic AbstractValue getLeft()
public AbstractValue getRight()
public int getOperation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||