CollectionKey (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.engine.spi
Class CollectionKey

    java.lang.Object
      org.hibernate.engine.spi.CollectionKey

All Implemented Interfaces:
  Serializable

    public final class CollectionKey

extends Object
implements Serializable

Uniquely identifies a collection instance in a particular session.

See Also:
  Serialized Form

Constructor Summary
`CollectionKey(CollectionPersister persister, Serializable key)`
`CollectionKey(CollectionPersister persister, Serializable key, EntityMode em)`

Method Summary
`static CollectionKey` | `deserialize(ObjectInputStream ois, SessionImplementor session)` Custom deserialization routine used during deserialization of a Session/PersistenceContext for increased performance.
`boolean` | `equals(Object other)`
`int` | `generateHashCode()`
`Serializable` | `getKey()`
`String` | `getRole()`
`int` | `hashCode()`
`void` | `serialize(ObjectOutputStream oos)` Custom serialization routine used during serialization of a Session/PersistenceContext for increased performance.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CollectionKey

    public CollectionKey(CollectionPersister persister,
                         Serializable key)

### CollectionKey

    public CollectionKey(CollectionPersister persister,
                         Serializable key,
                         EntityMode em)

Method Detail

### equals

    public boolean equals(Object other)

  Overrides:
    `equals` in class `Object`

### generateHashCode

    public int generateHashCode()

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### getRole

    public String getRole()

### getKey

    public Serializable getKey()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### serialize

    public void serialize(ObjectOutputStream oos)
                   throws IOException

  Custom serialization routine used during serialization of a Session/PersistenceContext for increased performance.

  Parameters:
    `oos` - The stream to which we should write the serial data.
  Throws:
    `IOException`

### deserialize

    public static CollectionKey deserialize(ObjectInputStream ois,
                                            SessionImplementor session)
                                     throws IOException,
                                            ClassNotFoundException

  Custom deserialization routine used during deserialization of a Session/PersistenceContext for increased performance.

  Parameters:
    `ois` - The stream from which to read the entry.
    `session` - The session being deserialized.
  Returns:
    The deserialized CollectionKey
  Throws:
    `IOException`
    `ClassNotFoundException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.