Modifier and Type | Class and Description |
---|---|
static class |
A.Attribute |
static interface |
A.Behaviour
On entry procedures for this entity.
|
static interface |
A.BehaviourFactory
A factory that creates behaviour for a given entity.
|
static class |
A.Events
Event declarations.
|
static class |
A.State
The list of all states from the state machine for this entity.
|
Constructor and Description |
---|
A()
No argument constructor required by JPA.
|
A(Integer id)
Constructor using id.
|
Modifier and Type | Method and Description |
---|---|
A |
cancelSignal(Event<A> event) |
A |
cancelSignal(String eventSignatureKey) |
static A |
create(CreationEvent<A> creationEvent)
Static creator method using CreationEvent.
|
static A |
create(javax.persistence.EntityManager em,
CreationEvent<A> event)
Static creator method associated with the creation transition to 'Created' via event 'Create'.
|
static A |
create(Integer id)
Static creator method using id.
|
static A.BehaviourFactory |
createBehaviourFactory(Class<? extends A.Behaviour> cls)
Returns a BehaviourFactory on the assumption that the given class
has a single constructor with one parameter of type A.
|
A |
delete()
Same as this.remove()
|
A |
event(Event<A> event)
Synchronously runs the on entry procedure associated
with this event and also any signals to self that are
made during the procedure.
|
static com.google.common.base.Optional<A> |
find(Integer id) |
static A.BehaviourFactory |
getBehaviourFactory()
Returns the singleton BehaviourFactory for this.
|
Integer |
getId()
Returns the identifier for this entity.
|
String |
getState()
For internal use only by the state machine but is persisted by the jpa provider.
|
EntityHelper |
helper()
Returns the Helper for this instance.
|
A |
load() |
A |
load(javax.persistence.EntityManager em)
Does a merge then a refresh and returns a new updated merged instance.
|
A |
merge(javax.persistence.EntityManager em)
Same as EntityManager.merge() except allows method chaining.
|
A |
persist()
Same as
persist(Context.em()) . |
A |
persist(javax.persistence.EntityManager em)
Same as EntityManager.persist() except allows method chaining.
|
A |
refresh(javax.persistence.EntityManager em)
Same as EntityManager.refresh() except inverted to facilitate method chaining.
|
A |
remove()
Same as EntityManager.remove() except inverted to facilitate method chaining.
|
A |
remove(javax.persistence.EntityManager em)
Same as EntityManager.remove() except inverted to facilitate method chaining.
|
static SelectBuilder<A> |
select() |
static SelectBuilder<A> |
select(BooleanExpression<A> where) |
static void |
setBehaviourFactory(A.BehaviourFactory factory)
Sets the BehaviourFactory for all instances of
this class.
|
static void |
setBehaviourFactory(Class<? extends A.Behaviour> cls)
Sets the BehaviourFactory for all instances of
this class using the given Behaviour class as the base.
|
A |
setId_(Integer id) |
void |
setId(Integer id) |
void |
setState(A.State state)
Sets the current state.
|
void |
setState(String state)
For internal use only by the state machine but is persisted by the jpa provider.
|
A |
signal(Event<A> event)
Asychronously queues the given signal against this entity for processing.
|
A |
signal(Event<A> event,
scala.concurrent.duration.Duration delay)
Asychronously queues the given signal against this entity for processing
after the delay specified.
|
A |
signal(Event<A> event,
long time)
Asychronously queues the given signal against this entity for processing
at the epoch time in ms specified.
|
String |
uniqueId()
Returns a unique id for this instance as a String.
|
public A()
public A(Integer id)
public static void setBehaviourFactory(A.BehaviourFactory factory)
public static void setBehaviourFactory(Class<? extends A.Behaviour> cls)
public static A.BehaviourFactory getBehaviourFactory()
public static A create(CreationEvent<A> creationEvent)
public EntityHelper helper()
public String uniqueId()
public Integer getId()
public void setId(Integer id)
public String getState()
public void setState(String state)
public void setState(A.State state)
public A signal(Event<A> event)
public A signal(Event<A> event, scala.concurrent.duration.Duration delay)
public A signal(Event<A> event, long time)
public A event(Event<A> event)
public static A create(javax.persistence.EntityManager em, CreationEvent<A> event)
public A merge(javax.persistence.EntityManager em)
public A persist(javax.persistence.EntityManager em)
public A persist()
persist(Context.em())
. Returns this.public A remove(javax.persistence.EntityManager em)
public A remove()
public A delete()
public A refresh(javax.persistence.EntityManager em)
public A load(javax.persistence.EntityManager em)
public A load()
public static A.BehaviourFactory createBehaviourFactory(Class<? extends A.Behaviour> cls)
public static SelectBuilder<A> select(BooleanExpression<A> where)
public static SelectBuilder<A> select()
Copyright © 2012–2022. All rights reserved.