Package net.ontopia.persistence.proxy
Class WrappedIdentity
- java.lang.Object
-
- net.ontopia.persistence.proxy.WrappedIdentity
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,IdentityIF
public final class WrappedIdentity extends Object implements IdentityIF, Externalizable
INTERNAL: Class used for wrapping other identities. SeeIdentityIF
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WrappedIdentity()
INTERNAL: Constructor that is used for externalization purposes only.WrappedIdentity(IdentityIF wrapped)
INTERNAL: Creates an identity instance that wraps another identity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.Class<?>
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()
static IdentityIF
wrap(IdentityIF identity)
INTERNAL: Factory method that wraps the identity in a WrappedIdentity if the identity itself is not a WrappedIdentity.void
writeExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
WrappedIdentity
public WrappedIdentity()
INTERNAL: Constructor that is used for externalization purposes only.
-
WrappedIdentity
public WrappedIdentity(IdentityIF wrapped)
INTERNAL: Creates an identity instance that wraps another identity.
-
-
Method Detail
-
wrap
public static IdentityIF wrap(IdentityIF identity)
INTERNAL: Factory method that wraps the identity in a WrappedIdentity if the identity itself is not a WrappedIdentity.
-
getType
public Class<?> getType()
Description copied from interface:IdentityIF
INTERNAL: Returns the type of object. The returned value indicates the classification of the identified object. See alsoPersistentIF._p_getType()
.- Specified by:
getType
in interfaceIdentityIF
-
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 interfaceIdentityIF
-
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 interfaceIdentityIF
-
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 interfaceIdentityIF
- Throws:
Exception
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
clone
public Object clone()
- Specified by:
clone
in interfaceIdentityIF
- Overrides:
clone
in classObject
-
-