Documentation of 'org.apache.derby.impl.sql.catalog.DD_Version' Java class
DD_Version
org.apache.derby.impl.sql.catalog

Class DD_Version

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat


    public class DD_Version
    extends java.lang.Object
    implements Formatable
    Generic code for upgrading data dictionaries. Currently has all minor version upgrade logic.

    A word about minor vs. major upgraded. Minor upgrades must be backwards/forwards compatible. So they cannot version classes or introduce new classes. Major releases are only backwards compatible; they will run against an old database, but not the other way around. So they can introduce new classes, etc.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      DD_Version()
      Public niladic constructor needed for Formatable interface.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getTypeFormatId()
      Get the formatID which corresponds to this class.
      void readExternal(java.io.ObjectInput in)
      Read this object from a stream of stored objects.
      java.lang.String toString()
      Stringify this Version.
      void writeExternal(java.io.ObjectOutput out)
      Write this object to a stream of stored objects.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DD_Version

        public DD_Version()
        Public niladic constructor needed for Formatable interface.
    • Method Detail

      • toString

        public java.lang.String toString()
        Stringify this Version.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation of this Version.
      • getTypeFormatId

        public int getTypeFormatId()
        Get the formatID which corresponds to this class. Map to the 5.0 version identifier so that 5.0 will understand this object when we write it out in soft upgrade mode. CS 5.0 will de-serialize it correctly. When we are writing out a 5.1 version number we write out the 5.1 version just to ensure no problems.
        Specified by:
        getTypeFormatId in interface TypedFormat
        Returns:
        the formatID of this class
      • readExternal

        public final void readExternal(java.io.ObjectInput in)
                                throws java.io.IOException
        Read this object from a stream of stored objects. Set the minor version. Ignore the major version.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - read this.
        Throws:
        java.io.IOException - on error
      • writeExternal

        public final void writeExternal(java.io.ObjectOutput out)
                                 throws java.io.IOException
        Write this object to a stream of stored objects. Write out the minor version which is bumped across minor release. Just to be safe, write out the major version too. This will allow us to do versioning of a specific Version impl in the future.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - write bytes here.
        Throws:
        java.io.IOException - on error

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.