org.netbeans.mdr.persistence
Class MOFID

java.lang.Object
  extended byorg.netbeans.mdr.persistence.MOFID

public final class MOFID
extends java.lang.Object

MOFID implemented as a UUID for the repository plus a long for the ID.


Field Summary
static int LENGTH
           
static int STRING_LENGTH
           
 
Constructor Summary
MOFID(long serialNumber, java.lang.String storageId)
          This constructor is just for internal use by storage to create MOFID after deserialization and should be newer called by user code.
MOFID(Storage storage)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          compare MOFIDs as values
static void fromLong(long value, char[] buffer, int offset)
          Convert long to 16 hex digits, to be placed in a character array.
static MOFID fromString(java.lang.String mofId)
           
 long getSerialNumber()
          get the serial number
 java.lang.String getStorageID()
          Getter for storage ID.
 int hashCode()
          MOFIDs with equal values will hash equal
static java.lang.String makeString(java.lang.String prefix, long id)
          Construct the external form of a MOFID
 java.lang.String toString()
          Convert to external form.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LENGTH

public static final int LENGTH
See Also:
Constant Field Values

STRING_LENGTH

public static final int STRING_LENGTH
See Also:
Constant Field Values
Constructor Detail

MOFID

public MOFID(Storage storage)

MOFID

public MOFID(long serialNumber,
             java.lang.String storageId)
This constructor is just for internal use by storage to create MOFID after deserialization and should be newer called by user code.

Method Detail

getSerialNumber

public long getSerialNumber()
get the serial number


getStorageID

public java.lang.String getStorageID()
Getter for storage ID.

Returns:
ID of the home storage of this MOFID.

equals

public boolean equals(java.lang.Object o)
compare MOFIDs as values


hashCode

public int hashCode()
MOFIDs with equal values will hash equal


makeString

public static java.lang.String makeString(java.lang.String prefix,
                                          long id)
Construct the external form of a MOFID


toString

public java.lang.String toString()
Convert to external form.


fromLong

public static void fromLong(long value,
                            char[] buffer,
                            int offset)
Convert long to 16 hex digits, to be placed in a character array.

Parameters:
value - value to convert to hex digits
buffer - array into which to place hex digits

fromString

public static MOFID fromString(java.lang.String mofId)


Copyright © 2005 Apache Software Foundation. All Rights Reserved.