org.apache.derby.impl.sql.catalog
Class DD_Version
- java.lang.Object
-
- org.apache.derby.impl.sql.catalog.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 intgetTypeFormatId()Get the formatID which corresponds to this class.voidreadExternal(java.io.ObjectInput in)Read this object from a stream of stored objects.java.lang.StringtoString()Stringify this Version.voidwriteExternal(java.io.ObjectOutput out)Write this object to a stream of stored objects.
-
-
-
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:
toStringin classjava.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:
getTypeFormatIdin interfaceTypedFormat- Returns:
- the formatID of this class
-
readExternal
public final void readExternal(java.io.ObjectInput in) throws java.io.IOExceptionRead this object from a stream of stored objects. Set the minor version. Ignore the major version.- Specified by:
readExternalin interfacejava.io.Externalizable- Parameters:
in- read this.- Throws:
java.io.IOException- on error
-
writeExternal
public final void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite 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:
writeExternalin interfacejava.io.Externalizable- Parameters:
out- write bytes here.- Throws:
java.io.IOException- on error
-
-
DataMelt 3.0 © DataMelt by jWork.ORG