org.exolab.core.foundation
Class ObjectVersion

java.lang.Object
  extended byorg.exolab.core.foundation.ObjectVersion
All Implemented Interfaces:
java.io.Serializable

public class ObjectVersion
extends java.lang.Object
implements java.io.Serializable

This class defines an object version. Two objects with the same object id but different version numbers are different object instances. The datastore is responsible for managing the object version.

Version:
$Revision: 1.1 $ $Date: 2000/02/22 07:37:56 $
Author:
Jim Alateras
See Also:
PersistentObject, Serialized Form

Constructor Summary
ObjectVersion()
          The default constructore is used to instantiate an instance of this class without initializing the id attribute
ObjectVersion(long version)
          Construct an object with the specified version
 
Method Summary
 boolean equals(java.lang.Object object)
          Determine whether the two objects are equality.
 long getVersion()
          Return the object's version number
 void setVersion(long version)
          Set the persistent object version number
 java.lang.String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectVersion

public ObjectVersion()
The default constructore is used to instantiate an instance of this class without initializing the id attribute


ObjectVersion

public ObjectVersion(long version)
Construct an object with the specified version

Parameters:
version - object version
Method Detail

setVersion

public void setVersion(long version)
Set the persistent object version number

Parameters:
version -

getVersion

public long getVersion()
Return the object's version number

Returns:
long

equals

public boolean equals(java.lang.Object object)
Determine whether the two objects are equality. Equality in this domain implies that the two version numbers are identical.

Parameters:
object - the object to test against
Returns:
boolean return true if it is equals and false otherwise

toString

public java.lang.String toString()
Return a string representation of this object.



Copyright © 1999-2005 The Exolab Group. All Rights Reserved.