@Managed public abstract class Concept extends Entity
Modifier and Type | Class and Description |
---|---|
protected static class |
Concept.LookupType
Lookup operation type - unique, or not.
|
INVALID_TYPE_IDENTIFIER
Modifier | Constructor and Description |
---|---|
protected |
Concept()
Java constructor
|
protected |
Concept(long id)
Rule or Rule Function constructor
|
Modifier and Type | Method and Description |
---|---|
void |
assertConcept()
Assert a concept and start a run-to-completion cycle.
|
void |
assertConceptWithoutRunToCompletion()
Assert a concept, but do not start a run-to-completion cycle.
|
protected static java.lang.Integer |
cardinality(java.lang.Class<?> klass,
java.lang.String keyName,
java.util.HashMap<java.lang.String,java.lang.Object> keyFields)
Determine the cardinality of the specified query
|
protected long |
getParent()
Get the parent identifier for a contained type
|
protected static java.lang.Object |
lookupQuery(java.lang.Class<?> klass,
java.lang.String keyName,
java.lang.String lockMode,
Concept.LookupType lookupType,
java.lang.String direction,
java.util.HashMap<java.lang.String,java.lang.Object> keyFields)
Execute a query.
|
static LockMode |
mapLockMode(java.lang.String lockMode)
Map the lock mode value
|
protected static KeyOrderedBy |
mapOrderBy(java.lang.String direction)
Map the order-by direction
|
static com.tibco.cep.runtime.model.element.Concept |
refresh(com.tibco.cep.runtime.model.element.Concept original)
Refresh the concept
|
static void |
refreshArray(com.tibco.cep.runtime.model.element.Concept[] concepts)
Refresh an array of concepts
|
protected void |
setParent(long parent)
Set the parent identifier for a contained type
|
protected boolean[] |
toPrimitiveArray(java.lang.Boolean[] a)
Map auto-box array to primitive array
|
protected java.util.Date[] |
toPrimitiveArray(java.util.Date[] a)
Map auto-box array to primitive array
|
protected double[] |
toPrimitiveArray(java.lang.Double[] a)
Map auto-box array to primitive array
|
protected int[] |
toPrimitiveArray(java.lang.Integer[] a)
Map auto-box array to primitive array
|
protected long[] |
toPrimitiveArray(java.lang.Long[] a)
Map auto-box array to primitive array
|
protected java.lang.String[] |
toPrimitiveArray(java.lang.String[] a)
Map auto-box array to primitive array
|
java.lang.String |
toString() |
static void |
update(com.tibco.cep.runtime.model.element.Concept concept)
Update a concept in shared memory
|
static void |
updateArray(com.tibco.cep.runtime.model.element.Concept[] concepts)
Update an array of concepts
|
assertEntity, checkActive, getExtId, getHandle, getHandle, getId, load, mapArray, mapHandle, mapHandleArray, register
protected Concept()
protected Concept(long id)
id
- Unique identifierpublic final void assertConcept() throws ObjectNotUniqueError, ResourceUnavailableException
This starts a new run-to-completion (RTC) cycle. A new transaction is started if one is not already active. The RTC cycle is complete when this method returns. RETE working memory is cleared at the end of the RTC cycle.
If the concept was previously loaded into working memory this method quietly does nothing.
ObjectNotUniqueError
- Duplicate external identifierResourceUnavailableException
- Rules engine not runningpublic final void assertConceptWithoutRunToCompletion() throws ObjectNotUniqueError, ResourceUnavailableException
Assert a concept into the RETE, but do not start a run-to-completion cycle.
If the concept was previously loaded into working memory this method quietly does nothing.
ObjectNotUniqueError
- Duplicate external identifierResourceUnavailableException
- Rules engine not runningprotected static java.lang.Object lookupQuery(java.lang.Class<?> klass, java.lang.String keyName, java.lang.String lockMode, Concept.LookupType lookupType, java.lang.String direction, java.util.HashMap<java.lang.String,java.lang.Object> keyFields)
Unique queries return a concept or, null if not found. The concept is added to working memory in the current RTC.
Non-unique or ordered queries return an iterator. Concepts returned in the iterator or not added to working memory in the current RTC until they are accessed via the returned iterator.
klass
- Concept class.keyName
- Key name.lockMode
- The lock mode to use when performing the query.lookupType
- Specify whether this is a unique or non-unique query.direction
- Ordering for non-unique queries.keyFields
- Query key fields.protected static java.lang.Integer cardinality(java.lang.Class<?> klass, java.lang.String keyName, java.util.HashMap<java.lang.String,java.lang.Object> keyFields)
klass
- Concept classkeyName
- Key namekeyFields
- Key fieldspublic static LockMode mapLockMode(java.lang.String lockMode)
lockMode
- User provided lock mode valueA user provided lockMode value of read is mapped to a READLOCK.
A user provided lockMode value of write is mapped to WRITELOCK
All other values are mapped to NOLOCK.
protected static KeyOrderedBy mapOrderBy(java.lang.String direction)
direction
- User provided order-by directionA user provided direction value of descending is mapped to a DESCENDING.
All other values are mapped to ASCENDING.
public static com.tibco.cep.runtime.model.element.Concept refresh(com.tibco.cep.runtime.model.element.Concept original)
Concept values are refreshed from shared memory.
original
- Concept to refresh.public static void refreshArray(com.tibco.cep.runtime.model.element.Concept[] concepts)
All concepts in the array are refreshed from shared memory
concepts
- Concept array to refreshpublic static void update(com.tibco.cep.runtime.model.element.Concept concept)
Flush concepts to shared memory
concept
- Concept to flush to shared memory.public static void updateArray(com.tibco.cep.runtime.model.element.Concept[] concepts)
All concepts in the array are updated in shared memory if they have been modified in the current RTC.
concepts
- Concept array to updateprotected final void setParent(long parent)
parent
- Parent identifierprotected final long getParent()
protected final long[] toPrimitiveArray(java.lang.Long[] a)
a
- Array to mapprotected final int[] toPrimitiveArray(java.lang.Integer[] a)
a
- Array to mapprotected final boolean[] toPrimitiveArray(java.lang.Boolean[] a)
a
- Array to mapprotected final double[] toPrimitiveArray(java.lang.Double[] a)
a
- Array to mapprotected final java.lang.String[] toPrimitiveArray(java.lang.String[] a)
a
- Array to mapprotected final java.util.Date[] toPrimitiveArray(java.util.Date[] a)
a
- Array to map