Class BagConversionHelper


  • public final class BagConversionHelper
    extends java.lang.Object
    Utility methods used when converting lists (bags) between types.
    Author:
    Richard Smith
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PathQuery getConvertedObjects​(javax.servlet.http.HttpSession session, java.util.List<ApiTemplate> conversionTemplates, java.lang.Class<? extends InterMineObject> typeA, java.lang.Class<? extends InterMineObject> typeB, InterMineBag imBag)
      Converts a List of objects from one type to another type using a TemplateQuery, returns the converted objects.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getConvertedObjects

        public static PathQuery getConvertedObjects​(javax.servlet.http.HttpSession session,
                                                    java.util.List<ApiTemplate> conversionTemplates,
                                                    java.lang.Class<? extends InterMineObject> typeA,
                                                    java.lang.Class<? extends InterMineObject> typeB,
                                                    InterMineBag imBag)
                                             throws InterMineException,
                                                    ObjectStoreException
        Converts a List of objects from one type to another type using a TemplateQuery, returns the converted objects.
        Parameters:
        session - of the user running the query
        conversionTemplates - a list of templates to be used for conversion
        typeA - the type to convert from
        typeB - the type to convert to
        imBag - an InterMineBag or Collection of objects of type typeA
        Returns:
        a WebResults object containing the converted objects
        Throws:
        InterMineException - if an error occurs
        ObjectStoreException - if an error occurs