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