Class 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 java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • 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 values
        evaluables - 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 interface ConstraintWithBag
        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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object