Class DatabaseObject

  • All Implemented Interfaces:
    IDatabaseObject
    Direct Known Subclasses:
    Tablespace

    public abstract class DatabaseObject
    extends java.lang.Object
    implements IDatabaseObject
    Represents objects which are part of the database, but which do not belong to a particular schema (like tablespace, for example).
    • Constructor Detail

      • DatabaseObject

        public DatabaseObject​(java.lang.String objectName,
                              DatabaseObjectType objectType,
                              int version)
        Public constructor
        Parameters:
        objectName -
        objectType -
        version -
    • Method Detail

      • getDependencies

        public java.util.Collection<IDatabaseObject> getDependencies()
        Get the collection of dependencies for this object
        Returns:
      • getVersion

        public int getVersion()
        Description copied from interface: IDatabaseObject
        Getter for the schema version number this object applies to
        Specified by:
        getVersion in interface IDatabaseObject
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getObjectName

        public java.lang.String getObjectName()
      • getTypeNameVersion

        public java.lang.String getTypeNameVersion()
        Description copied from interface: IDatabaseObject
        Get the qualified name for this object: objectType:objectName:objectVersion
        Specified by:
        getTypeNameVersion in interface IDatabaseObject
        Returns:
      • addTags

        public void addTags​(java.util.Map<java.lang.String,​java.lang.String> tags)
        Add the given tags to our tag map
        Parameters:
        tags -
      • addTag

        public void addTag​(java.lang.String tagGroup,
                           java.lang.String tagValue)
        Add the tagGroup/tagValue pair to the tags for this object
        Specified by:
        addTag in interface IDatabaseObject
        Parameters:
        tagGroup -
        tagValue -
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getName

        public java.lang.String getName()
        Return the unique name for this object
        Specified by:
        getName in interface IDatabaseObject
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getTags

        public java.util.Map<java.lang.String,​java.lang.String> getTags()
        Description copied from interface: IDatabaseObject
        Get the map of tags associated with this object. Used to find things in the PhysicalDataModel
        Specified by:
        getTags in interface IDatabaseObject
        Returns:
      • visit

        public void visit​(java.util.function.Consumer<IDatabaseObject> c)
        Description copied from interface: IDatabaseObject
        Visit this object, calling the consumer for itself, or its children if any
        Specified by:
        visit in interface IDatabaseObject
      • applyDistributionRules

        public void applyDistributionRules​(ISchemaAdapter target,
                                           int pass)
        Description copied from interface: IDatabaseObject
        Apply any distribution rules associated with the object (usually a table)
        Specified by:
        applyDistributionRules in interface IDatabaseObject
        Parameters:
        target - the target database we apply the operation to
        pass - multiple pass number