net.ontopia.persistence.proxy
Class AtomicIdentity

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

public final class AtomicIdentity
extends Object
implements IdentityIF, 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(Object type, Object key)
          INTERNAL: Creates an identity instance of the given type with the given key.
 
Method Summary
 Object clone()
           
 Object createInstance()
          INTERNAL: Creates an object instance of the type defined by this identity.
 boolean equals(Object object)
           
 Object getKey(int index)
          INTERNAL: Returns the primary key component with the specified index.
 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(ObjectInput in)
           
 String toString()
           
 void writeExternal(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(Object type,
                      Object key)
INTERNAL: Creates an identity instance of the given type with the given key.

Method Detail

getType

public 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 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 Object createInstance()
                      throws 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:
Exception

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

writeExternal

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

readExternal

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

clone

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


Copyright © 2000-2012 Ontopia.