EntityStateJob.State

public class State implements ToElementable

The State instance represents a single entity state. This class is used for concrete states (the state of a stateful entity, say a Record) and abstract states (states which are part of a StateModel).

States are identified via their name and the name of the model to which they belong.

States are represented by Records with the state’s name as the Record name. They belong to a StateModel iff the StateModel RecordType references the State Record. Each State should only belong to one StateModel.

Furthermore, States are the start or end point of Transitions which belong to the same StateModel. Each State can be part of several transitions at the same time.

Note: The purpose of this should not be confused with EntityStatus which is purely for internal use.

Author:

Timm Fitschen (t.fitschen@indiscale.com)

Constructors

State

public State(EntityInterface stateEntity, EntityInterface stateModelEntity)

Methods

addToElement

public void addToElement(Element ret)

Serialize this State into XML.

The result looks approximately like this: <State name=”My name” model=”Model’s name”/>

createStateProperty

public Property createStateProperty()

Create a Property which represents the current entity state of a stateful entity.

Throws:
Returns:

stateProperty

equals

public boolean equals(Object obj)

getStateACL

public EntityACL getStateACL()

getStateDescription

public String getStateDescription()

getStateEntity

public EntityInterface getStateEntity()

getStateId

public EntityID getStateId()

getStateModel

public StateModel getStateModel()

getStateModelEntity

public EntityInterface getStateModelEntity()

getStateModelName

public String getStateModelName()

hashCode

public int hashCode()

isFinal

public boolean isFinal()
Throws:
Returns:

true iff this state is a final state of its StateModel.

isInitial

public boolean isInitial()
Throws:
Returns:

true iff this state is an initial state of its StateModel.

toString

public String toString()