Class CollectionKey
java.lang.Object
org.hibernate.engine.spi.CollectionKey
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TemporalCollectionKey
public sealed class CollectionKey
extends Object
implements Serializable
permits TemporalCollectionKey
Uniquely identifies a collection instance in a particular session.
For temporal collections, use TemporalCollectionKey which includes a changeset identifier
to isolate historical snapshots in the persistence context.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CollectionKeydeserialize(ObjectInputStream ois, SessionImplementor session) Custom deserialization routine used during deserialization of a Session/PersistenceContext for increased performance.boolean@Nullable ObjectThe audit changeset identifier for this key, ornullfor non-temporal collections.getKey()getRole()inthashCode()booleanWhether this key refers to a temporal (historical) collection snapshot.voidCustom serialization routine used during serialization of a Session/PersistenceContext for increased performance.toString()
-
Constructor Details
-
CollectionKey
-
-
Method Details
-
getRole
-
getKey
-
getChangesetId
The audit changeset identifier for this key, ornullfor non-temporal collections. -
isTemporal
public boolean isTemporal()Whether this key refers to a temporal (historical) collection snapshot. -
toString
-
equals
-
hashCode
-
serialize
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:
IOExceptionClassNotFoundException
-