State Transitions

The Persistence Infrastructure provides support for implementing entities which are state machines. These entities each have their own "lifecycle", and the state of a particular entity instance is held in a database column.

Typically, the state of an entity instance may be retrieved, but changes to the state must be controlled through specialized methods.

This chapter explains how to implement an entity which has a state-based lifecycle.