|
IBM Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.cha.ejb.CHAInstanceDBFactory
public class CHAInstanceDBFactory
This class is to manipulate remote context stored in DB.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Constructor Summary | |
---|---|
CHAInstanceDBFactory()
|
Method Summary | |
---|---|
void |
addChild(java.lang.String childInstanceID,
java.lang.String instanceID)
Adds a child specified by the parameter to the children list of current context. |
void |
addElement(java.lang.String instanceID,
java.io.Serializable anElement)
Adds an element to the Context |
static void |
chainTo(java.lang.String instanceID,
java.lang.String parentInstanceID)
Chains this context to the context named specified by parentInstanceID. |
void |
clearKeyedCollection(java.lang.String instanceID)
Clears the context (current level only) by destroying the current keyed collection associated and replacing it with a new one. |
void |
clearKeyedCollection(java.lang.String instanceID,
boolean keepKCollStatus,
boolean clearOnlyValues)
This method clears both the typed and non-typed elements in the context keyed collection. |
boolean |
containsChild(java.lang.String instanceID,
java.lang.String aContextName)
Returns true if this context has a child with the name aContextName. |
Vector |
fields(java.lang.String instanceID)
Returns all the data fields, which are addressable from this context. |
java.lang.String |
getAncestorByName(java.lang.String instanceID,
java.lang.String aContextName)
Searches the context tree for an ancestor Context named aContextName and returns the first matching context. |
static CHAInstanceLocal |
getCHAInstanceLocal(java.lang.String instanceID)
|
static Vector |
getChildren(java.lang.String instanceID)
Return the children of the context |
Vector |
getChildrenAtAnyLevel(java.lang.String currentInstanceID)
Get the children of a remote context at any level from the context tree. |
static Context |
getContext(java.lang.String instanceID)
Get the context object according to the instanceID. |
java.lang.String |
getContextByType(java.lang.String instanceID,
java.lang.String aTypeName)
Returns the instanceID of the first context that matches its type to aTypeName. |
protected static Context |
getContextForCommit(java.lang.String instanceID)
get context from DB. |
java.lang.String |
getContextNamed(java.lang.String contextName)
Searches the context tree from the root context for a context named aContextName |
java.io.Serializable |
getElementAt(java.lang.String instanceID,
java.lang.String aCompositeKey,
boolean isReadOnly)
Returns the element of its keyedCollection,or keyedCollections of the upper contexts which is located at aCompositeKey path. |
KeyedCollection |
getKeyedCollection(java.lang.String instanceID)
Returns the keyedCollection attribute. |
java.lang.String |
getLevel(java.lang.String instanceID)
We can define an attribute --level-- in dsectxt.xml file to indicate level of the context. |
java.lang.String |
getNextContextHorizontal(java.lang.String currentInstanceID)
The method used to iterate over the context tree. |
java.lang.String |
getNextContextVertical(java.lang.String parentInstanceID,
java.lang.String childInstanceID)
The method used to iterate over the context tree. |
static java.lang.String |
getParentID(java.lang.String childInstanceID)
Return the parent instance ID. |
static Context |
getRootContext()
Get the context of the root context. |
static java.lang.String |
getRootContextInstanceID()
Get the instance ID of the root context. |
java.lang.String |
getTagName(java.lang.String instanceID)
Returns a String used by the externalizer. |
java.lang.String |
getTypeName(java.lang.String instanceID)
Get the type name of the context specified by the parameter instanceID. |
static void |
InitContext(Context aContext,
java.lang.String contextName,
java.lang.String typeName,
java.lang.String parentID,
java.lang.String newInstanceID,
boolean isRoot)
Creates a new CHAInstanceMemoryFactory Entity based on a context name, and the following optional params: type name parent CHAInstanceMemoryFactory remote interface The name specified in the context name must exist in the external XML definiton files. |
boolean |
isAddToDynamicKColl(java.lang.String instanceID)
Returns the value of the addToDynamicKColl property. |
boolean |
isChained(java.lang.String instanceID)
return true/false based on the existence of a parent ID |
boolean |
isReadOnly(java.lang.String instanceID)
If the definition of this context in dsetxt.xml has the attribute readonly="true", this method will return true, otherwise, false is returned. |
static boolean |
isRoot(java.lang.String instanceID)
Judge if the context is a root context. |
Context |
newDynamicContext(java.lang.String contextName)
Creates a new dynamic Local context with a supplied name. |
void |
prune(java.lang.String currentInstanceID)
Removes this context and its children from the context tree. |
DataElement |
removeAt(java.lang.String instanceID,
java.lang.String aCompositeKey)
Removes aCompositeKey element of its keyedCollection. |
DataElement |
removeAtAnyLevel(java.lang.String instanceID,
java.lang.String aCompositeKey)
Removes an element of its keyedCollection, or the keyedCollections in the upper contexts, located in the aCompositeKey path. |
static void |
removeChild(java.lang.String childInstanceID)
Remove the child-parent relationship of two contexts. |
static void |
removeContext(java.lang.String instanceID)
Remove the whole row of this context from DB. |
void |
setAddToDynamicKColl(java.lang.String instanceID,
boolean newValue)
Sets the value of the addToDynamicKColl property. |
static void |
setContext(java.lang.String instanceID,
Context aContext)
Set a context object into the hashtable. |
void |
setKCollDynamic(java.lang.String instanceID,
boolean aValue)
Set the value to the attribute dynamic for the keyedCollection in this context. |
void |
setKeyedCollection(java.lang.String instanceID,
java.io.Serializable akeyedCollection)
set the context's KeyedCollection. |
static void |
setName(java.lang.String instanceID,
java.lang.String aContextName)
|
static void |
setParentID(java.lang.String childInstanceID,
java.lang.String parentInstanceID)
Establish the child-parent relationship |
static void |
setRoot(java.lang.String instanceID)
Set the instance ID of the root context. |
static void |
setTypeName(java.lang.String instanceID,
java.lang.String aTypeName)
|
int |
setValueAt(java.lang.String instanceID,
SortedTable aSortedTable)
The function is similiar to setValueAt(String, Object) except that set pairs of keys and values stored in aSortedTable via one method. |
void |
setValueAt(java.lang.String instanceID,
java.lang.String aKey,
java.io.Serializable aValue)
Adds a value to the Context Sets the value of the element of its keyedCollection, or keyedCollections of the upper contexts, located in the aCompositeKey path. |
Vector |
toStrings(java.lang.String instanceID)
Returns a visual representation of this context. |
int |
trySetElementAt(java.lang.String instanceID,
java.lang.String aCompositeKey,
java.io.Serializable aValue)
Set the value of the element of its keyedCollection, or keyedCollections of the upper contexts which is located at aCompositeKey path. |
void |
unchain(java.lang.String instanceID)
Removes this context and all its children from the context tree. |
void |
updateEntityCache()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public CHAInstanceDBFactory()
Method Detail |
---|
public static Context getContext(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
protected static Context getContextForCommit(java.lang.String instanceID) throws CHAPersistenceException
instanceID
- specifing the context
CHAPersistenceException
public static void setContext(java.lang.String instanceID, Context aContext) throws CHAPersistenceException
instanceID
- aContext
-
CHAPersistenceException
public void addElement(java.lang.String instanceID, java.io.Serializable anElement) throws CHAPersistenceException
instanceID
- anElement
-
CHAPersistenceException
public static boolean isRoot(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public static java.lang.String getParentID(java.lang.String childInstanceID) throws CHAPersistenceException
childInstanceID
-
CHAPersistenceException
public static void setParentID(java.lang.String childInstanceID, java.lang.String parentInstanceID) throws CHAPersistenceException
childInstanceID
- parentInstanceID
-
CHAPersistenceException
public static void chainTo(java.lang.String instanceID, java.lang.String parentInstanceID) throws CHAPersistenceException
CHAPersistenceException
public boolean isChained(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public void setAddToDynamicKColl(java.lang.String instanceID, boolean newValue) throws CHAPersistenceException
instanceID
- newValue
- The new value of the property.
CHAPersistenceException
public void setValueAt(java.lang.String instanceID, java.lang.String aKey, java.io.Serializable aValue) throws CHAPersistenceException
instanceID
- aKey
- aValue
-
CHAPersistenceException
public int trySetElementAt(java.lang.String instanceID, java.lang.String aCompositeKey, java.io.Serializable aValue) throws CHAPersistenceException
instanceID
- aCompositeKey
- aValue
-
CHAPersistenceException
public java.io.Serializable getElementAt(java.lang.String instanceID, java.lang.String aCompositeKey, boolean isReadOnly) throws CHAPersistenceException
instanceID
- aCompositeKey
- isReadOnly
-
CHAPersistenceException
public void setKeyedCollection(java.lang.String instanceID, java.io.Serializable akeyedCollection) throws CHAPersistenceException
instanceID
- akeyedCollection
-
CHAPersistenceException
public void clearKeyedCollection(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public void clearKeyedCollection(java.lang.String instanceID, boolean keepKCollStatus, boolean clearOnlyValues) throws CHAPersistenceException
keepKCollStatus
- boolean (false - clear also the context kColl attributes; true -
keep the context kColl attributes and clear only the kColl data
elements)clearOnlyValues
- boolean (false - clear all attributes of the context kColl data
elements; true - clear only kColl data elements values)
java.io.IOException
- -
If keepKCollStatus or clearOnlyValues are false and the keyed
collection has not been defined in the generic data file or in
the generic types file
CHAPersistenceException
public Vector fields(java.lang.String instanceID) throws CHAPersistenceException
CHAPersistenceException
public KeyedCollection getKeyedCollection(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public java.lang.String getAncestorByName(java.lang.String instanceID, java.lang.String aContextName) throws CHAPersistenceException
aContextName
- java.lang.String
CHAPersistenceException
public java.lang.String getTypeName(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public java.lang.String getContextByType(java.lang.String instanceID, java.lang.String aTypeName) throws CHAPersistenceException
instanceID
- aTypeName
-
CHAPersistenceException
public boolean isAddToDynamicKColl(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public Vector toStrings(java.lang.String instanceID) throws CHAPersistenceException
CHAPersistenceException
public java.lang.String getTagName(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public void unchain(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public static void removeChild(java.lang.String childInstanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public static void removeContext(java.lang.String instanceID) throws CHAPersistenceException
instanceID
- specifing the context
CHAPersistenceException
public void setKCollDynamic(java.lang.String instanceID, boolean aValue) throws CHAPersistenceException
instanceID
- aValue
-
CHAPersistenceException
public DataElement removeAt(java.lang.String instanceID, java.lang.String aCompositeKey) throws CHAPersistenceException
instanceID
- aCompositeKey
-
CHAPersistenceException
public DataElement removeAtAnyLevel(java.lang.String instanceID, java.lang.String aCompositeKey) throws CHAPersistenceException
instanceID
- aCompositeKey
-
CHAPersistenceException
public int setValueAt(java.lang.String instanceID, SortedTable aSortedTable) throws CHAPersistenceException
instanceID
- aSortedTable
-
CHAPersistenceException
public boolean isReadOnly(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public java.lang.String getLevel(java.lang.String instanceID) throws CHAPersistenceException
instanceID
-
CHAPersistenceException
public static java.lang.String getRootContextInstanceID() throws CHAPersistenceException
CHAPersistenceException
public static Context getRootContext() throws CHAPersistenceException
CHAPersistenceException
public static void setRoot(java.lang.String instanceID) throws CHAPersistenceException
string
-
CHAPersistenceException
public static Vector getChildren(java.lang.String instanceID) throws CHAPersistenceException
parentInstanceID
-
CHAPersistenceException
public Vector getChildrenAtAnyLevel(java.lang.String currentInstanceID) throws CHAPersistenceException
currentInstanceID
-
CHAPersistenceException
public static void InitContext(Context aContext, java.lang.String contextName, java.lang.String typeName, java.lang.String parentID, java.lang.String newInstanceID, boolean isRoot) throws CHAPersistenceException
aContext
- contextName
- typeName
- parentContext
- newInstanceID
-
CHAPersistenceException
public Context newDynamicContext(java.lang.String contextName) throws CHAPersistenceException
contextName
- location
-
CHAPersistenceException
public void prune(java.lang.String currentInstanceID) throws CHAPersistenceException
currentInstanceID
-
CHAPersistenceException
public java.lang.String getContextNamed(java.lang.String contextName) throws CHAPersistenceException
contextName
-
CHAPersistenceException
public java.lang.String getNextContextHorizontal(java.lang.String currentInstanceID) throws CHAPersistenceException
currentInstanceID
-
CHAPersistenceException
public java.lang.String getNextContextVertical(java.lang.String parentInstanceID, java.lang.String childInstanceID) throws CHAPersistenceException
parentInstanceID
- childInstanceID
-
CHAPersistenceException
public void addChild(java.lang.String childInstanceID, java.lang.String instanceID) throws CHAPersistenceException
childInstanceID
-
CHAPersistenceException
public boolean containsChild(java.lang.String instanceID, java.lang.String aContextName) throws CHAPersistenceException
instanceID
- aContextName
-
CHAPersistenceException
public void updateEntityCache()
public static CHAInstanceLocal getCHAInstanceLocal(java.lang.String instanceID) throws CHAPersistenceException
CHAPersistenceException
public static void setName(java.lang.String instanceID, java.lang.String aContextName) throws CHAPersistenceException
instanceID
- aContextName
-
CHAPersistenceException
public static void setTypeName(java.lang.String instanceID, java.lang.String aTypeName) throws CHAPersistenceException
instanceID
- aContextName
-
CHAPersistenceException
|
IBM Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |