net.wotonomy.control
Class EOTemporaryGlobalID

java.lang.Object
  extended by net.wotonomy.control.EOGlobalID
      extended by net.wotonomy.control.EOTemporaryGlobalID
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class EOTemporaryGlobalID
extends EOGlobalID

EOTemporaryGlobalID is a network-wide unique key. This is used by EOEditingContext to construct temporary ids when new objects are created.

The specified format of the key is a byte array: < Sequence [2], ProcessID [2], Time [4], IP Addr [4] >, but because java does not allow access to the process id, the timestamp of when this class is first loaded is used to simulate a process id.

Version:
$Revision: 893 $
Author:
michael@mpowers.net, $Author: cgruber $
See Also:
Serialized Form

Field Summary
static int UniqueBinaryKeyLength
          Holds the length in bytes of the key that is generated.
 
Fields inherited from class net.wotonomy.control.EOGlobalID
GlobalIDChangedNotification
 
Constructor Summary
EOTemporaryGlobalID()
          Generates a new id with a unique key.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
 boolean equals(java.lang.Object anObject)
          Returns whether the keys are equal.
 int hashCode()
           
 boolean isTemporary()
          Returns true.
 java.lang.String toString()
          Returns a string representation of this key.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UniqueBinaryKeyLength

public static final int UniqueBinaryKeyLength
Holds the length in bytes of the key that is generated.

See Also:
Constant Field Values
Constructor Detail

EOTemporaryGlobalID

public EOTemporaryGlobalID()
Generates a new id with a unique key.

Method Detail

isTemporary

public boolean isTemporary()
Returns true.

Specified by:
isTemporary in class EOGlobalID

equals

public boolean equals(java.lang.Object anObject)
Returns whether the keys are equal.

Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Returns a copy of this object.

Overrides:
clone in class EOGlobalID

hashCode

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

toString

public java.lang.String toString()
Returns a string representation of this key. This is a 24-character string with each pair of characters holding a hexadecimal value that is 128 more than the value of the corresponding byte (to account for two's complement).

Overrides:
toString in class java.lang.Object


Copyright © 2006 null. All Rights Reserved.