Package org.intermine.objectstore.query
Class BagConstraint
- java.lang.Object
- 
- org.intermine.objectstore.query.Constraint
- 
- org.intermine.objectstore.query.BagConstraint
 
 
- 
- All Implemented Interfaces:
- ConstraintWithBag
 
 public class BagConstraint extends Constraint implements ConstraintWithBag Constrain a QueryClass or QueryEvaluable to be within a bag.- Author:
- Matthew Wakeling
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Collection<?>bagprotected ObjectStoreBagosbprotected QueryNodeqnstatic java.util.List<ConstraintOp>VALID_OPSList of possible operations- 
Fields inherited from class org.intermine.objectstore.query.Constraintop
 
- 
 - 
Constructor SummaryConstructors Constructor Description BagConstraint(QueryNode qn, ConstraintOp op, java.util.Collection<?> bag)Construct a BagConstraint from a Collection.BagConstraint(QueryNode qn, ConstraintOp op, ObjectStoreBag osb)Construct a BagConstraint from an ObjectStoreBag.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Collection<?>getBag()Get the bag Collection.ObjectStoreBaggetOsb()Get the ObjectStoreBag.QueryNodegetQueryNode()Get the QueryNode.inthashCode()- 
Methods inherited from class org.intermine.objectstore.query.ConstraintgetOp, negate
 
- 
 
- 
- 
- 
Field Detail- 
qnprotected QueryNode qn 
 - 
bagprotected java.util.Collection<?> bag 
 - 
osbprotected ObjectStoreBag osb 
 - 
VALID_OPSpublic static final java.util.List<ConstraintOp> VALID_OPS List of possible operations
 
- 
 - 
Constructor Detail- 
BagConstraintpublic BagConstraint(QueryNode qn, ConstraintOp op, java.util.Collection<?> bag) Construct a BagConstraint from a Collection. Note that the bag isn't copied so it should not be changed after the Query has been executed. BagConstraint will accept ONE_OF and NONE_OF as constraint op arguments but will use corresponding IN and NOT_IN.- Parameters:
- qn- the QueryNode to compare to the bag
- op- the operation
- bag- a Collection that represents the bag
 
 - 
BagConstraintpublic BagConstraint(QueryNode qn, ConstraintOp op, ObjectStoreBag osb) Construct a BagConstraint from an ObjectStoreBag.- Parameters:
- qn- the QueryNode to compare to the bag
- op- the operation
- osb- an ObjectStoreBag
 
 
- 
 - 
Method Detail- 
getQueryNodepublic QueryNode getQueryNode() Get the QueryNode.- Returns:
- QueryNode
 
 - 
getBagpublic java.util.Collection<?> getBag() Get the bag Collection.- Specified by:
- getBagin interface- ConstraintWithBag
- Returns:
- a Set of objects in the bag
 
 - 
getOsbpublic ObjectStoreBag getOsb() Get the ObjectStoreBag.- Returns:
- an ObjectStoreBag
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-