Class TemporalEntityKey
java.lang.Object
org.hibernate.engine.spi.EntityKey
org.hibernate.engine.spi.TemporalEntityKey
- All Implemented Interfaces:
Serializable
An
EntityKey for a temporal (historical) snapshot of an entity,
loaded from an audit table at a specific changeset identifier.
The changeset identifier is included in equals()/hashCode()
so that the persistence context naturally isolates entities at different
points in time. Entities with a temporal key are always read-only.
- Since:
- 7.4
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTemporalEntityKey(@Nullable Object id, EntityPersister persister, Object changesetId) Construct a unique identifier for a temporal snapshot of an entity. -
Method Summary
Modifier and TypeMethodDescriptionThe audit changeset identifier for this key, ornullfor non-temporal entities.booleanWhether this key refers to a temporal (historical) snapshot.toString()Methods inherited from class EntityKey
deserialize, equals, getEntityName, getIdentifier, getIdentifierValue, getPersister, hashCode, isBatchLoadable, serialize
-
Constructor Details
-
TemporalEntityKey
Construct a unique identifier for a temporal snapshot of an entity.- Parameters:
id- The entity idpersister- The entity persisterchangesetId- The changeset identifier (must not be null)
-
-
Method Details
-
getChangesetId
Description copied from class:EntityKeyThe audit changeset identifier for this key, ornullfor non-temporal entities. When non-null, this entity is a read-only historical snapshot.- Overrides:
getChangesetIdin classEntityKey
-
isTemporal
public boolean isTemporal()Description copied from class:EntityKeyWhether this key refers to a temporal (historical) snapshot.- Overrides:
isTemporalin classEntityKey
-
toString
-