Class JOP.persist.ObjectIdentifier
All Packages  Class Hierarchy  This Package  Previous  Next  Index  Home

Class JOP.persist.ObjectIdentifier

java.lang.Object
   |
   +----JOP.persist.ObjectIdentifier

public class ObjectIdentifier
extends Object
This class encapsulates the concept of an object identifier. The class includes both the identifier and the object to which it refers to.

There are several utility methods that support formatting of object identifiers.


Variable Index

 o USER_HIGH
High limit of OID's suitable for use by user applications.
 o USER_LOW
Low limit of OID's suitable for use by user applications.

Constructor Index

 o ObjectIdentifier(long)
INTERNAL METHOD
 o ObjectIdentifier(Object)
INTERNAL METHOD
 o ObjectIdentifier(Object, long)
INTERNAL METHOD

Method Index

 o defineUserOid(Object, long)
This method allows a user program pre-define an OID for an object.
 o equals(Object)
 o getChecksum()
INTERNAL METHOD
 o getObject()
INTERNAL METHOD
 o getOid()
Get the 'long' representation of the object's identifier
 o hashCode()
 o isOnDatabase()
INTERNAL METHOD
 o oid(long)
A useful method that takes an object identifier and returns a string in xxxx-xxxx-xxxx-xxxx format.
 o oid(String)
 o setChecksum(long)
This method remembers the checksum of the object so that it can be used to optimise updates if the object has not changed.
 o setObject(Object)
Set the object's value and then spin through all of the queued definitions and set them to the appropriate value.
 o setOnDatabase()
INTERNAL METHOD
 o toString()

Variables

 o USER_LOW
  public final static long USER_LOW
Low limit of OID's suitable for use by user applications.
 o USER_HIGH
  public final static long USER_HIGH
High limit of OID's suitable for use by user applications.

Constructors

 o ObjectIdentifier
  public ObjectIdentifier(Object o)
INTERNAL METHOD
 o ObjectIdentifier
  public ObjectIdentifier(Object o,
                          long i)
INTERNAL METHOD
 o ObjectIdentifier
  public ObjectIdentifier(long xid)
INTERNAL METHOD

Methods

 o defineUserOid
  public static void defineUserOid(Object o,
                                   long oid) throws PersistException
This method allows a user program pre-define an OID for an object. This must be called before the object has been streamed out, otherwise an automatically assigned random ID will be generated.

User identifiers must be in the range JOP.persist.OidGenerator.USER_LOW to JOP.persist.OidGenerator.USER_HIGH

Caution: This method will be moved to PersistManager.

 o oid
  public static String oid(long oid)
A useful method that takes an object identifier and returns a string in xxxx-xxxx-xxxx-xxxx format.
 o oid
  public static long oid(String oid)
 o toString
  public String toString()
Overrides:
toString in class Object
 o equals
  public boolean equals(Object o)
Overrides:
equals in class Object
 o hashCode
  public int hashCode()
Overrides:
hashCode in class Object
 o getOid
  public long getOid()
Get the 'long' representation of the object's identifier
 o setObject
  public void setObject(Object o) throws Exception
Set the object's value and then spin through all of the queued definitions and set them to the appropriate value.

INTERNAL METHOd

 o getObject
  public Object getObject()
INTERNAL METHOD
 o getChecksum
  public long getChecksum()
INTERNAL METHOD
 o setChecksum
  public void setChecksum(long c)
This method remembers the checksum of the object so that it can be used to optimise updates if the object has not changed.

INTERNAL METHOD

 o setOnDatabase
  public void setOnDatabase()
INTERNAL METHOD
 o isOnDatabase
  public boolean isOnDatabase()
INTERNAL METHOD

All Packages  Class Hierarchy  This Package  Previous  Next  Index  Home