public abstract class Entity extends java.lang.Object implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected static int |
INVALID_TYPE_IDENTIFIER
Invalid type identifier constant
|
Constructor and Description |
---|
Entity() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertEntity(java.lang.Boolean startRTC)
Assert an entity
|
protected static void |
checkActive()
Check that the rules engine is running in this JVM
|
protected java.lang.String |
getExtId()
Get the external identifier for this entity.
|
protected com.tibco.cep.runtime.model.element.impl.EntityImpl |
getHandle(boolean load)
Get a RETE handle
|
static com.tibco.cep.runtime.model.element.impl.EntityImpl |
getHandle(Entity entity)
Get the RETE handle for an entity
|
long |
getId()
Get the unique identifier for this entity
|
void |
load()
Load an entity into working memory.
|
static java.util.ArrayList<com.tibco.cep.kernel.model.entity.Entity> |
mapArray(Entity[] entities)
Map an array of entities to their implementation objects
|
static Entity |
mapHandle(com.tibco.cep.kernel.model.entity.Entity handle)
Map a RETE handle to a managed object entity
|
static java.util.ArrayList<Entity> |
mapHandleArray(com.tibco.cep.kernel.model.entity.Entity[] handles)
Map an array of RETE handles to managed entities
|
protected void |
register(long id)
Register this entity
|
java.lang.String |
toString() |
protected static final int INVALID_TYPE_IDENTIFIER
public Entity()
public final void load() throws ResourceUnavailableException
The entity is not asserted, it does not cause any rules to be triggered.
Calling this method on entities that are already loaded into working memory quietly does nothing.
ResourceUnavailableException
- Rules engine not runningpublic final long getId()
public java.lang.String toString()
toString
in class java.lang.Object
protected void assertEntity(java.lang.Boolean startRTC) throws com.tibco.cep.kernel.model.knowledgebase.DuplicateExtIdException
startRTC
- True starts an RTC. False just asserts the entitycom.tibco.cep.kernel.model.knowledgebase.DuplicateExtIdException
- Duplicated external identifierprotected java.lang.String getExtId()
Default implementation returns an empty string. Overridden in sub-types if they have mapped a user key to an external identifier
protected final void register(long id)
id
- Entity identifierpublic static Entity mapHandle(com.tibco.cep.kernel.model.entity.Entity handle)
If the handle is dirty, shared memory is updated before returning the mapped entity.
handle
- Handle to map. Can be null.public static java.util.ArrayList<Entity> mapHandleArray(com.tibco.cep.kernel.model.entity.Entity[] handles)
handles
- Handle array to mappublic static java.util.ArrayList<com.tibco.cep.kernel.model.entity.Entity> mapArray(Entity[] entities)
entities
- Entity array to mapprotected static void checkActive()
public static com.tibco.cep.runtime.model.element.impl.EntityImpl getHandle(Entity entity)
N.B. - this method is static so that it isn't dispatched on remote objects since it is accessing local POJOs
entity
- Entity for which to get associated handle object. May be null.protected final com.tibco.cep.runtime.model.element.impl.EntityImpl getHandle(boolean load)
load
- True if handle should be loaded into working
memory if not already loaded, false do not load into working memory.