org.apache.derbyTesting.functionTests.tests.upgradeTests
Class Version

java.lang.Object
  extended by org.apache.derbyTesting.functionTests.tests.upgradeTests.Version
All Implemented Interfaces:
java.lang.Comparable

public class Version
extends java.lang.Object
implements java.lang.Comparable

A Derby version.


Nested Class Summary
static class Version.Trajectory
           This is a sequence of Versions.
 
Field Summary
private  java.lang.String _branchID
           
private static java.util.HashMap _classLoaders
           
private  java.lang.String _key
           
private  int[] _legs
           
private static int EXPECTED_LEG_COUNT
           
 
Constructor Summary
Version(int[] legs)
          Construct a version from its legs
Version(int major, int minor, int fixpack, int bugversion)
          Construct a version from four legs
Version(org.apache.derby.iapi.services.info.ProductVersionHolder pvh)
          Construct from a Derby ProductVersionHolder
 
Method Summary
private  void addClassLoader()
           Add the class loader for this version if it doesn't already exist.
 int compareTo(java.lang.Object other)
           
private  void constructorMinion(int[] legs)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getBranchID()
           Pretty-print the branch id, that is, the major + minor legs of the Version.
 java.lang.ClassLoader getClassLoader()
           Get a class loader for this version.
private  int[] getLegs(org.apache.derby.iapi.services.info.ProductVersionHolder pvh)
           
 int hashCode()
           
private  void makeKey()
           Make the key for looking up our class loader.
 java.lang.String toString()
           Pretty-print this version.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPECTED_LEG_COUNT

private static final int EXPECTED_LEG_COUNT
See Also:
Constant Field Values

_legs

private int[] _legs

_key

private java.lang.String _key

_branchID

private java.lang.String _branchID

_classLoaders

private static java.util.HashMap _classLoaders
Constructor Detail

Version

public Version(int major,
               int minor,
               int fixpack,
               int bugversion)
Construct a version from four legs


Version

public Version(int[] legs)
Construct a version from its legs


Version

public Version(org.apache.derby.iapi.services.info.ProductVersionHolder pvh)
Construct from a Derby ProductVersionHolder

Method Detail

constructorMinion

private void constructorMinion(int[] legs)

getLegs

private int[] getLegs(org.apache.derby.iapi.services.info.ProductVersionHolder pvh)

toString

public java.lang.String toString()

Pretty-print this version.

Overrides:
toString in class java.lang.Object

getBranchID

public java.lang.String getBranchID()

Pretty-print the branch id, that is, the major + minor legs of the Version.


getClassLoader

public java.lang.ClassLoader getClassLoader()

Get a class loader for this version.


compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable

equals

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

hashCode

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

addClassLoader

private void addClassLoader()

Add the class loader for this version if it doesn't already exist.


makeKey

private void makeKey()

Make the key for looking up our class loader.


Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.