StateImpl Class

com.beasys.commerce.foundation
StateImpl Class

public class StateImpl

    extends BelongingImpl
    implements State

Represents a discrete state in a state machine or workflow. It is contained by a StateMachine and refered to by Transition

Related Topics

State
StateHome


Hierarchy
Object
  BelongingImpl
    StateImpl
All Implemented Interfaces

Belonging, BusinessSmartComponent, Cloneable, Comparable, RelationalReference, Serializable, State

Field Summary

public String
name
A name that identifies the state uniquely within the context of a state machine.
   
Fields from  com.beasys.commerce.foundation.BelongingImpl
__classIdentifier, __containingBelonging, __containingEntity, __mapKey, __sequenceNumber, _isDirty
 

Constructor Summary

StateImpl()

 

Method Summary

public int
compareTo(Object o)
Compares a given object with this Belonging.
public void
enter(Transition trans)
This method is invoked whenever the state is entered.
public void
error(Transition trans)
This method is invoked whenever the state is transitioned from in erro.
public void
exit(Transition trans)
This method is invoked whenever the state is transitioned from.
public TransitionPolicy
getEnterPolicy()
Get the transition policy that is invoked when the state is entered.
public TransitionPolicy
getErrorPolicy()
Set the transition policy that is invoked when the state is exited with an invalid transition.
public TransitionPolicy
getExitPolicy()
Get the transition policy that is invoked when the state is exited.
public String
getName()
Get the value of name
public String
interfaceName()
Returns the unqualified name of the interface as specified in the UML model.
public void
setByValue(Belonging value)
Intializes the Belonging based upon a supplied Belonging.
public void
setEnterPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is entered.
public void
setErrorPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is exited with an invalid transition.
public void
setExitPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is exited.
public void
setName(String name)
Set the value of name
public Belonging
value()
Returns a type safe shallow copy of the Belonging instance.
 
Methods from  com.beasys.commerce.foundation.BelongingImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clone, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, equals, get__classIdentifier, get__containingBelonging, get__containingEntity, get__containingEntityReference, get__mapKey, get__sequenceNumber, getPersistenceHelperPlugin, hashCode, set__classIdentifier, set__containingBelonging, set__containingEntity, set__containingEntityReference, set__mapKey, toString
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.beasys.commerce.foundation.Belonging
clone, equals, interfaceName, setByValue, value
 
Methods from interface java.lang.Comparable
compareTo
 
Methods from interface com.beasys.commerce.foundation.RelationalReference
get__classIdentifier, get__containingBelonging, get__containingEntity, get__mapKey, get__sequenceNumber, set__containingBelonging, set__containingEntity, set__mapKey
 
Methods from interface com.beasys.commerce.foundation.State
enter, error, exit, getEnterPolicy, getErrorPolicy, getExitPolicy, getName, setEnterPolicy, setErrorPolicy, setExitPolicy, setName
 

Field Detail

name

public String name
A name that identifies the state uniquely within the context of a state machine.
                  name
 [State] <*>------> [String] 

 

 

Constructor Detail

StateImpl

public StateImpl()
 

Method Detail

compareTo(Object) Method

public int compareTo(Object o)
Description copied from BelongingImpl.compareTo(Object)
Compares a given object with this Belonging.

Overrides
BelongingImpl.compareTo(Object)

Parameters

o
the Object to be compared.

Returns

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

enter(Transition) Method

public void enter(Transition trans)
This method is invoked whenever the state is entered. It searches for an enter policy and invokes it.


error(Transition) Method

public void error(Transition trans)
This method is invoked whenever the state is transitioned from in erro. It searches for an Error Policy and invokes it if present


exit(Transition) Method

public void exit(Transition trans)
This method is invoked whenever the state is transitioned from. It searches for an Exit Policy and invokes it if present.


getEnterPolicy() Method

public TransitionPolicy getEnterPolicy()
Get the transition policy that is invoked when the state is entered.


getErrorPolicy() Method

public TransitionPolicy getErrorPolicy()
Set the transition policy that is invoked when the state is exited with an invalid transition.


getExitPolicy() Method

public TransitionPolicy getExitPolicy()
Get the transition policy that is invoked when the state is exited.


getName() Method

public String getName()
Get the value of name

Returns

name.

interfaceName() Method

public String interfaceName()
Description copied from Belonging.interfaceName()
Returns the unqualified name of the interface as specified in the UML model.

Returns

The unqualified name of the belonging interface.

setByValue(Belonging) Method

public void setByValue(Belonging value)
Description copied from Belonging.setByValue(Belonging)
Intializes the Belonging based upon a supplied Belonging.

Overrides
BelongingImpl.setByValue(Belonging)

Parameters

value
The Belonging to use for initialization.

setEnterPolicy(TransitionPolicy) Method

public void setEnterPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is entered.


setErrorPolicy(TransitionPolicy) Method

public void setErrorPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is exited with an invalid transition.


setExitPolicy(TransitionPolicy) Method

public void setExitPolicy(TransitionPolicy policy)
Set a transition policy that is invoked when the state is exited.


setName(String) Method

public void setName(String name)
Set the value of name

Parameters

name
name to be added

value() Method

public Belonging value()
Description copied from Belonging.value()
Returns a type safe shallow copy of the Belonging instance.

Returns

A type safe shallow copy of this Belonging.