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

E10653-05

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:
DefPersistable, PersistentDefinition
Direct Known Subclasses:
AMServiceViewUsage, AMViewUsage, AppModuleUsage, BoundParameters, DCDefBase, DefObject, GenericResourceBundleDef, ListBindingDef, PermissionDefImpl, PersDefBase, ViewLinkUsage

public class PersistableDefObject
extends DefinitionObject
implements DefPersistable


Nested Class Summary
static class PersistableDefObject.CustomizationType
           
static class PersistableDefObject.PersonalizationType
           
 
Field Summary
 
Fields inherited from class oracle.jbo.mom.DefinitionObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, 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  java.util.Map allocatePropertyMap()
           
 void checkEditable()
           
 void close()
           
static PersistableDefObject createFromXML(int defScope, DefinitionManager defMgr, java.lang.String fullName, java.lang.String metaObjectName, DefElement elem)
           
 void deregisterSessionObject()
           
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()
           
 PersistableDefObject getEditObject()
           
 java.lang.String getFileName()
           
 java.lang.String getFullDirName()
           
 java.lang.String getFullFileName()
           
 DefPersistable getOrigObject()
           
 java.util.Map getPropertyMap()
          Internal: Applications should not use this method.
 java.lang.String[] getSubstitutedNames(boolean recurse)
           
 java.lang.String getXMLElementTag()
          Returns a piece of static info for the type of object this is invoked upon.
 void guaranteePath()
           
 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 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.
protected  void loadDefImports(DefElement xmlElement)
           
 void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
           
 void mergePropertyMap(java.util.Map m)
           
protected  void objectRemoved()
           
static void registerClass(java.lang.String tagName, java.lang.Class cls)
           
 void registerDefObject()
           
 void registerSessionDefObject()
           
 void remove()
           
 boolean removeAndDelete()
           
 void removeDefImport(java.lang.String defName)
           
 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 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)
          Replaces all properties.
 void updateChildrenList(DefWriter jos, java.util.List lst, java.util.List orgLst, boolean useFullName, boolean writeDelta, boolean forceReplace)
           
static void verifyVersion(DefElement xmlElement, java.lang.String name)
           
 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
addExtendedDefObject, addPropertySetName, getBaseDefObject, getContainerDef, getContainerName, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, hasExtendedDefObjects, isBaseDefFor, isDynamicDefinitionObject, isObjectResolved, loadCustomProperties, loadProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, removeExtendedDefObject, resolveReferences, setBaseDefObject, setBaseDefObject, setDefScope, setMdsKey, setMdsReference, setName, setObjectResolved, setParent, setPropertySetName
 
Methods inherited from class oracle.jbo.common.NamedObjectImpl
getAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionsMap, getResourcesFromBundle, getStringFromMessageBundle, isPropertyExpression, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, resolvePropertyRaw, setFullName, 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
 

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

getSubstitutedNames

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

registerDefObject

public void registerDefObject()

registerSessionDefObject

public void registerSessionDefObject()

deregisterSessionObject

public void deregisterSessionObject()

getDefManager

public DefinitionManager getDefManager()

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.

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.

checkEditable

public void checkEditable()

isEditable

public boolean isEditable()

setEditable

public void setEditable(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

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

updateChildrenList

public void updateChildrenList(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)

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)

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

allocatePropertyMap

protected java.util.Map allocatePropertyMap()
Overrides:
allocatePropertyMap in class NamedObjectImpl

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

setPropertyMap

public void setPropertyMap(java.util.Map m)
Description copied from class: NamedObjectImpl
Replaces all properties.

All existing properties are lost.

Overrides:
setPropertyMap in class NamedObjectImpl

mergePropertyMap

public void mergePropertyMap(java.util.Map m)
Overrides:
mergePropertyMap in class NamedObjectImpl

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.


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

E10653-05

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