Package org.intermine.objectstore.query
Class ContainsConstraint
- java.lang.Object
-
- org.intermine.objectstore.query.Constraint
-
- org.intermine.objectstore.query.ContainsConstraint
-
public class ContainsConstraint extends Constraint
Constrain whether a QueryClass is member of a QueryReference or not. QueryReference can refer to an object or a collection, test whether QueryClass is a member of the collection or an instance of the object- Author:
- Richard Smith, Mark Woodbridge, Matthew Wakeling
-
-
Field Summary
Fields Modifier and Type Field Description protected QueryClass
cls
protected InterMineObject
obj
protected QueryReference
ref
static java.util.List<ConstraintOp>
VALID_OPS
List of possible operationsstatic java.util.List<ConstraintOp>
VALID_OPS_NULL
List of possible null operations-
Fields inherited from class org.intermine.objectstore.query.Constraint
op
-
-
Constructor Summary
Constructors Constructor Description ContainsConstraint(QueryReference ref, ConstraintOp op)
Constructor for ContainsConstraint, constrain a reference/collection to be NULL/ NOT NULLContainsConstraint(QueryReference ref, ConstraintOp op, InterMineObject obj)
Constructor for ContainsConstraint.ContainsConstraint(QueryReference ref, ConstraintOp op, QueryClass cls)
Constructor for ContainsConstraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj1)
Test whether two ContainsConstraints are equal, overrides Object.equals()InterMineObject
getObject()
Returns the InterMineObject of the constraint.QueryClass
getQueryClass()
Returns the QueryClass of the constraint.QueryReference
getReference()
Returns the QueryReference of the constraint.int
hashCode()
Get the hashCode for this object, overrides Object.hashCode()java.lang.String
toString()
-
Methods inherited from class org.intermine.objectstore.query.Constraint
getOp, negate
-
-
-
-
Field Detail
-
VALID_OPS
public static final java.util.List<ConstraintOp> VALID_OPS
List of possible operations
-
VALID_OPS_NULL
public static final java.util.List<ConstraintOp> VALID_OPS_NULL
List of possible null operations
-
ref
protected QueryReference ref
-
cls
protected QueryClass cls
-
obj
protected InterMineObject obj
-
-
Constructor Detail
-
ContainsConstraint
public ContainsConstraint(QueryReference ref, ConstraintOp op, QueryClass cls)
Constructor for ContainsConstraint.- Parameters:
ref
- the target QueryReferenceop
- specify CONTAINS or DOES_NOT_CONTAINcls
- the QueryClass to to be tested against reference
-
ContainsConstraint
public ContainsConstraint(QueryReference ref, ConstraintOp op, InterMineObject obj)
Constructor for ContainsConstraint.- Parameters:
ref
- the target QueryReferenceop
- specify CONTAINS or DOES_NOT_CONTAINobj
- the InterMineObject to be tested against reference
-
ContainsConstraint
public ContainsConstraint(QueryReference ref, ConstraintOp op)
Constructor for ContainsConstraint, constrain a reference/collection to be NULL/ NOT NULL- Parameters:
ref
- the target QueryObjectReference or QueryCollectionReferenceop
- specify IS_NULL or IS_NOT_NULL
-
-
Method Detail
-
getReference
public QueryReference getReference()
Returns the QueryReference of the constraint.- Returns:
- the QueryReference
-
getQueryClass
public QueryClass getQueryClass()
Returns the QueryClass of the constraint.- Returns:
- the QueryClass
-
getObject
public InterMineObject getObject()
Returns the InterMineObject of the constraint.- Returns:
- the InterMineObject
-
equals
public boolean equals(java.lang.Object obj1)
Test whether two ContainsConstraints are equal, overrides Object.equals()- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj1
- 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-