Package org.intermine.objectstore.query
Class SubqueryConstraint
- java.lang.Object
-
- org.intermine.objectstore.query.Constraint
-
- org.intermine.objectstore.query.SubqueryConstraint
-
public class SubqueryConstraint extends Constraint
Constrain a QueryClass or QueryEvaluable to be within the select list of a given subquery.- Author:
- Richard Smith, Mark Woodbridge
-
-
Field Summary
Fields Modifier and Type Field Description protected QueryClass
cls
protected QueryEvaluable
qe
protected Query
subquery
protected static java.util.List<ConstraintOp>
VALID_OPS
-
Fields inherited from class org.intermine.objectstore.query.Constraint
op
-
-
Constructor Summary
Constructors Constructor Description SubqueryConstraint(QueryClass cls, ConstraintOp op, Query query)
Construct a SubqueryConstraint with a QueryClassSubqueryConstraint(QueryEvaluable qe, ConstraintOp op, Query query)
Construct a SubqueryConstraint with a QueryEvaluable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Test whether two SubqueryConstraints are equal, overrides Object.equals()Query
getQuery()
Get the query.QueryClass
getQueryClass()
Get the QueryClass the query is compare withQueryEvaluable
getQueryEvaluable()
Get the QueryEvaluable the query is compared withint
hashCode()
Get the hashCode for this object overrides Object.hashCode()-
Methods inherited from class org.intermine.objectstore.query.Constraint
getOp, negate
-
-
-
-
Field Detail
-
subquery
protected Query subquery
-
qe
protected QueryEvaluable qe
-
cls
protected QueryClass cls
-
VALID_OPS
protected static final java.util.List<ConstraintOp> VALID_OPS
-
-
Constructor Detail
-
SubqueryConstraint
public SubqueryConstraint(QueryEvaluable qe, ConstraintOp op, Query query)
Construct a SubqueryConstraint with a QueryEvaluable- Parameters:
qe
- item to match against subquery selectop
- required op of constraintquery
- the subquery in question
-
SubqueryConstraint
public SubqueryConstraint(QueryClass cls, ConstraintOp op, Query query)
Construct a SubqueryConstraint with a QueryClass- Parameters:
cls
- item to match against subquery selectop
- required op of constraintquery
- the subquery in question
-
-
Method Detail
-
getQuery
public Query getQuery()
Get the query.- Returns:
- the subquery of the constraint
-
getQueryEvaluable
public QueryEvaluable getQueryEvaluable()
Get the QueryEvaluable the query is compared with- Returns:
- QueryEvaluable
-
getQueryClass
public QueryClass getQueryClass()
Get the QueryClass the query is compare with- Returns:
- QueryClass
-
equals
public boolean equals(java.lang.Object obj)
Test whether two SubqueryConstraints are equal, overrides Object.equals()- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to compare with- Returns:
- true if objects are equal
-
hashCode
public int hashCode()
Get the hashCode for this object overrides Object.hashCode()- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hashCode
-
-