com.softwareag.centrasite.appl.framework.beans
Class KeyImpl

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.beans.KeyImpl
All Implemented Interfaces:
Key, java.io.Serializable

public class KeyImpl
extends java.lang.Object
implements Key

A registry objects key. The key may be temporary, in which case it is replaced with the actual key later on.

See Also:
Serialized Form

Constructor Summary
KeyImpl()
          Creates a new, temporary key.
KeyImpl(java.lang.String pId)
          Creates a new key, which resembles an object that exists in the database with the given id.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getId()
          Returns the keys ID.
 int hashCode()
           
 boolean isTemporary()
          Returns, whether the key is temporary.
 void setId(java.lang.String pId)
          Sets the keys ID.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyImpl

public KeyImpl()
Creates a new, temporary key. This is for objects, which haven't yet been inserted into the database.


KeyImpl

public KeyImpl(java.lang.String pId)
Creates a new key, which resembles an object that exists in the database with the given id.

Method Detail

hashCode

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

equals

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

getId

public java.lang.String getId()
Returns the keys ID.

Specified by:
getId in interface Key
Returns:
id of the key.

setId

public void setId(java.lang.String pId)
Sets the keys ID. This is used for new objects,


isTemporary

public boolean isTemporary()
Returns, whether the key is temporary.