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.SerializableUniquely 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 CollectionKeydeserialize(java.io.ObjectInputStream ois, SessionImplementor session)Custom deserialization routine used during deserialization of a Session/PersistenceContext for increased performance.booleanequals(java.lang.Object other)java.io.SerializablegetKey()java.lang.StringgetRole()inthashCode()voidserialize(java.io.ObjectOutputStream oos)Custom serialization routine used during serialization of a Session/PersistenceContext for increased performance.java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
serialize
public void serialize(java.io.ObjectOutputStream oos) throws java.io.IOExceptionCustom 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.IOExceptionjava.lang.ClassNotFoundException
-
-