Class AbstractTableUpgrade

    • Field Detail

      • m_UpgradeInfo

        protected StringBuilder m_UpgradeInfo
        the information generated during upgrading.
      • m_Upgraded

        protected boolean m_Upgraded
        indicates whether the upgrade has happened.
    • Constructor Detail

      • AbstractTableUpgrade

        public AbstractTableUpgrade()
    • Method Detail

      • reset

        public void reset()
        Resets the reader (but does not clear the input data!). Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
        Overrides:
        reset in class AbstractOptionHandler
      • addInfo

        protected void addInfo​(String s)
        Appends the string to the upgrade info plus a new line.
        Parameters:
        s - the string to add
      • preUpgrade

        protected void preUpgrade()
        A pre-upgrade hook.
      • doUpgrade

        protected abstract void doUpgrade()
        Performs the actual upgrade.
      • postUpgrade

        protected void postUpgrade()
        A post-upgrade hook.
      • upgrade

        public StringBuilder upgrade()
        Performs the upgrade if not yet performed and returns the information that was generated during the upgrade (can be empty).
        Returns:
        (potential) information generated during the upgrade
      • getUpgraders

        public static String[] getUpgraders()
        Returns a list with classnames of upgrade schemes.
        Returns:
        the upgrade schemes
      • forName

        public static AbstractTableUpgrade forName​(String classname,
                                                   String[] options)
        Instantiates the table upgrade scheme with the given options.
        Parameters:
        classname - the classname of the table upgrade scheme to instantiate
        options - the options for the table upgrade scheme
        Returns:
        the instantiated table upgrade scheme or null if an error occurred
      • forCommandLine

        public static AbstractTableUpgrade forCommandLine​(String cmdline)
        Instantiates the table upgrade scheme from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the table upgrade scheme to instantiate
        Returns:
        the instantiated table upgrade scheme or null if an error occurred