Class QueryClassBag

  • All Implemented Interfaces:
    FromElement

    public class QueryClassBag
    extends java.lang.Object
    implements FromElement
    An element that can appear in the FROM clause of a query
    Author:
    Matthew Wakeling
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryClassBag​(java.lang.Class<? extends InterMineObject> type, java.util.Collection<?> bag)
      Constructs a QueryClassBag representing the specified Java class and bag of objects.
      QueryClassBag​(java.lang.Class<? extends InterMineObject> type, ObjectStoreBag osb)
      Constructs a QueryClassBag representing the specified Java class and ObjectStoreBag.
      QueryClassBag​(java.util.Set<java.lang.Class<?>> types, java.util.Collection<?> bag)
      Constructs a QueryClass representing the specified set of classes and bag of objects.
      QueryClassBag​(java.util.Set<java.lang.Class<?>> types, ObjectStoreBag osb)
      Constructs a QueryClass representing the specified set of classes and ObjectStoreBag.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<?> getBag()
      Returns the bag of objects.
      java.util.Set<java.lang.Integer> getIds()
      Returns the Set of object IDs present in the bag that correspond to the type specified.
      ObjectStoreBag getOsb()
      Returns the ObjectStoreBag.
      java.lang.Class<? extends InterMineObject> getType()
      Gets the Java class represented by this QueryClassBag.
      java.lang.String toString()
      Returns a String representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • QueryClassBag

        public QueryClassBag​(java.lang.Class<? extends InterMineObject> type,
                             java.util.Collection<?> bag)
        Constructs a QueryClassBag representing the specified Java class and bag of objects.
        Parameters:
        type - the Java class
        bag - the Collection of objects
      • QueryClassBag

        public QueryClassBag​(java.util.Set<java.lang.Class<?>> types,
                             java.util.Collection<?> bag)
        Constructs a QueryClass representing the specified set of classes and bag of objects.
        Parameters:
        types - the Set of classes
        bag - the Collection of objects
      • QueryClassBag

        public QueryClassBag​(java.lang.Class<? extends InterMineObject> type,
                             ObjectStoreBag osb)
        Constructs a QueryClassBag representing the specified Java class and ObjectStoreBag.
        Parameters:
        type - the Java class
        osb - the ObjectStoreBag
      • QueryClassBag

        public QueryClassBag​(java.util.Set<java.lang.Class<?>> types,
                             ObjectStoreBag osb)
        Constructs a QueryClass representing the specified set of classes and ObjectStoreBag.
        Parameters:
        types - the Set of classes
        osb - the ObjectStoreBag
    • Method Detail

      • getType

        public java.lang.Class<? extends InterMineObject> getType()
        Gets the Java class represented by this QueryClassBag.
        Returns:
        the Class
      • getBag

        public java.util.Collection<?> getBag()
        Returns the bag of objects.
        Returns:
        a Collection
      • getOsb

        public ObjectStoreBag getOsb()
        Returns the ObjectStoreBag.
        Returns:
        an ObjectStoreBag
      • getIds

        public java.util.Set<java.lang.Integer> getIds()
        Returns the Set of object IDs present in the bag that correspond to the type specified.
        Returns:
        a Set of Integers
      • toString

        public java.lang.String toString()
        Returns a String representation. This method is used by IqlQuery to generate iql, so don't change the output.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String