Interface IDatabaseObject

    • Method Detail

      • getVersion

        int getVersion()
        Getter for the schema version number this object applies to
        Returns:
      • apply

        void apply​(IDatabaseAdapter target)
        Apply the DDL for this object to the target database
        Parameters:
        priorVersion -
        target - the database target
      • apply

        void apply​(java.lang.Integer priorVersion,
                   IDatabaseAdapter target)
        Apply migration logic to bring the target database to the current level of this object
        Parameters:
        priorVersion -
        target - the database target
      • applyTx

        void applyTx​(IDatabaseAdapter target,
                     ITransactionProvider cp,
                     IVersionHistoryService vhs)
        Apply the DDL, but within its own transaction
        Parameters:
        target - the target database we apply to
        cp - of thread-specific transactions
        vhs - the service interface for adding this object to the version history table
      • applyVersion

        void applyVersion​(IDatabaseAdapter target,
                          IVersionHistoryService vhs)
        Apply the change, but only if it has a newer version than we already have recorded in the database
        Parameters:
        target -
        vhs - the service used to manage the version history table
      • drop

        void drop​(IDatabaseAdapter target)
        DROP this object from the target database
        Parameters:
        target -
      • grant

        void grant​(IDatabaseAdapter target,
                   java.lang.String groupName,
                   java.lang.String toUser)
        Grant the given privileges to the user
        Parameters:
        target -
        groupName -
        toUser -
      • visit

        void visit​(java.util.function.Consumer<IDatabaseObject> c)
        Visit this object, calling the consumer for itself, or its children if any
        Parameters:
        c -
      • getName

        java.lang.String getName()
        Return the qualified name for this object (e.g. schema.name).
        Returns:
      • getTypeNameVersion

        java.lang.String getTypeNameVersion()
        Get the qualified name for this object: objectType:objectName:objectVersion
        Returns:
      • getTags

        java.util.Map<java.lang.String,​java.lang.String> getTags()
        Get the map of tags associated with this object. Used to find things in the PhysicalDataModel
        Returns:
      • addTag

        void addTag​(java.lang.String tagName,
                    java.lang.String tagValue)
        Add the tag name/value to the tag map for this object
        Parameters:
        tagName -
        tagValue -
      • addDependencies

        void addDependencies​(java.util.Collection<IDatabaseObject> deps)
        Add the collection of dependencies to this object
        Parameters:
        deps -
      • fetchDependenciesTo

        void fetchDependenciesTo​(java.util.Collection<IDatabaseObject> out)
        Fetch dependencies from this into the given out list
        Parameters:
        out -