Package org.intermine.objectstore.query
Class MultipleInBagConstraint
- java.lang.Object
-
- org.intermine.objectstore.query.Constraint
-
- org.intermine.objectstore.query.MultipleInBagConstraint
-
- All Implemented Interfaces:
ConstraintWithBag
public class MultipleInBagConstraint extends Constraint implements ConstraintWithBag
Constraint type requiring any of the given QueryEvaluables to be in a given bag.- Author:
- Matthew Wakeling
-
-
Field Summary
-
Fields inherited from class org.intermine.objectstore.query.Constraint
op
-
-
Constructor Summary
Constructors Constructor Description MultipleInBagConstraint(java.util.Collection<?> bag, java.util.List<? extends QueryEvaluable> evaluables)
Constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Collection<?>
getBag()
Returns the bag that this object was constructed with.java.util.List<? extends QueryEvaluable>
getEvaluables()
Returns the evaluables that this object was constructed with.int
hashCode()
-
Methods inherited from class org.intermine.objectstore.query.Constraint
getOp, negate
-
-
-
-
Constructor Detail
-
MultipleInBagConstraint
public MultipleInBagConstraint(java.util.Collection<?> bag, java.util.List<? extends QueryEvaluable> evaluables)
Constructor for this class. Create a constraint that selects rows that have any of the evaluables contained in the bag. This is the same as putting several BagConstraint objects in an OR ConstraintSet, but this will execute faster.- Parameters:
bag
- a Collection of valuesevaluables
- a List of QueryEvaluable objects
-
-
Method Detail
-
getBag
public java.util.Collection<?> getBag()
Returns the bag that this object was constructed with.- Specified by:
getBag
in interfaceConstraintWithBag
- Returns:
- a Collection of values
-
getEvaluables
public java.util.List<? extends QueryEvaluable> getEvaluables()
Returns the evaluables that this object was constructed with.- Returns:
- a List of QueryEvaluable objects
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-