public class ApplicationModuleDefImpl extends MetaObject implements SDOServIntGeneratable
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.
Modifier and Type | Class and Description |
---|---|
class |
ApplicationModuleDefImpl.ServiceInterfaceMethod |
class |
ApplicationModuleDefImpl.TypeInfo |
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType
Modifier and Type | Field and Description |
---|---|
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.util.ArrayList |
mCompUsageList
List of ComponentObject names
|
protected java.util.HashMap |
mCompUsages
Hash table to keep a list of name value pairs for ComponentUsages
|
protected java.util.HashMap |
mConfigurations |
protected java.util.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 java.util.HashMap |
mValidatorTypes |
protected java.util.ArrayList |
mViewLinkUsageList
List of ViewLinkUsages.
|
protected java.util.HashMap |
mViewLinkUsages
Hash table to keep a list of name value pairs for ViewLinkUsages.
|
protected java.util.ArrayList |
mViewUsageList
List of View Object names.
|
protected java.util.HashMap |
mViewUsages
Hash table to keep a list of name value pairs for ViewUsages.
|
static int |
SI_ClearCacheOnCommit |
static int |
SI_ClearCacheOnRollback |
static int |
SI_ClientProxyClassName |
static int |
SI_ComponentClass |
static int |
SI_ComponentInterfaceName |
static int |
SI_LoadComponentsLazily |
static int |
SI_MsgBundleClass |
static int |
SI_RequeryOnCommit |
static int |
SMAX_ApplicationModuleDefImpl |
static int |
SMAX_RemotableCompDef |
INHERIT_POLICY_DEFAULT, INHERIT_POLICY_LEGACY, INHERIT_POLICY_STRICT, mComponentClass, mDebug_checkDef_throw, PERSMERGED_BASE_PACKAGE, PUBLISH_TO_BUSINESS_EDITOR_DEFAULT, PUBLISH_TO_BUSINESS_EDITOR_FALSE, PUBLISH_TO_BUSINESS_EDITOR_TRUE, SI_CustIntoStaticDef, SI_InheritPersonalization, SI_InheritPolicy, SI_MessageBundleClass, SI_ResourceBundleDef, SMAX_MetaObject
JIT_PACKAGE_NAME, mDebugToSkipEmptyDocForBug24949961, mEditedProperties, mEditedPropertyExprs
DEF_MDS_CLIENT_KEY, DEF_SCOPE_ALL, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, DEF_SCOPE_SITE, DEF_SCOPE_USER, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY, PROPERTY_EXPRMAP
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX, RESID_SUFFIX
FLAG_DIRTY, FLAG_EDITABLE, FLAG_FROM_TIP, FLAG_LOAD_BASE, FLAG_LOAD_HL_DEFS, FLAG_MAJOR_VERSION_CHANGED, FLAG_MINOR_VERSION_CHANGED, FLAG_NEW, FLAG_NEW_RECURSE, FLAG_SKIP_WRITE, XML_STATEMENT
Constructor and Description |
---|
ApplicationModuleDefImpl()
Default Constructor.
|
ApplicationModuleDefImpl(int defScope,
java.lang.String name) |
ApplicationModuleDefImpl(int defScope,
java.lang.String name,
java.lang.String baseAMDefName,
java.lang.String inheritPolicyStr) |
ApplicationModuleDefImpl(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.util.Map |
addChildren(java.util.Map m,
boolean recurse,
java.lang.Class cls) |
void |
addOperation(OperationDefinitionImpl opDef)
For internal framework use only.
|
void |
addRowOperation(OperationDefinitionImpl opDef)
For internal framework use only.
|
OperationDefinitionImpl |
addRowScriptOperation(java.lang.String name,
java.lang.String returnType,
java.util.LinkedHashMap<java.lang.String,java.lang.String> params,
java.lang.String body)
For internal framework use only.
|
OperationDefinitionImpl |
addScriptOperation(java.lang.String name,
java.lang.String returnType,
java.util.LinkedHashMap<java.lang.String,java.lang.String> params,
java.lang.String body)
For internal framework use only.
|
OperationDefinitionImpl |
addScriptRowOperation(java.lang.String name,
java.lang.String returnType,
java.util.LinkedHashMap<java.lang.String,java.lang.String> params,
java.lang.String body)
For internal framework use only.
|
void |
addServiceViewUsage(java.lang.String vuName) |
void |
addServiceViewUsage(java.lang.String vuName,
boolean canCreate,
boolean canUpdate,
boolean canDelete,
boolean canMerge) |
void |
addViewImport(java.lang.String viewDefName) |
PersDefBase |
allocatePDef() |
void |
applyDiffChildren(DifferDetails dif,
DiffResolver resolver)
Applies changes to children defs.
|
void |
applyDiffContents(DifferDetails dif,
DiffResolver resolver)
When diff/merge operation is requested, we have the following
three def objects:
|
void |
cacheJavaMethodDefs(java.util.ArrayList al,
boolean row) |
void |
createApplicationModule(java.lang.String amName,
java.lang.String defName,
int sharedScope) |
static ApplicationModuleDefImpl |
createApplicationModuleDef(int defScope,
java.lang.String defClassName) |
protected MetaObject |
createDefCustomizer(java.lang.String baseDefFullName) |
void |
createViewLink(java.lang.String vlName,
java.lang.String defName,
java.lang.String srcVOName,
java.lang.String destVOName) |
void |
createViewLinkBetweenViewObjects(java.lang.String vlName,
java.lang.String accessorName,
java.lang.String srcVOName,
java.lang.String[] srcAttrNames,
java.lang.String destVOName,
java.lang.String[] destAttrNames,
java.lang.String assocClause) |
void |
createViewLinkFromEntityAssocName(java.lang.String vlName,
java.lang.String entityAssocName,
java.lang.String srcVOName,
java.lang.String destVOName) |
AMViewUsage |
createViewObject(java.lang.String voName,
java.lang.String defName) |
AMViewUsage |
createViewObjectFromQueryClauses(java.lang.String voName,
java.lang.String eoName,
java.lang.String selectClause,
java.lang.String fromClause,
java.lang.String whereClause,
java.lang.String orderByClause) |
AMViewUsage |
createViewObjectFromQueryStmt(java.lang.String voName,
java.lang.String queryStatement) |
AMViewUsage |
createViewObjectFromQueryStmt(java.lang.String voName,
java.lang.String queryStatement,
java.lang.String voImplClassName) |
DifferDetails |
diffChildren(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails)
Performs diff of children defs.
|
DifferDetails |
diffContents(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails)
Performs diff of scalar values.
|
ExprCodeSource |
editCodeSource(ExprCodeSource codeSource)
Notify that ComponentOperationsManager that the client expects to
edit the CodeSource.
|
ExprCodeSource |
ensureCodeSource(ExprDef exprDef)
Ensure a named code source in the operations manager.
|
ExprCodeSource |
ensureCodeSource(ExprDef exprDef,
java.lang.String codeSourceName) |
AppModuleUsage |
findApplicationModule(java.lang.String name) |
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.
|
OperationDefinitionImpl |
findOperationDefinition(java.lang.String id)
For internal framework use only.
|
OperationDefinitionImpl |
findRowOperationDefinition(java.lang.String id)
For internal framework use only.
|
ViewLinkUsage |
findViewLink(java.lang.String name) |
AMViewUsage |
findViewObject(java.lang.String name) |
static java.lang.String[] |
getAllDefNames() |
AppModuleUsage[] |
getAMAppModuleUsages() |
AMServiceViewUsage[] |
getAMServiceViewUsages() |
ViewLinkUsage[] |
getAMViewLinkUsages() |
AMViewUsage[] |
getAMViewUsages() |
java.lang.String[] |
getApplicationModuleNames() |
java.lang.Class |
getBaseComponentClass()
Internal: Applications should not use this method.
|
java.util.List |
getCachedJavaMethodDefs(boolean row) |
java.lang.String |
getClientProxyClassName() |
java.lang.String |
getClientProxyClassName(java.lang.String platform)
Deprecated.
Platform specific proxies are deprecated. Use getClientProxyClassName() instead.
|
java.lang.Class |
getComponentClass() |
java.lang.String |
getComponentInterfaceName() |
java.lang.String[] |
getComponentObjectNames() |
protected ComponentOperations |
getComponentOperations()
For internal framework use only.
|
java.lang.String |
getConfigurationName(java.lang.String usageType) |
int |
getDefTypeId() |
java.lang.String |
getDefXMLElementTag() |
java.util.Map<java.lang.String,java.lang.String> |
getDeletedLocationToNSMap()
For internal use only.
|
protected java.lang.String |
getEffectiveClientProxyClassName() |
protected java.lang.String |
getEffectiveComponentInterfaceName() |
OperationDefinitionsImpl |
getOperationDefinitions() |
protected PackageDefImpl[] |
getPackageDefs() |
java.lang.String |
getParameterTypeForServiceMethod(java.lang.String methodName,
java.lang.Class[] paramTypes,
int paramIndex) |
java.lang.String |
getReturnTypeForServiceMethod(java.lang.String methodName,
java.lang.Class[] paramTypes)
Returns return type for custom service method or null if method does not exist
|
OperationDefinitionsImpl |
getRowOperationDefinitions() |
protected int |
getScalarDirtyCount()
Returns the number of scalar value attributes in this def object.
|
OperationDefinitionsImpl |
getScriptOperationDefinitions() |
OperationDefinitionsImpl |
getScriptRowOperationDefinitions() |
java.lang.String |
getServerClassName(java.lang.String platform)
Internal: Applications should not use this method.
|
java.lang.String |
getServerInterfaceName(java.lang.String platform)
Internal: Applications should not use this method.
|
ApplicationModuleDefImpl.ServiceInterfaceMethod |
getServiceMethod(java.lang.String methodName,
java.lang.Class[] paramTypes)
Returns custom service method or null if method does not exist.
|
boolean |
getSvuCanCreate(java.lang.String svuName) |
boolean |
getSvuCanDelete(java.lang.String svuName) |
boolean |
getSvuCanMerge(java.lang.String svuName) |
boolean |
getSvuCanUpdate(java.lang.String svuName) |
java.lang.String[] |
getSvuNames() |
java.util.ArrayList |
getViewImports() |
java.lang.String[] |
getViewLinkNames() |
java.lang.String[] |
getViewObjectNames() |
java.util.Map<java.lang.String,java.lang.String> |
getViewSchemaLocationMap()
For internal use only.
|
protected boolean |
hasApplicationModule(java.lang.String amName) |
protected boolean |
hasComponentObject(java.lang.String compName) |
protected boolean |
hasServiceViewUsage(java.lang.String svuName) |
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 |
isDynamicCodeSourceEnabled() |
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.
|
boolean |
isSdoDirty()
For internal use only.
|
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(DefElement xmlElement)
Deprecated.
|
protected static void |
loadFromXML(DefElement xmlElement,
oracle.jbo.server.RemotableCompDef defObj) |
protected static ApplicationModuleDefImpl |
loadFromXML(DefElement xmlElement,
java.lang.String fullName,
ApplicationModuleDefImpl aInfo)
Internal: Applications should not use this method.
|
protected void |
loadOperationDefinitions(DefElement xmlElement)
For internal framework use only.
|
protected ViewLink |
loadViewLink(ApplicationModule am,
java.lang.String vluName) |
protected ViewObject |
loadViewObject(ApplicationModule am,
java.lang.String voName) |
void |
loadXMLContentsNoResolve(DefElement xmlElement,
java.lang.String fullName) |
ExprCodeSource |
lookupCodeSource(java.lang.String name)
For internal framework use only.
|
ExprDef |
lookupExprDef(OwnerType type,
java.lang.String path)
Search for an ExprDef in the ComponentOperationsManager's namespace.
|
OperationDefinitionImpl |
lookupOperationDefinition(java.lang.String id)
For internal framework use only.
|
OperationDefinitionImpl |
lookupRowOperationDefinition(java.lang.String id)
For internal framework use only.
|
OperationDefinitionImpl |
lookupRowOperationDefinition(java.lang.String name,
java.lang.String returnType,
java.lang.Class[] params) |
void |
makeNew() |
protected ApplicationModuleImpl |
newComponentClassInstance() |
void |
removeAppModule(java.lang.String amName) |
void |
removeOperation(java.lang.String name)
For internal framework use only.
|
void |
removeRowOperation(java.lang.String name)
For internal framework use only.
|
boolean |
removeServiceViewUsage(java.lang.String svuName) |
void |
removeViewImport(java.lang.String viewDefName) |
void |
removeViewLink(java.lang.String vlName) |
void |
removeViewObject(java.lang.String voName) |
void |
resolveDefObject() |
void |
setClearCacheOnCommit(boolean b) |
void |
setClearCacheOnRollback(boolean b) |
void |
setClientProxyClassName(java.lang.String name) |
void |
setComponentClass(java.lang.Class refClass) |
void |
setComponentInterfaceName(java.lang.String interfaceName) |
protected void |
setDefForComponent(ComponentObjectImpl comp) |
void |
setLoadComponentsLazily(boolean isLoadComponentsLazily) |
void |
setRequeryOnCommit(boolean b) |
void |
setSdoDirty(boolean sdoDirty)
For internal use only.
|
void |
skipRowOperationValidation()
For internal framework use only.
|
protected void |
unsetDefForComponent(ComponentObjectImpl comp) |
void |
writeChildren(DefWriter jos)
Writes the Object's children to the Persistent storage
|
void |
writeContents(DefWriter jos)
Objects should write their persistence output in this method
|
adjustPropertyMapForWrite, checkEditable, deregisterSessionObject, doneLoadingInternal, extractCustIntoPDef, getDefCustomizerFullFileName, getDefCustomizerFullName, getDefCustomizerName, getEditObject, getEditVersionsAsString, getInheritPersonalizationStrValue, getInheritPersonalizationValue, getInheritPolicyStrValue, getInheritPolicyValue, getMajorVersion, getMessageBundleClass, getMinorVersion, getMsgBundleDef, getPackageDef, getPackageName, getPersDef, getPersDefForEdit, getPersDefNoUpdateCheck, getPersMergedDef, getPublishToBusinessEditorValue, getResourceBundleDef, getResourcePrefix, getStaticBaseDefObject, getStaticDef, isAutoMerged, isConvertPDef, isCreateEditPDef, isCustIntoStaticDef, isDefCustomizer, isDefNewBase, isDynamic, isEditable, isInheritPersonalization, isInheritPolicyLegacy, isInheritPolicyStrict, isPublishToBusinessEditor, isScalarDirty, loadDefVersions, loadResourceBundle, loadXMLContents, lookupDefCustomizer, lookupPublishedDefCustomizer, objectFound, objectRemoved, registerDefObject, registerSessionDefObject, resetDefResolved, saveXMLContents, setCustIntoStaticDef, setDefCustomizer, setDefScope, setDirty, setEditable, setFullName, setInheritPersonalization, setInheritPersonalizationStrValue, setInheritPolicyStrValue, setMessageBundleClass, setPublishToBusinessEditor, setPublishToBusinessEditorValue, setResourceBundleDef, setScalarDirty, setupDefWriterFromMO, writeXMLContents
callFinishedLoading, ensureVariableManager, finishedLoading, getAdfmConfigStartupProperty, getAllProperties, getBaseDefObject, getBooleanAdfmConfigProperty, getDefXMLNameSpace, getVariableManager, getVarMgrParents, hasVariables, isDeprecated, isFromCustomization, loadProperties, loadVariables, resolvePropertyRaw, resolveReferences, setBaseDefObject, setBaseDefObject, setName, setParent
addDefImport, addExtendedDefObject, addSavedDocName, allocatePropertyMap, allocatePropertyMapForEdits, baseIsWriteObject, beginDiffObjects, buildChildName, buildFileName, checkEditableWithDefWriter, checkStructWithOld, close, createEditPDef, createFromXML, deregisterDefObject, deregisterHLDef, diffChildrenHLDefs, diffChildrenProperties, diffObjects, ensureDifferDetails, ensureDifferSkip, findDefImport, forgetChanges, getBaseDir, getBasePackage, getChildren, getDefImports, getDefManager, getDefTypeName, getDefWriter, getDifferSkip, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getExtendedDefObjectsInternal, getFileName, getFullDirName, getFullFileName, getHLDefMap, getIdentificationAttributeName, getMergeableFullName, getMergeableName, getOrigObject, getPropertyMap, getPropertyNamesSet, getSavedDocNames, getSessionSyncLock, getSubstitutedNames, getSyncLock, getXMLElementTag, guaranteePath, hasExtendedDefObjects, includeCustomizationLayerInfo, isCustomizationEnabled, isCustomizationEnabled, isDirty, isFromTip, isLoadBase, isLoadHLDefs, isMajorVersionChanged, isMinorVersionChanged, isNew, isNewRecurse, isPersonalizationEnabled, isPersonalizationEnabled, isPropertyExpression, isSaveToJSON, isSkipWrite, isWriteObject, loadDefImports, loadDefObject, lockDefinitionContext, lookupHLDef, mergeChanges, mergeEditedPropertiesForJSON, mergePropertyMap, postSaveContents, readJSONObject, reapplyChanges, registerClass, registerHLDef, registerSiteDefObject, reloadFromXMLContents, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, removeProperty, saveJSONContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setEditableFlag, setEditableObject, setForRuntime, setFullNameInternal, setLoadBase, setLoadHLDefs, setMajorVersionChanged, setNew, setNewRecurse, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, setSkipWrite, setWholeDefDirty, setWholeDefNew, staticUpdateChildrenList, transferDefChangesInto, unlockDefinitionContext, updateChildObject, updateChildrenList, updateMdsKeyFromTip, verifyVersion, verifyVersionNullCheck, writeHeaderForNew, writeJSONContents, writeObject, writeVersion
addPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getMdsReferenceName, getPropertySetName, getPropertySetNames, getRootBaseDefObject, isBaseDefFor, isComponentDefinition, isDynamicDefinitionObject, isObjectResolved, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, objectInserted, setMdsKey, setMdsReference, setObjectResolved, setPropertySetName, staticLoadCustomProperties, staticLoadSchemaProperties, suppressUpdateCheck
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionDef, getPropertyExpressionsMap, getPropertyExprEval, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, hasProperty, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setPropertiesMap, setPropertiesMap2, setProperty, setPropertyExpressionMap, setRawPropertyValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefManager, getDefScope, getFullName
getProperty, removeProperty, setProperty
getName
getFullName
public static final int SI_ClearCacheOnCommit
public static final int SI_ClearCacheOnRollback
public static final int SI_RequeryOnCommit
public static final int SI_LoadComponentsLazily
public static final int SMAX_ApplicationModuleDefImpl
protected boolean mClearCacheOnCommit
protected boolean mClearCacheOnRollback
protected boolean mRequeryOnCommit
protected java.util.HashMap mValidatorTypes
protected java.util.HashMap mConfigurations
protected java.util.HashMap mViewUsages
protected java.util.ArrayList mViewUsageList
protected java.util.HashMap mViewLinkUsages
protected java.util.ArrayList mViewLinkUsageList
protected java.util.HashMap mRemoteServers
protected java.util.HashMap mCompUsages
protected java.util.ArrayList mCompUsageList
public static final int SI_MsgBundleClass
public static final int SI_ComponentClass
public static final int SI_ComponentInterfaceName
public static final int SI_ClientProxyClassName
public static final int SMAX_RemotableCompDef
public ApplicationModuleDefImpl()
public ApplicationModuleDefImpl(int defScope, java.lang.String name)
public ApplicationModuleDefImpl(java.lang.String name)
public ApplicationModuleDefImpl(int defScope, java.lang.String name, java.lang.String baseAMDefName, java.lang.String inheritPolicyStr)
public static java.lang.String[] getAllDefNames()
public static ApplicationModuleDefImpl findDefObjectNoSub(java.lang.String name)
findDefObject
, except that it
does not observe meta-object substitution.name
- The fully qualified name of the ApplicationModuleDefImpl.MetaObjectManager
public static ApplicationModuleDefImpl findDefObject(java.lang.String name)
name
- The fully qualified name of the ApplicationModuleDefImpl.MetaObjectManager
protected MetaObject createDefCustomizer(java.lang.String baseDefFullName)
createDefCustomizer
in class MetaObject
protected int getScalarDirtyCount()
MetaObject
public java.lang.Class getBaseComponentClass()
Gets this instance's class.
@Concealed protected ApplicationModuleImpl newComponentClassInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException
newComponentClassInstance
in class MetaObject
java.lang.InstantiationException
java.lang.IllegalAccessException
public java.lang.String getServerClassName(java.lang.String platform)
Returns the server class name of the remote server.
platform
- the platform to which the Application Module was deployed.@Concealed public java.lang.String getServerInterfaceName(java.lang.String platform)
Returns the server interface name of the remote server.
platform
- the platform to which the Application Module was deployed.public java.lang.String getClientProxyClassName(java.lang.String platform)
Returns the class name of the client side proxy object for the
platform
.
platform
- the platform to which the Application Module was deployed.platform
.
null
if platform is null
.public boolean isClearCacheOnCommit()
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.
RowSet.executeQuery()
,
Transaction.isClearCacheOnCommit()
,
Transaction.setClearCacheOnCommit(boolean)
public void setClearCacheOnCommit(boolean b)
public boolean isClearCacheOnRollback()
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.
RowSet.executeQuery()
,
Transaction.setClearCacheOnRollback(boolean)
,
Transaction.isClearCacheOnRollback()
public void setClearCacheOnRollback(boolean b)
public boolean isRequeryOnCommit()
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.
public void setRequeryOnCommit(boolean b)
public boolean isLoadComponentsLazily()
public void setLoadComponentsLazily(boolean isLoadComponentsLazily)
public AMViewUsage[] getAMViewUsages()
public ViewLinkUsage[] getAMViewLinkUsages()
public AppModuleUsage[] getAMAppModuleUsages()
@Concealed public AMServiceViewUsage[] getAMServiceViewUsages()
public AMViewUsage findViewObject(java.lang.String name)
public java.lang.String[] getViewObjectNames()
public ViewLinkUsage findViewLink(java.lang.String name)
public java.lang.String[] getViewLinkNames()
public AppModuleUsage findApplicationModule(java.lang.String name)
public java.lang.String[] getApplicationModuleNames()
public java.lang.String[] getComponentObjectNames()
protected boolean hasViewObject(java.lang.String voName)
protected boolean hasViewLink(java.lang.String vlName)
protected boolean hasApplicationModule(java.lang.String amName)
protected boolean hasComponentObject(java.lang.String compName)
protected boolean hasServiceViewUsage(java.lang.String svuName)
protected ViewObject loadViewObject(ApplicationModule am, java.lang.String voName)
protected ViewLink loadViewLink(ApplicationModule am, java.lang.String vluName)
protected ApplicationModule loadApplicationModule(ApplicationModule am, java.lang.String amName)
protected ComponentObject loadComponentObject(ApplicationModule am, java.lang.String compName)
protected void loadComponents(ApplicationModuleImpl am)
For ViewObjects that are remotable, remote proxy class names are set in here as well.
am
- the ApplicationModule in which these components
are created.public PersDefBase allocatePDef()
allocatePDef
in class PersistableDefObject
public void resolveDefObject()
resolveDefObject
in class MetaObject
public static ApplicationModuleDefImpl createApplicationModuleDef(int defScope, java.lang.String defClassName)
@Deprecated protected static ApplicationModuleDefImpl loadFromXML(DefElement xmlElement)
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.
xmlElement
- the XMLStream for Business Components for Java Framework.protected static ApplicationModuleDefImpl loadFromXML(DefElement xmlElement, java.lang.String fullName, ApplicationModuleDefImpl aInfo)
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.
xmlElement
- represents XMLStream that providesthe JboElement.aInfo
- instance of the ApplicationModuleDef.public void loadXMLContentsNoResolve(DefElement xmlElement, java.lang.String fullName)
public void loadContainees()
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.
public java.util.ArrayList getViewImports()
public void addViewImport(java.lang.String viewDefName)
public void removeViewImport(java.lang.String viewDefName)
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
getDefXMLElementTag
in class PersistableDefObject
public void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void writeChildren(DefWriter jos)
PersistentDefinition
writeChildren
in interface PersistentDefinition
jos
- the Output storage for persistencepublic int getDefTypeId()
getDefTypeId
in class DefObject
protected void setDefForComponent(ComponentObjectImpl comp)
setDefForComponent
in class DefObject
protected void unsetDefForComponent(ComponentObjectImpl comp)
unsetDefForComponent
in class DefObject
protected PackageDefImpl[] getPackageDefs()
public void createApplicationModule(java.lang.String amName, java.lang.String defName, int sharedScope)
public void removeAppModule(java.lang.String amName)
public AMViewUsage createViewObject(java.lang.String voName, java.lang.String defName)
public AMViewUsage createViewObjectFromQueryClauses(java.lang.String voName, java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
public AMViewUsage createViewObjectFromQueryStmt(java.lang.String voName, java.lang.String queryStatement)
public AMViewUsage createViewObjectFromQueryStmt(java.lang.String voName, java.lang.String queryStatement, java.lang.String voImplClassName)
public void removeViewObject(java.lang.String voName)
public void createViewLink(java.lang.String vlName, java.lang.String defName, java.lang.String srcVOName, java.lang.String destVOName)
public void createViewLinkFromEntityAssocName(java.lang.String vlName, java.lang.String entityAssocName, java.lang.String srcVOName, java.lang.String destVOName)
public void createViewLinkBetweenViewObjects(java.lang.String vlName, java.lang.String accessorName, java.lang.String srcVOName, java.lang.String[] srcAttrNames, java.lang.String destVOName, java.lang.String[] destAttrNames, java.lang.String assocClause)
public void removeViewLink(java.lang.String vlName)
public ApplicationModuleDefImpl.ServiceInterfaceMethod getServiceMethod(java.lang.String methodName, java.lang.Class[] paramTypes)
methodName
- method nameparamTypes
- array of parameter typespublic java.lang.String getReturnTypeForServiceMethod(java.lang.String methodName, java.lang.Class[] paramTypes)
methodName
- - method nameparamTypes
- - array of parameter typespublic java.lang.String getParameterTypeForServiceMethod(java.lang.String methodName, java.lang.Class[] paramTypes, int paramIndex)
public java.lang.String[] getSvuNames()
public boolean getSvuCanCreate(java.lang.String svuName)
public boolean getSvuCanUpdate(java.lang.String svuName)
public boolean getSvuCanDelete(java.lang.String svuName)
public boolean getSvuCanMerge(java.lang.String svuName)
public void addServiceViewUsage(java.lang.String vuName)
public void addServiceViewUsage(java.lang.String vuName, boolean canCreate, boolean canUpdate, boolean canDelete, boolean canMerge)
public boolean removeServiceViewUsage(java.lang.String svuName)
@Concealed public void setSdoDirty(boolean sdoDirty)
setSdoDirty
in interface SDOServIntGeneratable
@Concealed public boolean isSdoDirty()
isSdoDirty
in interface SDOServIntGeneratable
@Concealed public java.util.Map<java.lang.String,java.lang.String> getDeletedLocationToNSMap()
getDeletedLocationToNSMap
in interface SDOServIntGeneratable
@Concealed public java.util.Map<java.lang.String,java.lang.String> getViewSchemaLocationMap()
getViewSchemaLocationMap
in interface SDOServIntGeneratable
public java.lang.String getConfigurationName(java.lang.String usageType)
public void makeNew()
makeNew
in class PersistableDefObject
public java.util.Map addChildren(java.util.Map m, boolean recurse, java.lang.Class cls)
addChildren
in class DefObject
public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeable
orgDef
. Then, help
methods on DifferBase
can be used to diff the attr values
and accumulate the details of diff in difDetails
.
Here is example code snippet:
private static final String DIFF_STRING_ELEMS[] =
{
"MyStringVal1",
"MyStringVal2"
};
private static final String DIFF_INT_ELEMS[] =
{
"MyIntVal",
}
public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
{
<Your-def-class> orgDefImpl = (<Your-def-class>) orgDef;
final String editStringValues[] =
{
this.getMyStringVal1(),
this.getMyStringVal2()
};
String orgStringValues[] = null;
if (orgDef != null)
{
String orgV[] =
{
orgDefImpl.getMyStringVal1(),
orgDefImpl.getMyStringVal2()
};
orgStringValues = orgV;
}
final int editIntValues[] =
{
this.getMyIntVal(),
};
int orgIntValues[] = null;
if (orgDef != null)
{
int orgV[] =
{
orgDefImpl.getMyIntVal()
};
orgIntValues = orgV;
}
difDetails = DifferBase.diffStringArray(this, DIFF_STRING_ELEMS, editStringValues, orgStringValues, difDetails);
difDetails = DifferBase.diffIntArray(this, DIFF_INT_ELEMS, editIntValues, orgIntValues, difDetails);
return difDetails;
}
diffContents
in interface DiffMergeable
diffContents
in class PersistableDefObject
docDef
- the document-level definitionorgDef
- the original definition. It could be
null
if the definition did not exist originallydifDetails
- the DifferDetails
that accumulate
the details of diff from the document-level (top-level) defDifferDetails
that has all the details
of diffpublic DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeable
difDetails
and
return it at the end.
For example, if this def has Child1 and Child2, its implementation should look something like:
public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
{
difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
return difDetails;
}
where diffChildrenChild1()
uses DifferChildren
's
helper method diffChildrenList
to diff the child defs.
diffChildren
in interface DiffMergeable
diffChildren
in class DefObject
docDef
- the document-level definitionorgDef
- the original definition. It could be
null
if the definition did not exist originallydifDetails
- the DifferDetails
that accumulate
the details of diff from the document-level (top-level) defDifferDetails
that has all the details
of diffpublic void applyDiffContents(DifferDetails dif, DiffResolver resolver)
DiffMergeable
orgDef - original def object (from the branch point)
editDef - def object into which changes are to be merge
toMergeDef - def object to be merged (source of changes)
For sandbox refresh operation, orgDef
comes from the branch
point, editDef
from the sandbox, toMergeDef
from the
mainline of the repos. With these three defs, we first diff editDef
against orgDef
, producing editDifDetails
.
Similarly, toMergeDef
is diffed against orgDef
,
producing toMergeDifDetails
. The diff engine then
walks through these two sets of diffs and identifies conflicts.
After the conflicts are all resolved, we apply appropriate
changes to editDef
.
applyDiffContents
is called to apply changes to
scalar values. dif
contains the changed values to
be applied to 'this'
object. Use sample code like
the following:
public void applyDiffContents(DifferDetails dif, DiffResolver resolver)
{
DifferChangeMap detailMap = dif.getDetailMap();
Object[] updValues;
// DIFF_STRING_ELEMS from the above example code
for (int j = 0; j < DIFF_STRING_ELEMS.length; j++)
{
if ((updValues = (Object[]) detailMap.getValue(DIFF_STRING_ELEMS[j])) != null)
{
switch(j)
{
case 0:
setMyStringVal1((String) updValues[0]);
break;
case 1:
setMyStringVal2((String) updValues[0]);
break;
}
}
}
for (int j = 0; j < DIFF_INT_ELEMS.length; j++)
{
if ((updValues = (Object[]) detailMap.getValue(DIFF_INT_ELEMS[j])) != null)
{
switch(j)
{
case 0:
setMyIntVal((Integer) updValues[0]);
break;
}
}
}
}
Notice that the index specified in the case
statement is the array index of the attr in the String, int,
or boolean array.
applyDiffContents
in interface DiffMergeable
applyDiffContents
in class PersistableDefObject
dif
- changes to be applied to 'this'
defresolver
- the diff resolver used in diff/merge operationpublic void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
DiffMergeable
dif
contains the
changes to be applied to the children. For each child def, this method
should first retrieve the diff details for the child, which is of type
DifferChildren
. Then, it should call
DifferChildren.applyDiffChanges(oracle.jbo.mom.DiffChildrenMerge, oracle.jbo.mom.DiffResolver)
to perform
the change operation.
applyChanges()
requires a
DiffChildrenMerge
object, which has the insert,
update, and remove methods. 'this'
def object must
provide implmementation of these operations.
Here is a sample:
public void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
{
DifferChangeMap detailMap = dif.getDetailMap();
if (detailMap != null)
{
DifferChildren difChild1 = (DifferChildren) detailMap.getValue(<XML-tag-for-Child1>);
if (difVCs != null)
{
DiffChildrenMerge dm = new DiffChildrenMerge()
{
public void insertChild(Object id, Object value)
{
.. perform insert op for Child1 ..
}
public void updateChild(Object id, Object value, Object oldValue)
{
.. perform update op for Child1 ..
}
public void removeChild(Object id)
{
.. perform remove op for Child1 ..
}
};
difChild1.applyDiffChanges(dm, resolver);
}
// Similarly for Child2
}
}
applyDiffChildren
in interface DiffMergeable
applyDiffChildren
in class DefObject
public java.lang.Class getComponentClass()
public void setComponentClass(java.lang.Class refClass)
public void setComponentInterfaceName(java.lang.String interfaceName)
public java.lang.String getComponentInterfaceName()
public java.lang.String getClientProxyClassName()
public void setClientProxyClassName(java.lang.String name)
protected java.lang.String getEffectiveClientProxyClassName()
protected java.lang.String getEffectiveComponentInterfaceName()
protected static void loadFromXML(DefElement xmlElement, oracle.jbo.server.RemotableCompDef defObj)
@Concealed protected ComponentOperations getComponentOperations()
@Concealed public OperationDefinitionImpl lookupOperationDefinition(java.lang.String id)
@Concealed public ExprCodeSource lookupCodeSource(java.lang.String name)
@Concealed public OperationDefinitionImpl findOperationDefinition(java.lang.String id)
public OperationDefinitionsImpl getOperationDefinitions()
getOperationDefinitions
in interface OperationContainer
public OperationDefinitionsImpl getRowOperationDefinitions()
getRowOperationDefinitions
in interface OperationContainer
public OperationDefinitionsImpl getScriptOperationDefinitions()
getScriptOperationDefinitions
in interface OperationContainer
public OperationDefinitionsImpl getScriptRowOperationDefinitions()
getScriptRowOperationDefinitions
in interface OperationContainer
public ExprCodeSource ensureCodeSource(ExprDef exprDef)
ComponentOperationsManager
#updateCodeSource
to update the component
operations manager with any updates that are made to this CodeSource.ensureCodeSource
in interface ComponentOperationsManager
exprDef
- a null exprDef may be used to indicate the a
built-in code source.public ExprCodeSource ensureCodeSource(ExprDef exprDef, java.lang.String codeSourceName)
public ExprCodeSource editCodeSource(ExprCodeSource codeSource)
ComponentOperationsManager
editCodeSource
in interface ComponentOperationsManager
public ExprDef lookupExprDef(OwnerType type, java.lang.String path)
ComponentOperationsManager
lookupExprDef
in interface ComponentOperationsManager
type
- the OwnerType
of the expressionpath
- the ExprDef.getPath()
of the expressionpublic boolean isDynamicCodeSourceEnabled()
isDynamicCodeSourceEnabled
in interface ComponentOperationsManager
@Concealed public void addOperation(OperationDefinitionImpl opDef)
@Concealed public OperationDefinitionImpl addScriptOperation(java.lang.String name, java.lang.String returnType, java.util.LinkedHashMap<java.lang.String,java.lang.String> params, java.lang.String body)
@Concealed public OperationDefinitionImpl addScriptRowOperation(java.lang.String name, java.lang.String returnType, java.util.LinkedHashMap<java.lang.String,java.lang.String> params, java.lang.String body)
@Concealed public void removeOperation(java.lang.String name)
protected void loadOperationDefinitions(DefElement xmlElement)
@Concealed public OperationDefinitionImpl lookupRowOperationDefinition(java.lang.String id)
public OperationDefinitionImpl lookupRowOperationDefinition(java.lang.String name, java.lang.String returnType, java.lang.Class[] params)
@Concealed public OperationDefinitionImpl findRowOperationDefinition(java.lang.String id)
@Concealed public void addRowOperation(OperationDefinitionImpl opDef)
@Concealed public void skipRowOperationValidation()
@Concealed public OperationDefinitionImpl addRowScriptOperation(java.lang.String name, java.lang.String returnType, java.util.LinkedHashMap<java.lang.String,java.lang.String> params, java.lang.String body)
@Concealed public void removeRowOperation(java.lang.String name)
@Concealed public void cacheJavaMethodDefs(java.util.ArrayList al, boolean row)
@Concealed public java.util.List getCachedJavaMethodDefs(boolean row)