Interface Patch

    • Method Detail

      • getDescription

        String getDescription()
      • getFixesFromSchema

        int getFixesFromSchema()
        Returns:
        Returns the smallest schema number that this patch may be applied to
      • getFixesToSchema

        int getFixesToSchema()
        Returns:
        Returns the largest schema number that this patch may be applied to
      • getTargetSchema

        int getTargetSchema()
        Returns:
        Returns the schema number that this patch attempts to bring the repo up to
      • isForce

        boolean isForce()
        Returns:
        Returns true if the patch must forcefully run regardless of any other state
      • getDependsOn

        List<Patch> getDependsOn()
        Get patches that this patch depends on
        Returns:
        Returns a list of patches
      • getAlternatives

        List<Patch> getAlternatives()
        Get patches that could have done the work already
        Returns:
        Returns a list of patches
      • applies

        boolean applies​(int version)
        Check if the patch is applicable to a given schema version.
        Parameters:
        version - a schema version number
        Returns:
        Returns (fixesFromVersion <= version <= fixesToVersion)
      • requiresTransaction

        boolean requiresTransaction()
        Does the patch need to be wrapped in a transaction?
        Returns:
        Returns true if the patch needs to be wrapped, false otherwise
      • apply

        String apply()
              throws PatchException
        Applies the patch. Typically this will be within the bounds of a new transaction.
        Returns:
        Returns the patch execution report
        Throws:
        PatchException - if the patch failed to be applied
      • applyAsync

        String applyAsync()
                   throws PatchException
        Apply the patch, regardless of the deferred flag. So if the patch has not run due to it being deferred earlier then this will run it now. Also ignores the "applied" lock. So the patch can be executed many times.
        Returns:
        the patch report
        Throws:
        PatchException - if the patch failed to be applied
      • isIgnored

        boolean isIgnored()
        Is this patch just ignored - never considered for application
        Returns:
        boolean
      • isDeferred

        boolean isDeferred()
        Indicates whether the patch must be deferred (not to be executed in bootstrap) or not
        Returns:
        true if the patch must be deferred, false otherwise