Class VersionedSchemaObject

  • Direct Known Subclasses:
    Table.Builder, View.Builder

    public class VersionedSchemaObject
    extends java.lang.Object
    Base class for the schema object builders which also carry a version (change) number
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<Migration> migrations  
      protected int version  
    • Constructor Summary

      Constructors 
      Constructor Description
      VersionedSchemaObject​(java.lang.String schemaName, java.lang.String objectName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      VersionedSchemaObject addMigration​(Migration... migration)
      Add migration steps to perform to upgrade from previous versions of this object
      java.lang.String getObjectName()
      Getter for the object's name
      java.lang.String getQualifiedName()  
      java.lang.String getSchemaName()
      Getter for the object's schema name
      int getVersion()
      Getter for the object's version (change) number
      protected void setVersionValue​(int v)
      Setter to override the default version number for this object (usually used for alter statements, or new tables and indexes)
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • version

        protected int version
      • migrations

        protected java.util.List<Migration> migrations
    • Constructor Detail

      • VersionedSchemaObject

        public VersionedSchemaObject​(java.lang.String schemaName,
                                     java.lang.String objectName)
    • Method Detail

      • setVersionValue

        protected void setVersionValue​(int v)
        Setter to override the default version number for this object (usually used for alter statements, or new tables and indexes)
        Parameters:
        v -
      • getVersion

        public int getVersion()
        Getter for the object's version (change) number
        Returns:
      • getSchemaName

        public java.lang.String getSchemaName()
        Getter for the object's schema name
        Returns:
      • getObjectName

        public java.lang.String getObjectName()
        Getter for the object's name
        Returns:
      • getQualifiedName

        public java.lang.String getQualifiedName()
      • addMigration

        public VersionedSchemaObject addMigration​(Migration... migration)
        Add migration steps to perform to upgrade from previous versions of this object
        Parameters:
        migration -
        Returns: