org.apache.jdo.impl.fostore
Class AID

java.lang.Object
  extended by org.apache.jdo.impl.fostore.OID
      extended by org.apache.jdo.impl.fostore.AID
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class AID
extends OID

Represents the identity of a JDO object in the File/Object store. This implementation uses application identity. The identity is based on the class of the object and a byte[] buffer that represents values in the user object Id instance which creates a unique identifier within that class. These ID's are unique only within a single datastore.

Author:
Marina Vatkina
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jdo.impl.fostore.OID
oid
 
Constructor Summary
AID()
          Default constructor.
AID(long oid)
          Creates an AID with the given value.
 
Method Summary
 boolean equals(java.lang.Object other)
          Determines if this AID is equal to another.
 int hashCode()
          Provides a unique hashCode for this AID.
 java.lang.String oidString()
          Returns the id itself in String form, for debugging.
 void readObject(java.io.ObjectInputStream in)
          Reads this AID's value from the input stream.
 java.lang.String toString()
          Returns a String representation of this AID.
 void writeObject(java.io.ObjectOutputStream out)
          Writes this AID to the output stream.
 
Methods inherited from class org.apache.jdo.impl.fostore.OID
compareTo, getCLID, getUID, isProvisional
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AID

public AID()
Default constructor.


AID

public AID(long oid)
Creates an AID with the given value.

Method Detail

equals

public boolean equals(java.lang.Object other)
Determines if this AID is equal to another.

Overrides:
equals in class OID
Parameters:
other - The other AID in the equality comparison.
Returns:
True if they are equal, false otherwise.

toString

public java.lang.String toString()
Returns a String representation of this AID. Includes whether or not the instance is provisional, and its reserved bits, if they are set.

Overrides:
toString in class OID

oidString

public java.lang.String oidString()
Returns the id itself in String form, for debugging.

Overrides:
oidString in class OID

hashCode

public int hashCode()
Provides a unique hashCode for this AID.

Overrides:
hashCode in class OID

writeObject

public void writeObject(java.io.ObjectOutputStream out)
                 throws java.io.IOException
Writes this AID to the output stream.

Throws:
java.io.IOException

readObject

public void readObject(java.io.ObjectInputStream in)
                throws java.io.IOException
Reads this AID's value from the input stream.

Throws:
java.io.IOException


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.