Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


oracle.jbo.server
Class ApplicationModuleDefImpl

java.lang.Object
  extended byoracle.jbo.common.NamedObjectImpl
      extended byoracle.jbo.mom.DefinitionObject
          extended byoracle.jbo.server.DefObject
              extended byoracle.jbo.server.ApplicationModuleDefImpl


public class ApplicationModuleDefImpl
extends oracle.jbo.server.DefObject

The base class for all generated ApplicationModule classes.

An Application Module is a container for View Objects, View Links and other Application Modules. This class stores the runtime metadata for Application Modules. Like other Def objects, ApplicationModuleDef objects are stored, by name, in the XML file. This class is needed to load an Application Module and the components it contains from XML metadata. Calling loadXML() on an object instantiated from this class causes its components to be installed.


Field Summary
protected boolean mClearCacheOnCommit
Value determines whether cache should be cleared on a database commit operation.
protected boolean mClearCacheOnRollback
Value determines whether cache should be cleared on a database rollback operation.
protected java.lang.Class mComponentClass
protected com.sun.java.util.collections.ArrayList mCompUsageList
List of ComponentObject names
protected com.sun.java.util.collections.HashMap mCompUsages
Hash table to keep a list of name value pairs for ComponentUsages
protected com.sun.java.util.collections.HashMap mRemoteServers
Hash table to keep name value pairs for Platform, RemoteServer pairs.
protected boolean mRequeryOnCommit
Value determines whether the database should be requeried after a commit operation.
protected com.sun.java.util.collections.HashMap mValidatorTypes
protected com.sun.java.util.collections.ArrayList mViewLinkUsageList
List of ViewLinkUsages.
protected com.sun.java.util.collections.HashMap mViewLinkUsages
Hash table to keep a list of name value pairs for ViewLinkUsages.
protected com.sun.java.util.collections.ArrayList mViewUsageList
List of View Object names.
protected com.sun.java.util.collections.HashMap mViewUsages
Hash table to keep a list of name value pairs for ViewUsages.

Fields inherited from class oracle.jbo.mom.DefinitionObject
mBaseDefObject, mExtendedDefObjects, mObjectResolved

Fields inherited from class oracle.jbo.common.NamedObjectImpl
mFullName, mObjName, mParent, mProperties

Constructor Summary
protected ApplicationModuleDefImpl()
Default Constructor.

Method Summary
static ApplicationModuleDefImpl findDefObject(java.lang.String name)
Finds an ApplicationModuleDefImpl instance, by name, from the statically maintained list of metaobjects.
static ApplicationModuleDefImpl findDefObjectNoSub(java.lang.String name)
Finds the named Application Module definition.
protected void finishedLoading()
java.lang.String[] getApplicationModuleNames()
oracle.jbo.mom.DefinitionObject getBaseDefObject()
java.lang.String getClientProxyClassName()
java.lang.String getClientProxyClassName(java.lang.String platform)
Internal: Applications should not use this method.
java.lang.Class getComponentClass()
Internal: Applications should not use this method.
java.lang.String getComponentInterfaceName()
java.lang.String[] getComponentObjectNames()
protected java.lang.String getEffectiveClientProxyClassName()
protected java.lang.String getEffectiveComponentInterfaceName()
oracle.jbo.server.PackageDefImpl getPackageDef()
java.lang.String getPackageName()
java.lang.String getServerClassName(java.lang.String platform)
Internal: Applications should not use this method.
java.lang.String[] getViewLinkNames()
java.lang.String[] getViewObjectNames()
protected boolean hasApplicationModule(java.lang.String amName)
protected boolean hasComponentObject(java.lang.String compName)
protected boolean hasViewLink(java.lang.String vlName)
protected boolean hasViewObject(java.lang.String voName)
boolean isClearCacheOnCommit()
Returns the flag indicating whether all Entity Object caches will be cleared after the transaction is committed.
boolean isClearCacheOnRollback()
Returns the flag indicating whether all Entity Object caches will be cleared after the transaction is rolled back.
boolean isLoadComponentsLazily()
boolean isRequeryOnCommit()
Indicates whether View Objects associated with this Application Module should be marked as needing to be executed after a database commit.
protected ApplicationModule loadApplicationModule(ApplicationModule am, java.lang.String amName)
protected ComponentObject loadComponentObject(ApplicationModule am, java.lang.String compName)
protected void loadComponents(ApplicationModuleImpl am)
This function loops through the list of ViewObjects, ViewLinks, and child ApplicationModules found in the ApplicationModule definition and create them in the ApplicationModule instance, identified by am.
void loadContainees()
Internal: Applications should not use this method.
protected static ApplicationModuleDefImpl loadFromXML(oracle.jbo.mom.xml.DefElementImpl xmlElement)
Internal: Applications should not use this method.
protected static ApplicationModuleDefImpl loadFromXML(oracle.jbo.mom.xml.DefElementImpl xmlElement, ApplicationModuleDefImpl aInfo)
Internal: Applications should not use this method.
protected void loadProperties(oracle.jbo.mom.xml.DefElementImpl xmlElement)
protected ViewLink loadViewLink(ApplicationModule am, java.lang.String vluName)
protected ViewObject loadViewObject(ApplicationModule am, java.lang.String voName)
protected void resolveReferences()
void setBaseDefObject(oracle.jbo.mom.DefinitionObject baseDefObject)
protected void setClientProxyClassName(java.lang.String name)
protected void setComponentInterfaceName(java.lang.String interfaceName)
void setLoadComponentsLazily(boolean isLoadComponentsLazily)
protected void setName(java.lang.String name)
Name this object.
protected void setParent(NamedObjectImpl parent)
Sets this object's parent.

Methods inherited from class oracle.jbo.mom.DefinitionObject
addExtendedDefObject, getContainerDef, getContainerName, getExtendedDefObjects, hasExtendedDefObjects, isBaseDefFor, isDynamicDefinitionObject, isObjectResolved, setObjectResolved

Methods inherited from class oracle.jbo.common.NamedObjectImpl
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, refreshProperty, setFullName, setPropertiesMap, setProperty

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

mClearCacheOnCommit

protected boolean mClearCacheOnCommit
Value determines whether cache should be cleared on a database commit operation.

mClearCacheOnRollback

protected boolean mClearCacheOnRollback
Value determines whether cache should be cleared on a database rollback operation.

mRequeryOnCommit

protected boolean mRequeryOnCommit
Value determines whether the database should be requeried after a commit operation.

mValidatorTypes

protected com.sun.java.util.collections.HashMap mValidatorTypes

mViewUsages

protected com.sun.java.util.collections.HashMap mViewUsages
Hash table to keep a list of name value pairs for ViewUsages.

mViewUsageList

protected com.sun.java.util.collections.ArrayList mViewUsageList
List of View Object names.

mViewLinkUsages

protected com.sun.java.util.collections.HashMap mViewLinkUsages
Hash table to keep a list of name value pairs for ViewLinkUsages.

mViewLinkUsageList

protected com.sun.java.util.collections.ArrayList mViewLinkUsageList
List of ViewLinkUsages.

mRemoteServers

protected com.sun.java.util.collections.HashMap mRemoteServers
Hash table to keep name value pairs for Platform, RemoteServer pairs.

mCompUsages

protected com.sun.java.util.collections.HashMap mCompUsages
Hash table to keep a list of name value pairs for ComponentUsages

mCompUsageList

protected com.sun.java.util.collections.ArrayList mCompUsageList
List of ComponentObject names

mComponentClass

protected java.lang.Class mComponentClass

Constructor Detail

ApplicationModuleDefImpl

protected ApplicationModuleDefImpl()
Default Constructor.

Method Detail

findDefObjectNoSub

public static ApplicationModuleDefImpl findDefObjectNoSub(java.lang.String name)
Finds the named Application Module definition. Performs essentially the same operation as findDefObject, except that it does not observe meta-object substitution.
Parameters:
name - The fully qualified name of the ApplicationModuleDefImpl.
Returns:
the Application Module definition corresponding to the specified name.
See Also:
MetaObjectManager

findDefObject

public static ApplicationModuleDefImpl findDefObject(java.lang.String name)
Finds an ApplicationModuleDefImpl instance, by name, from the statically maintained list of metaobjects. Def objects are stored by name in the XML file.
Parameters:
name - The fully qualified name of the ApplicationModuleDefImpl.
Returns:
the Application Module definition corresponding to the specified name.
See Also:
MetaObjectManager

getComponentClass

public java.lang.Class getComponentClass()
Internal: Applications should not use this method.

Gets this instance's class.

Returns:
the class.

getServerClassName

public java.lang.String getServerClassName(java.lang.String platform)
Internal: Applications should not use this method.

Returns the server class name of the remote server.

Parameters:
platform - the platform to which the Application Module was deployed.
Returns:
the server class of a RemoteServer instance, or null.

getClientProxyClassName

public java.lang.String getClientProxyClassName(java.lang.String platform)
Internal: Applications should not use this method.

Returns the class name of the client side proxy object for the platform.

Parameters:
platform - the platform to which the Application Module was deployed.
Returns:
the class name of a client side proxy for the specified platform. null if platform is null.

isClearCacheOnCommit

public boolean isClearCacheOnCommit()
Returns the flag indicating whether all Entity Object caches will be cleared after the transaction is committed.

After the transaction is committed, the value of this flag is used to determine whether the Entity Object caches are cleared or not. If this flag value is false, the cache contents are kept. In this case, the cache may contain data that is stale in that it does not match the newest data (changes made by another user and committed).

If this flag is true, the caches are cleared after the transaction is committed. When the user brings in data by traversing row collection, the latest data from the database will be brought into Entity caches.

Returns:
the current value of clear-cache-on-commit flag.
See Also:
RowSet.executeQuery(), #setClearCacheOnCommit(boolean val), Transaction.isClearCacheOnCommit(), Transaction.setClearCacheOnCommit(boolean val)

isClearCacheOnRollback

public boolean isClearCacheOnRollback()
Returns the flag indicating whether all Entity Object caches will be cleared after the transaction is rolled back.

After the transaction is rolled back, the value of this flag is used to determine whether the Entity Object caches are cleared or not. If this flag value is false, the cache contents are kept. In this case, the cache may contain data that is not in sync with database in that uncommitted changes made this by user (before the transaction was rolled back) will be kept.

If this flag is true, the caches are cleared after the transaction is rolled back. When the user brings in data by traversing row collection, the latest data from the database will be brought into Entity caches.

Returns:
the current value of clear-cache-on-roll-back flag.
See Also:
RowSet.executeQuery(), #setClearCacheOnRollback(boolean val), Transaction.setClearCacheOnRollback(boolean val), Transaction.isClearCacheOnRollback()

isRequeryOnCommit

public boolean isRequeryOnCommit()
Indicates whether View Objects associated with this Application Module should be marked as needing to be executed after a database commit.

If this method returns true, then after a database commit, all View Objects contained by this Application Module will be marked as needing to be executed. Any attempt to retrieve rows from these View Objects or their row sets/row set iterators will cause the query to be re-executed.

Returns:
true indicates that all View Ojbects will be marked as needing to be executed after a database commit.

isLoadComponentsLazily

public boolean isLoadComponentsLazily()

setLoadComponentsLazily

public void setLoadComponentsLazily(boolean isLoadComponentsLazily)

getViewObjectNames

public java.lang.String[] getViewObjectNames()

getViewLinkNames

public java.lang.String[] getViewLinkNames()

getApplicationModuleNames

public java.lang.String[] getApplicationModuleNames()

getComponentObjectNames

public java.lang.String[] getComponentObjectNames()

hasViewObject

protected boolean hasViewObject(java.lang.String voName)

hasViewLink

protected boolean hasViewLink(java.lang.String vlName)

hasApplicationModule

protected boolean hasApplicationModule(java.lang.String amName)

hasComponentObject

protected boolean hasComponentObject(java.lang.String compName)

loadViewObject

protected ViewObject loadViewObject(ApplicationModule am,
                                    java.lang.String voName)

loadViewLink

protected ViewLink loadViewLink(ApplicationModule am,
                                java.lang.String vluName)

loadApplicationModule

protected ApplicationModule loadApplicationModule(ApplicationModule am,
                                                  java.lang.String amName)

loadComponentObject

protected ComponentObject loadComponentObject(ApplicationModule am,
                                              java.lang.String compName)

loadComponents

protected void loadComponents(ApplicationModuleImpl am)
This function loops through the list of ViewObjects, ViewLinks, and child ApplicationModules found in the ApplicationModule definition and create them in the ApplicationModule instance, identified by am.

For ViewObjects that are remotable, remote proxy class names are set in here as well.

Parameters:
am - the ApplicationModule in which these components are created.

loadFromXML

protected static ApplicationModuleDefImpl loadFromXML(oracle.jbo.mom.xml.DefElementImpl xmlElement)
Internal: Applications should not use this method.

Loads the XML for the top-level Application Module and creates an instance of ApplicatioModuleDef for it. This function then recursively traverses all of the containee objects in the top-level Applicaton Module and creates Def objects for them.

This function is almost pivotal from runtime's functional point of view.

Parameters:
xmlElement - the XMLStream for Business Components for Java Framework.

loadFromXML

protected static ApplicationModuleDefImpl loadFromXML(oracle.jbo.mom.xml.DefElementImpl xmlElement,
                                                      ApplicationModuleDefImpl aInfo)
Internal: Applications should not use this method.

Loads the data from the XML stream. The method calls the MetaObjectManager to create an instance of the specific type of object and adds it to the hashtables that cache all the containees of the Application Module. The containees can be View Objects, View Links and Application Modules. The XMLStream is thus traversed to get the corresponding information about each of the possible children for an ApplicationModule, create these objects and add them to the cache.

Parameters:
aInfo - instance of the ApplicationModuleDef.

loadContainees

public void loadContainees()
Internal: Applications should not use this method.

Loads all components (View Objects, View Links, and Application Modules) into this Application Module.

The function loops through the list of View Object, View Link and Application Module names and loads the corresponding objects from a static list of metaobjects maintained by the MetaObjectManager. Since these objects are already created and stored for use in the cache, the retrieval is fast and efficient.


getPackageDef

public oracle.jbo.server.PackageDefImpl getPackageDef()

getPackageName

public java.lang.String getPackageName()

setName

protected void setName(java.lang.String name)
Name this object.
Parameters:
name - the name to be given to this object.

getBaseDefObject

public oracle.jbo.mom.DefinitionObject getBaseDefObject()

setBaseDefObject

public void setBaseDefObject(oracle.jbo.mom.DefinitionObject baseDefObject)

resolveReferences

protected void resolveReferences()

finishedLoading

protected void finishedLoading()

setParent

protected void setParent(NamedObjectImpl parent)
Sets this object's parent.
Parameters:
parent - the named object that is to be the parent of this object.

loadProperties

protected void loadProperties(oracle.jbo.mom.xml.DefElementImpl xmlElement)

setComponentInterfaceName

protected void setComponentInterfaceName(java.lang.String interfaceName)

getComponentInterfaceName

public java.lang.String getComponentInterfaceName()

getClientProxyClassName

public java.lang.String getClientProxyClassName()

setClientProxyClassName

protected void setClientProxyClassName(java.lang.String name)

getEffectiveClientProxyClassName

protected java.lang.String getEffectiveClientProxyClassName()

getEffectiveComponentInterfaceName

protected java.lang.String getEffectiveComponentInterfaceName()

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


Copyright © 1997, 2005, Oracle. All rights reserved.