org.intermine.objectstore.query
Class ContainsConstraint

java.lang.Object
  extended by org.intermine.objectstore.query.Constraint
      extended by 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


Field Summary
protected  QueryClass cls
           
protected  InterMineObject obj
           
protected  QueryReference ref
           
static java.util.List<ConstraintOp> VALID_OPS
          List of possible operations
static java.util.List<ConstraintOp> VALID_OPS_NULL
          List of possible null operations
 
Fields inherited from class org.intermine.objectstore.query.Constraint
op
 
Constructor Summary
ContainsConstraint(QueryObjectReference ref, ConstraintOp op)
          Constructor for ContainsConstraint.
ContainsConstraint(QueryReference ref, ConstraintOp op, InterMineObject obj)
          Constructor for ContainsConstraint.
ContainsConstraint(QueryReference ref, ConstraintOp op, QueryClass cls)
          Constructor for ContainsConstraint.
 
Method Summary
 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()
 
Methods inherited from class org.intermine.objectstore.query.Constraint
getOp, negate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected QueryReference ref

cls

protected QueryClass cls

obj

protected InterMineObject obj

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

Constructor Detail

ContainsConstraint

public ContainsConstraint(QueryReference ref,
                          ConstraintOp op,
                          QueryClass cls)
Constructor for ContainsConstraint.

Parameters:
ref - the target QueryReference
op - specify CONTAINS or DOES_NOT_CONTAIN
cls - the QueryClass to to be tested against reference

ContainsConstraint

public ContainsConstraint(QueryReference ref,
                          ConstraintOp op,
                          InterMineObject obj)
Constructor for ContainsConstraint.

Parameters:
ref - the target QueryReference
op - specify CONTAINS or DOES_NOT_CONTAIN
obj - the InterMineObject to be tested against reference

ContainsConstraint

public ContainsConstraint(QueryObjectReference ref,
                          ConstraintOp op)
Constructor for ContainsConstraint.

Parameters:
ref - the target QueryObjectReference
op - 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 class java.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 class java.lang.Object
Returns:
the hashCode