Package org.hibernate.engine.spi
Class CollectionKey
- java.lang.Object
-
- org.hibernate.engine.spi.CollectionKey
-
- All Implemented Interfaces:
java.io.Serializable
public final class CollectionKey extends java.lang.Object implements java.io.Serializable
Uniquely identifies a collection instance in a particular session.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionKey(CollectionPersister persister, java.io.Serializable key)
CollectionKey(CollectionPersister persister, java.io.Serializable key, EntityMode em)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CollectionKey
deserialize(java.io.ObjectInputStream ois, SessionImplementor session)
Custom deserialization routine used during deserialization of a Session/PersistenceContext for increased performance.boolean
equals(java.lang.Object other)
java.io.Serializable
getKey()
java.lang.String
getRole()
int
hashCode()
void
serialize(java.io.ObjectOutputStream oos)
Custom serialization routine used during serialization of a Session/PersistenceContext for increased performance.java.lang.String
toString()
-
-
-
Constructor Detail
-
CollectionKey
public CollectionKey(CollectionPersister persister, java.io.Serializable key)
-
CollectionKey
@Deprecated public CollectionKey(CollectionPersister persister, java.io.Serializable key, EntityMode em)
Deprecated.The EntityMode parameter is now ignored. Use the other constructor.
-
-
Method Detail
-
getRole
public java.lang.String getRole()
-
getKey
public java.io.Serializable getKey()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
serialize
public void serialize(java.io.ObjectOutputStream oos) throws java.io.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:
java.io.IOException
-
deserialize
public static CollectionKey deserialize(java.io.ObjectInputStream ois, SessionImplementor session) throws java.io.IOException, java.lang.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:
java.io.IOException
java.lang.ClassNotFoundException
-
-