Package helma.objectmodel.db
Class DbKey
- java.lang.Object
-
- helma.objectmodel.db.DbKey
-
- All Implemented Interfaces:
Key
,java.io.Serializable
public final class DbKey extends java.lang.Object implements Key, java.io.Serializable
This is the internal representation of a database key. It is constructed from the logical table (type) name and the object's primary key within the table. Currently only single keys are supported.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object what)
java.lang.String
getID()
Get the key's ID partKey
getParentKey()
Get the key's parent keyjava.lang.String
getStorageName()
Get the key's storage type nameint
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
DbKey
public DbKey(DbMapping dbmap, java.lang.String id)
make a key for a persistent Object, describing its datasource and id.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object what)
- Overrides:
equals
in classjava.lang.Object
- Parameters:
what
- the other key to be compared with this one- Returns:
- true if both keys are identical
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- this key's hash code
-
getParentKey
public Key getParentKey()
Description copied from interface:Key
Get the key's parent key- Specified by:
getParentKey
in interfaceKey
- Returns:
- the key of this key's object's parent object
-
getStorageName
public java.lang.String getStorageName()
Description copied from interface:Key
Get the key's storage type name- Specified by:
getStorageName
in interfaceKey
- Returns:
- the unique storage name for this key's object
-
getID
public java.lang.String getID()
Description copied from interface:Key
Get the key's ID part
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation for this key
-
-