net.ontopia.persistence.proxy
Class AtomicIdentity

java.lang.Object
  extended by net.ontopia.persistence.proxy.AtomicIdentity
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, IdentityIF

public final class AtomicIdentity
extends java.lang.Object
implements IdentityIF, java.io.Externalizable

INTERNAL: Class used for representing data store object identities with only a single key. See IdentityIF.

See Also:
Serialized Form

Constructor Summary
AtomicIdentity()
          INTERNAL: Constructor that is used for externalization purposes only.
AtomicIdentity(java.lang.Object type, java.lang.Object key)
          INTERNAL: Creates an identity instance of the given type with the given key.
 
Method Summary
 java.lang.Object clone()
           
 java.lang.Object createInstance()
          INTERNAL: Creates an object instance of the type defined by this identity.
 boolean equals(java.lang.Object object)
           
 java.lang.Object getKey(int index)
          INTERNAL: Returns the primary key component with the specified index.
 java.lang.Object getType()
          INTERNAL: Returns the type of object.
 int getWidth()
          INTERNAL: Returns the number of primary key components that the identity has.
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomicIdentity

public AtomicIdentity()
INTERNAL: Constructor that is used for externalization purposes only.


AtomicIdentity

public AtomicIdentity(java.lang.Object type,
                      java.lang.Object key)
INTERNAL: Creates an identity instance of the given type with the given key.

Method Detail

getType

public java.lang.Object getType()
Description copied from interface: IdentityIF
INTERNAL: Returns the type of object. The returned value indicates the classification of the identified object. See also PersistentIF._p_getType().

Specified by:
getType in interface IdentityIF

getWidth

public int getWidth()
Description copied from interface: IdentityIF
INTERNAL: Returns the number of primary key components that the identity has.

Specified by:
getWidth in interface IdentityIF

getKey

public java.lang.Object getKey(int index)
Description copied from interface: IdentityIF
INTERNAL: Returns the primary key component with the specified index.

Specified by:
getKey in interface IdentityIF

createInstance

public java.lang.Object createInstance()
                                throws java.lang.Exception
Description copied from interface: IdentityIF
INTERNAL: Creates an object instance of the type defined by this identity.

Specified by:
createInstance in interface IdentityIF
Throws:
java.lang.Exception

hashCode

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

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

clone

public java.lang.Object clone()
Specified by:
clone in interface IdentityIF
Overrides:
clone in class java.lang.Object


Copyright © 2000-2012 Ontopia.