Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.9.0)

E52932-01


oracle.jbo.mom
Class PersistableDefObject

java.lang.Object
  extended by oracle.jbo.common.NamedObjectImpl
      extended by oracle.jbo.mom.DefinitionObject
          extended by oracle.jbo.mom.PersistableDefObject

All Implemented Interfaces:
DiffMergeable, DefPersistable, PersistentDefinition
Direct Known Subclasses:
AMServiceViewUsage, AMViewUsage, AppModuleUsage, BoundParameters, DCDefBase, DefObject, ExpressionDef, GenericResourceBundleDef, ListBindingDef, PermissionDefImpl, PersDefBase, ViewLinkUsage

public class PersistableDefObject
extends DefinitionObject
implements DefPersistable, DiffMergeable

Nested Class Summary
static class PersistableDefObject.CustomizationType
           
static class PersistableDefObject.PersonalizationType
           

 

Field Summary
protected  java.util.Map mEditedProperties
           
protected  java.util.Map mEditedPropertyExprs
           

 

Fields inherited from class oracle.jbo.mom.DefinitionObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_ALL, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, DEF_SCOPE_SITE, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY, PROPERTY_EXPRMAP

 

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

 

Fields inherited from interface oracle.jbo.mom.xml.DefPersistable
XML_STATEMENT

 

Constructor Summary
protected PersistableDefObject()
           
  PersistableDefObject(DefinitionManager defMgr, int defScope)
           

 

Method Summary
 java.lang.Object addDefImport(java.lang.String defName, boolean doFind)
           
protected  void addExtendedDefObject(DefinitionObject extendedDefObject)
           
protected  java.util.HashMap adjustPropertyMapForWrite()
           
protected  java.util.Map allocatePropertyMap()
          For internal framework use only.
protected  java.util.Map allocatePropertyMapForEdits()
          For internal framework use only.
 void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
           
 void applyDiffContents(DifferDetails dif, DiffResolver resolver)
           
 void checkEditable()
           
 void checkStructWithOld(PersistableDefObject pOldDef)
           
 void close()
           
static PersistableDefObject createFromXML(int defScope, DefinitionManager defMgr, java.lang.String fullName, java.lang.String metaObjectName, DefElement elem)
           
 void deregisterSessionObject()
           
 DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
           
 DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
           
 DifferDetails diffObjects(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
           
 DifferDetails ensureDifferDetails(DifferDetails difDetails)
           
protected  java.lang.Object findDefImport(java.lang.String defName)
           
protected  void finishedLoading()
           
 java.lang.String getBaseDir()
           
 java.lang.String getBasePackage()
           
 java.util.List getDefImports()
           
 DefinitionManager getDefManager()
           
 DefWriter getDefWriter()
           
 java.lang.String getDefXMLElementTag()
           
 java.lang.String getDefXMLNameSpace()
           
 java.util.HashMap getEditedPropertiesMap()
          For internal framework use only.
protected  java.util.HashMap getEditedPropertyExpressionsMap()
          For internal framework use only.
protected  java.util.Map getEditedPropertyMap()
          For internal framework use only.
 PersistableDefObject getEditObject()
           
 java.lang.String getEditVersionsAsString()
           
 java.util.List<DefinitionObject> getExtendedDefObjectsInternal()
           
 java.lang.String getFileName()
           
 java.lang.String getFullDirName()
           
 java.lang.String getFullFileName()
           
 int getMajorVersion()
           
 int getMinorVersion()
           
 DefPersistable getOrigObject()
           
 java.util.Map getPropertyMap()
          Internal: Applications should not use this method.
protected  java.lang.Object getSessionSyncLock()
          Deprecated. use lockDefinitionContext() instead
 java.lang.String[] getSubstitutedNames(boolean recurse)
           
protected  java.lang.Object getSyncLock()
          Deprecated. use lockDefinitionContext() instead
 java.lang.String getXMLElementTag()
          Returns a piece of static info for the type of object this is invoked upon.
 void guaranteePath()
           
 boolean hasExtendedDefObjects()
           
 boolean isCustomizationEnabled()
          For internal use only.
 boolean isCustomizationEnabled(PersistableDefObject.CustomizationType type)
          For internal use only.
 boolean isDirty()
          This method returns if an Object is modified from last save/load
 boolean isEditable()
           
 boolean isFromTip()
           
 boolean isLoadBase()
           
 boolean isMajorVersionChanged()
           
 boolean isMinorVersionChanged()
           
 boolean isNew()
          This method returns if this object is previously persisted.
 boolean isPersonalizationEnabled()
          For internal use only.
 boolean isPersonalizationEnabled(PersistableDefObject.PersonalizationType type)
          For internal use only.
 boolean isPropertyExpression(java.lang.String hintName)
           
protected  void loadDefImports(DefElement xmlElement)
           
 void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
           
protected  void lockDefinitionContext()
          Locks the definition object's definition context.
static boolean mergeChanges(PersistableDefObject editObj, PersistableDefObject tipObj, PersistableDefObject origObj, DiffResolver resolver)
           
 void mergePropertyMap(java.util.Map m)
          For internal framework use only.
protected  void objectRemoved()
           
 boolean reapplyChanges(PersistableDefObject tipObj, DiffResolver resolver)
           
static void registerClass(java.lang.String tagName, java.lang.Class cls)
           
 void registerDefObject()
           
 void registerSessionDefObject()
           
 void registerSiteDefObject()
           
 void remove()
           
 boolean removeAndDelete()
           
 void removeDefImport(java.lang.String defName)
           
protected  boolean removeExtendedDefObject(DefinitionObject extendedDefObject)
           
 void removeProperty(java.lang.String hintName, LocaleContext locale)
           
 void saveXMLContents()
           
 void setCustomizationEnabled(java.util.EnumSet<PersistableDefObject.CustomizationType> types, boolean flag)
          For internal use only.
 void setCustomizationEnabled(PersistableDefObject.CustomizationType type, boolean flag)
          For internal use only.
 void setDefaultBaseDir(java.lang.String defaultBaseDir)
           
 void setDefMgr(DefinitionManager mgr)
           
 void setDirty(boolean b)
          This method marks the Object dirty
 void setEditable(boolean b)
           
 void setEditableFlag(boolean b)
           
 void setEditableObject(PersistableDefObject editObj)
           
 void setFullName(java.lang.String name)
          Give this object a fully-qualified name.
 void setFullNameInternal(java.lang.String name)
           
 void setLoadBase(boolean b)
           
 void setMajorVersionChanged(boolean b)
           
 void setNew(boolean b)
          This method marks the as previously persisted.
 void setOrigObject(DefPersistable origObject)
           
 void setPersonalizationEnabled(java.util.EnumSet<PersistableDefObject.PersonalizationType> types, boolean flag)
          For internal use only.
 void setPersonalizationEnabled(PersistableDefObject.PersonalizationType type, boolean flag)
          For internal use only.
 void setProperty(java.lang.String hintName, java.lang.Object hintValue, LocaleContext locale)
           
 void setPropertyExpression(java.lang.String hintName, java.lang.String hintExpression)
           
 void setPropertyMap(java.util.Map m)
          For internal framework use only.
 void setupDefWriterFromMO(oracle.mds.core.MetadataObject mo)
           
static void staticUpdateChildrenList(DefWriter jos, java.util.List lst, java.util.List orgLst, boolean useFullName, boolean writeDelta, boolean forceReplace)
           
protected  void unlockDefinitionContext()
           
 void updateChildrenList(DefWriter jos, java.util.List lst, java.util.List orgLst, boolean useFullName, boolean writeDelta, boolean forceReplace)
          Internal: Applications should not use this method.
static void verifyVersion(DefElement xmlElement, java.lang.String name)
           
static void verifyVersionNullCheck(DefElement xmlElement, java.lang.String name, boolean nullOK)
           
 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
 void writeObject(DefWriter jos)
          Objects should write their persistence output in this method
static void writeVersion(DefWriter jos)
           
 void writeXMLContents()
           

 

Methods inherited from class oracle.jbo.mom.DefinitionObject
addPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getBaseDefObject, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, isBaseDefFor, isDeprecated, isDynamicDefinitionObject, isObjectResolved, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, resolveReferences, setBaseDefObject, setBaseDefObject, setDefScope, setMdsKey, setMdsReference, setName, setObjectResolved, setParent, setPropertySetName, suppressUpdateCheck

 

Methods inherited from class oracle.jbo.common.NamedObjectImpl
getAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionsMap, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, resolvePropertyRaw, setPropertiesMap, setPropertiesMap2, setProperty

 

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

 

Methods inherited from interface oracle.jbo.mom.xml.DefPersistable
getFullName

 

Methods inherited from interface oracle.jbo.mom.DiffMergeable
getFullName, getName

 

Field Detail

mEditedProperties

protected java.util.Map mEditedProperties

mEditedPropertyExprs

protected java.util.Map mEditedPropertyExprs

Constructor Detail

PersistableDefObject

protected PersistableDefObject()

PersistableDefObject

public PersistableDefObject(DefinitionManager defMgr,
                            int defScope)

Method Detail

registerClass

public static void registerClass(java.lang.String tagName,
                                 java.lang.Class cls)

createFromXML

public static PersistableDefObject createFromXML(int defScope,
                                                 DefinitionManager defMgr,
                                                 java.lang.String fullName,
                                                 java.lang.String metaObjectName,
                                                 DefElement elem)

getOrigObject

public DefPersistable getOrigObject()
Specified by:
getOrigObject in interface DefPersistable

setOrigObject

public void setOrigObject(DefPersistable origObject)
Specified by:
setOrigObject in interface DefPersistable

setFullNameInternal

public void setFullNameInternal(java.lang.String name)

setFullName

public void setFullName(java.lang.String name)
Description copied from class: NamedObjectImpl
Give this object a fully-qualified name.
Overrides:
setFullName in class NamedObjectImpl
Parameters:
name - this object's fully-qualified name; the package name concatenated with the class name.

getSubstitutedNames

public java.lang.String[] getSubstitutedNames(boolean recurse)

registerDefObject

public void registerDefObject()

registerSiteDefObject

public void registerSiteDefObject()

registerSessionDefObject

public void registerSessionDefObject()

deregisterSessionObject

public void deregisterSessionObject()

getDefManager

public DefinitionManager getDefManager()

lockDefinitionContext

protected void lockDefinitionContext()
Locks the definition object's definition context. This is typically only required internally. Call to this must be bracketed with a final unlockDefinitionContext().
For internal use only. Application developers should not use this

unlockDefinitionContext

protected void unlockDefinitionContext()
For internal use only. Application developers should not use this

getSyncLock

protected java.lang.Object getSyncLock()
Deprecated. use lockDefinitionContext() instead

getSessionSyncLock

protected java.lang.Object getSessionSyncLock()
Deprecated. use lockDefinitionContext() instead

hasExtendedDefObjects

public boolean hasExtendedDefObjects()
Overrides:
hasExtendedDefObjects in class DefinitionObject

getExtendedDefObjectsInternal

public java.util.List<DefinitionObject> getExtendedDefObjectsInternal()
Overrides:
getExtendedDefObjectsInternal in class DefinitionObject
For internal use only. Application developers should not use this
Internal framework use only.

addExtendedDefObject

protected void addExtendedDefObject(DefinitionObject extendedDefObject)
Overrides:
addExtendedDefObject in class DefinitionObject

removeExtendedDefObject

protected boolean removeExtendedDefObject(DefinitionObject extendedDefObject)
Overrides:
removeExtendedDefObject in class DefinitionObject

getEditVersionsAsString

public java.lang.String getEditVersionsAsString()

getMajorVersion

public int getMajorVersion()

getMinorVersion

public int getMinorVersion()

isMajorVersionChanged

public boolean isMajorVersionChanged()

setMajorVersionChanged

public void setMajorVersionChanged(boolean b)

isMinorVersionChanged

public boolean isMinorVersionChanged()

isDirty

public boolean isDirty()
Description copied from interface: DefPersistable
This method returns if an Object is modified from last save/load
Specified by:
isDirty in interface DefPersistable
Returns:
Returns true if the Object is dirty. Returns false otherwise.

setDirty

public void setDirty(boolean b)
Description copied from interface: DefPersistable
This method marks the Object dirty
Specified by:
setDirty in interface DefPersistable
Parameters:
b - If true the Object is marked Dirty.

checkStructWithOld

public void checkStructWithOld(PersistableDefObject pOldDef)

isNew

public boolean isNew()
Description copied from interface: DefPersistable
This method returns if this object is previously persisted.
Specified by:
isNew in interface DefPersistable
Returns:
true if the Object is previously persisted. Returns false otherwise.

setNew

public void setNew(boolean b)
Description copied from interface: DefPersistable
This method marks the as previously persisted. By default all objects are new objects. When the object is persisted first time, that object is marked as 'not new' object
Specified by:
setNew in interface DefPersistable
Parameters:
b - If true the Object is marked as new object.

isFromTip

public boolean isFromTip()

checkEditable

public void checkEditable()

isEditable

public boolean isEditable()

setEditableFlag

public void setEditableFlag(boolean b)

setEditableObject

public void setEditableObject(PersistableDefObject editObj)

setEditable

public void setEditable(boolean b)

isLoadBase

public boolean isLoadBase()

setLoadBase

public void setLoadBase(boolean b)

getEditObject

public PersistableDefObject getEditObject()

getBaseDir

public java.lang.String getBaseDir()

getBasePackage

public java.lang.String getBasePackage()

setDefaultBaseDir

public void setDefaultBaseDir(java.lang.String defaultBaseDir)

setDefMgr

public void setDefMgr(DefinitionManager mgr)

getDefXMLElementTag

public java.lang.String getDefXMLElementTag()
Specified by:
getDefXMLElementTag in interface PersistentDefinition

getXMLElementTag

public java.lang.String getXMLElementTag()
Description copied from interface: PersistentDefinition
Returns a piece of static info for the type of object this is invoked upon. Examples are PreparedStatements for insert, update, delete, and String containing a base the select statement for retrieving instances of this type through the SQLInputStream
Specified by:
getXMLElementTag in interface PersistentDefinition
Returns:
returns the Statement required to store in Persitent Storage. Incase of XML, it just returns the String. In the case of SQL a JDBC PreparedStatement is returned.

getDefXMLNameSpace

public java.lang.String getDefXMLNameSpace()
Specified by:
getDefXMLNameSpace in interface PersistentDefinition

setupDefWriterFromMO

public void setupDefWriterFromMO(oracle.mds.core.MetadataObject mo)

getDefWriter

public DefWriter getDefWriter()

writeObject

public void writeObject(DefWriter jos)
Description copied from interface: PersistentDefinition
Objects should write their persistence output in this method
Specified by:
writeObject in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

writeContents

public void writeContents(DefWriter jos)
Description copied from interface: PersistentDefinition
Objects should write their persistence output in this method
Specified by:
writeContents in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

diffChildren

public DifferDetails diffChildren(DiffMergeable docDef,
                                  DiffMergeable orgDef,
                                  DifferDetails difDetails)
Specified by:
diffChildren in interface DiffMergeable

diffContents

public DifferDetails diffContents(DiffMergeable docDef,
                                  DiffMergeable orgDef,
                                  DifferDetails difDetails)
Specified by:
diffContents in interface DiffMergeable

diffObjects

public DifferDetails diffObjects(DiffMergeable docDef,
                                 DiffMergeable orgDef,
                                 DifferDetails difDetails)
Specified by:
diffObjects in interface DiffMergeable

ensureDifferDetails

public DifferDetails ensureDifferDetails(DifferDetails difDetails)
Specified by:
ensureDifferDetails in interface DiffMergeable

applyDiffChildren

public void applyDiffChildren(DifferDetails dif,
                              DiffResolver resolver)
Specified by:
applyDiffChildren in interface DiffMergeable

applyDiffContents

public void applyDiffContents(DifferDetails dif,
                              DiffResolver resolver)
Specified by:
applyDiffContents in interface DiffMergeable

reapplyChanges

public boolean reapplyChanges(PersistableDefObject tipObj,
                              DiffResolver resolver)

mergeChanges

public static boolean mergeChanges(PersistableDefObject editObj,
                                   PersistableDefObject tipObj,
                                   PersistableDefObject origObj,
                                   DiffResolver resolver)

updateChildrenList

public void updateChildrenList(DefWriter jos,
                               java.util.List lst,
                               java.util.List orgLst,
                               boolean useFullName,
                               boolean writeDelta,
                               boolean forceReplace)
Internal: Applications should not use this method.

staticUpdateChildrenList

public static void staticUpdateChildrenList(DefWriter jos,
                                            java.util.List lst,
                                            java.util.List orgLst,
                                            boolean useFullName,
                                            boolean writeDelta,
                                            boolean forceReplace)

getDefImports

public java.util.List getDefImports()

findDefImport

protected java.lang.Object findDefImport(java.lang.String defName)

addDefImport

public java.lang.Object addDefImport(java.lang.String defName,
                                     boolean doFind)

removeDefImport

public void removeDefImport(java.lang.String defName)

loadDefImports

protected void loadDefImports(DefElement xmlElement)

adjustPropertyMapForWrite

protected java.util.HashMap adjustPropertyMapForWrite()

writeChildren

public void writeChildren(DefWriter jos)
Description copied from interface: PersistentDefinition
Writes the Object's children to the Persistent storage
Specified by:
writeChildren in interface PersistentDefinition
Parameters:
jos - the Output storage for persistence

writeXMLContents

public void writeXMLContents()

getFileName

public java.lang.String getFileName()

saveXMLContents

public void saveXMLContents()

finishedLoading

protected void finishedLoading()
Overrides:
finishedLoading in class DefinitionObject

loadXMLContents

public void loadXMLContents(DefElement xmlElement,
                            java.lang.String fullName)

close

public void close()

objectRemoved

protected void objectRemoved()
Overrides:
objectRemoved in class DefinitionObject

remove

public void remove()

removeAndDelete

public boolean removeAndDelete()

getFullFileName

public java.lang.String getFullFileName()

getFullDirName

public java.lang.String getFullDirName()

guaranteePath

public void guaranteePath()

verifyVersion

public static void verifyVersion(DefElement xmlElement,
                                 java.lang.String name)

verifyVersionNullCheck

public static void verifyVersionNullCheck(DefElement xmlElement,
                                          java.lang.String name,
                                          boolean nullOK)

writeVersion

public static void writeVersion(DefWriter jos)

getPropertyMap

public java.util.Map getPropertyMap()
Description copied from class: NamedObjectImpl
Internal: Applications should not use this method.
Overrides:
getPropertyMap in class NamedObjectImpl
Returns:
a reference to the properties Map

isPropertyExpression

public final boolean isPropertyExpression(java.lang.String hintName)
Overrides:
isPropertyExpression in class NamedObjectImpl

allocatePropertyMap

protected java.util.Map allocatePropertyMap()
For internal framework use only.
Overrides:
allocatePropertyMap in class NamedObjectImpl
For internal use only. Application developers should not use this

removeProperty

public void removeProperty(java.lang.String hintName,
                           LocaleContext locale)
Overrides:
removeProperty in class NamedObjectImpl

setProperty

public void setProperty(java.lang.String hintName,
                        java.lang.Object hintValue,
                        LocaleContext locale)
Overrides:
setProperty in class NamedObjectImpl

setPropertyExpression

public void setPropertyExpression(java.lang.String hintName,
                                  java.lang.String hintExpression)
Overrides:
setPropertyExpression in class NamedObjectImpl
For internal use only. Application developers should not use this

allocatePropertyMapForEdits

protected java.util.Map allocatePropertyMapForEdits()
For internal framework use only.
For internal use only. Application developers should not use this

getEditedPropertiesMap

public java.util.HashMap getEditedPropertiesMap()
For internal framework use only.
For internal use only. Application developers should not use this

getEditedPropertyMap

protected java.util.Map getEditedPropertyMap()
For internal framework use only.
For internal use only. Application developers should not use this

getEditedPropertyExpressionsMap

protected java.util.HashMap getEditedPropertyExpressionsMap()
For internal framework use only.
For internal use only. Application developers should not use this

setPropertyMap

public void setPropertyMap(java.util.Map m)
For internal framework use only.
Overrides:
setPropertyMap in class NamedObjectImpl
For internal use only. Application developers should not use this

mergePropertyMap

public void mergePropertyMap(java.util.Map m)
For internal framework use only.
Overrides:
mergePropertyMap in class NamedObjectImpl
For internal use only. Application developers should not use this

isCustomizationEnabled

public boolean isCustomizationEnabled()
For internal use only. API may change in a future release.
Returns:
an enum that could be used to check if a definition has customization enabled.

isCustomizationEnabled

public boolean isCustomizationEnabled(PersistableDefObject.CustomizationType type)
For internal use only. API may change in a future release.
Returns:
an enum that could be used to check if a definition has customization enabled for the given type.

setCustomizationEnabled

public void setCustomizationEnabled(PersistableDefObject.CustomizationType type,
                                    boolean flag)
For internal use only. API may change in a future release. This API enables/disables customizing the definition for a given type.

setCustomizationEnabled

public void setCustomizationEnabled(java.util.EnumSet<PersistableDefObject.CustomizationType> types,
                                    boolean flag)
For internal use only. API may change in a future release. This API enables/disables customizing the definition for the given set of types.

isPersonalizationEnabled

public boolean isPersonalizationEnabled()
For internal use only. API may change in a future release.
Returns:
an enum that could be used to check if a definition has personalization enabled.

isPersonalizationEnabled

public boolean isPersonalizationEnabled(PersistableDefObject.PersonalizationType type)
For internal use only. API may change in a future release.
Returns:
an enum that could be used to check if a definition has personalization enabled for the given type.

setPersonalizationEnabled

public void setPersonalizationEnabled(PersistableDefObject.PersonalizationType type,
                                      boolean flag)
For internal use only. API may change in a future release. This API enables/disables personalizing the definition for a given type.

setPersonalizationEnabled

public void setPersonalizationEnabled(java.util.EnumSet<PersistableDefObject.PersonalizationType> types,
                                      boolean flag)
For internal use only. API may change in a future release. This API enables/disables personalizing the definition for the given set of types.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.9.0)

E52932-01


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