Package helma.objectmodel.db

# Class MultiKey

java.lang.Object
helma.objectmodel.db.MultiKey

All Implemented Interfaces:
  `Key`, `Serializable`

public final class MultiKey extends Object implements Key, Serializable
This is the internal representation of a database key with multiple columns. It is constructed from the logical table (type) name and the column name/column value pairs that identify the key's object NOTE: This class doesn't fully support the Key interface - getID always returns null since there is no unique key (at least we don't know about it).

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`MultiKey(DbMapping dbmap, Map parts)`
Make a key for a persistent Object, describing its datasource and key parts.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object what)`
`String`
`getID()`
Get the key's ID part
`Key`
`getParentKey()`
Get the key's parent key
`String`
`getStorageName()`
Get the key's storage type name
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### MultiKey

public MultiKey(DbMapping dbmap, Map parts)
Make a key for a persistent Object, describing its datasource and key parts.

## Method Details

### equals

public boolean equals(Object what)

Overrides:
  `equals` in class `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 class `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 interface `Key`
Returns:
  the key of this key's object's parent object

### getStorageName

public String getStorageName()
Description copied from interface: `Key`
Get the key's storage type name

Specified by:
  `getStorageName` in interface `Key`
Returns:
  the unique storage name for this key's object

### getID

public String getID()
Description copied from interface: `Key`
Get the key's ID part

Specified by:
  `getID` in interface `Key`
Returns:
  this key's object's id

### toString

public String toString()

Overrides:
  `toString` in class `Object`
Returns:
  a string representation for this key