Interface IdUpgrader

  • All Known Implementing Classes:
    PkQueryIdUpgrader

    public interface IdUpgrader
    Bag object id upgrader - find old objects in a new ObjectStore.
    Author:
    Kim Rutherford
    • Field Detail

      • ERROR_UPGRADER

        static final IdUpgrader ERROR_UPGRADER
        An upgrader that always fails. For use when upgrading shouldn't be happening.
    • Method Detail

      • getNewIds

        java.util.Set<java.lang.Integer> getNewIds​(InterMineObject oldObject,
                                                   ObjectStore os)
        For the given object from an old ObjectStore, find the corresponding InterMineObjects in a new ObjectStore. Primary keys are used to find the objects.
        Parameters:
        oldObject - the template object
        os - ObjectStore used to resolve objects
        Returns:
        the set of new InterMineObjects
      • doUpgrade

        boolean doUpgrade()
        Return true if upgrade should be performed
        Returns:
        true if upgrade should be performed