Interface StateManagement


@Incubating public interface StateManagement

Integrates a state-management strategy with Hibernate's mapping model and mutation execution infrastructure.

The root contract identifies the state-management model for a mapping. Its direct methods currently build the auxiliary mapping artifact used to represent temporal, history, audit, and soft-delete state in the runtime mapping model. Legacy-only mutation hooks for that artifact are isolated in LegacyAuxiliaryMutationSupport.

Queue-specific execution concerns are exposed through nested integration contracts:

This separation keeps graph decomposition from depending on legacy coordinator concepts, and keeps the explicit legacy coordinator surface isolated for eventual removal.

Every concrete implementation of this interface should declare a field public static final StateManagement INSTANCE.

Since:
7.4
See Also:
  • StandardStateManagement
  • SoftDeleteStateManagement
  • TemporalStateManagement
  • HistoryStateManagement
  • AuditStateManagement
  • Method Details

    • createAuxiliaryMapping

      AuxiliaryMapping createAuxiliaryMapping(EntityPersister persister, RootClass bootDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)

      Creates the auxiliary entity mapping required by this state-management strategy, or null when the entity does not need one.

      Auxiliary mappings are rooted in the mapping model. Legacy-only mutation behavior is exposed separately through LegacyAuxiliaryMutationSupport.

    • createAuxiliaryMapping

      AuxiliaryMapping createAuxiliaryMapping(PluralAttributeMapping pluralAttributeMapping, Collection bootDescriptor, org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess creationProcess)

      Creates the auxiliary collection mapping required by this state-management strategy, or null when the collection does not need one.

      Auxiliary mappings are rooted in the mapping model. Legacy-only mutation behavior is exposed separately through LegacyAuxiliaryMutationSupport.

    • getGraphIntegration

      default StateManagementGraphIntegration getGraphIntegration()

      Provides the graph action-queue integration for this state-management strategy.

      The default integration contributes standard entity and collection mutation plans.

    • getLegacyIntegration

      StateManagementLegacyIntegration getLegacyIntegration()

      Provides the legacy action-queue integration for this state-management strategy.

      This is the coordinator-based integration used by the legacy queue. It is intentionally isolated from the root contract so the legacy surface can be retired without disturbing mapping semantics or graph integration.