public class PersistableDefObject extends DefinitionObject implements DefPersistable, DiffMergeable, DiffSkippable, PropertyManager
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
PersistableDefObject.CustomizationType  | 
static class  | 
PersistableDefObject.PersonalizationType  | 
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
JIT_PACKAGE_NAME  | 
static boolean | 
mDebugToSkipEmptyDocForBug24949961  | 
protected java.util.Map | 
mEditedProperties  | 
protected java.util.Map | 
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_EXPRMAPmFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX, RESID_SUFFIXFLAG_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| Modifier | Constructor and Description | 
|---|---|
protected  | 
PersistableDefObject()  | 
  | 
PersistableDefObject(DefinitionManager defMgr,
                    int defScope)  | 
| Modifier and Type | Method and Description | 
|---|---|
java.util.Map | 
addChildren(java.util.Map m,
           boolean recurse,
           java.lang.Class cls)  | 
java.lang.Object | 
addDefImport(java.lang.String defName,
            boolean doFind)  | 
protected void | 
addExtendedDefObject(DefinitionObject extendedDefObject)  | 
void | 
addSavedDocName(java.lang.String absoluteDocName)  | 
protected java.util.HashMap | 
adjustPropertyMapForWrite()  | 
PersDefBase | 
allocatePDef()  | 
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)
Applies changes to children defs. 
 | 
void | 
applyDiffContents(DifferDetails dif,
                 DiffResolver resolver)
When diff/merge operation is requested, we have the following
 three def objects: 
 | 
static boolean | 
baseIsWriteObject(DefPersistable defObj,
                 DefPersistable parentObj,
                 DefWriter defWriter)  | 
DifferDetails | 
beginDiffObjects(DiffMergeable docDef,
                DiffMergeable orgDef,
                DifferDetails difDetails)
This method is the entry point call when the diffing process
 begins on the document-level def. 
 | 
static java.lang.String | 
buildChildName(java.lang.String elemType,
              java.lang.String childName,
              java.lang.Object child)  | 
java.lang.String | 
buildFileName(java.lang.String objFullName)  | 
protected void | 
callFinishedLoading()  | 
void | 
checkEditable()  | 
void | 
checkEditableWithDefWriter(DefWriter jos)  | 
void | 
checkStructWithOld(PersistableDefObject pOldDef)  | 
void | 
close()  | 
PersDefBase | 
createEditPDef()  | 
static PersistableDefObject | 
createFromXML(int defScope,
             DefinitionManager defMgr,
             java.lang.String fullName,
             java.lang.String metaObjectName,
             DefElement elem,
             DefinitionObject staticDef)  | 
void | 
deregisterDefObject()  | 
PersistableDefObject | 
deregisterHLDef(java.lang.String diffName)  | 
void | 
deregisterSessionObject()  | 
DifferDetails | 
diffChildren(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails)
Performs diff of children defs. 
 | 
DifferDetails | 
diffChildrenHLDefs(DiffMergeable docDef,
                  DiffMergeable orgDef,
                  DifferDetails difDetails)  | 
DifferDetails | 
diffChildrenProperties(DiffMergeable docDef,
                      DiffMergeable orgDef,
                      DifferDetails difDetails)  | 
DifferDetails | 
diffContents(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails)
Performs diff of scalar values. 
 | 
DifferDetails | 
diffObjects(DiffMergeable docDef,
           DiffMergeable orgDef,
           DifferDetails difDetails)
The work-horse method performing diff between two defs of this
 def type. 
 | 
DifferDetails | 
ensureDifferDetails(DifferDetails difDetails)
Ensures that we have a valid  
DifferDetails. | 
DifferSkip | 
ensureDifferSkip()  | 
void | 
extractCustIntoPDef(PersDefBase pDef)  | 
protected java.lang.Object | 
findDefImport(java.lang.String defName)  | 
protected void | 
finishedLoading()  | 
void | 
forgetChanges()  | 
java.lang.String | 
getBaseDir()  | 
java.lang.String | 
getBasePackage()  | 
java.util.Map | 
getChildren(boolean recurse,
           java.lang.Class cls)  | 
java.util.List | 
getDefImports()  | 
DefinitionManager | 
getDefManager()  | 
java.lang.String | 
getDefTypeName()
Returns the XML def type name of this defintion object, e.g.,
 "PDefEntityObject". 
 | 
DefWriter | 
getDefWriter()  | 
java.lang.String | 
getDefXMLElementTag()  | 
java.lang.String | 
getDefXMLNameSpace()  | 
DifferSkip | 
getDifferSkip()  | 
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()  | 
java.util.Map<java.lang.String,PersistableDefObject> | 
getHLDefMap()  | 
java.lang.String | 
getIdentificationAttributeName()
return the attribute name for identification on an xml element. 
 | 
int | 
getMajorVersion()  | 
java.lang.String | 
getMergeableFullName()
Returns the fully qualified name of the diff-mergeable definition object. 
 | 
java.lang.String | 
getMergeableName()
Returns the diff-mergeable definition's name (short form). 
 | 
int | 
getMinorVersion()  | 
DefPersistable | 
getOrigObject()  | 
java.util.Map | 
getPropertyMap()
Internal: Applications should not use this method. 
 | 
java.util.Set<java.lang.String> | 
getPropertyNamesSet()
Internal: Applications should not use this method. 
 | 
java.util.List<java.lang.String> | 
getSavedDocNames()  | 
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 | 
includeCustomizationLayerInfo()  | 
boolean | 
isAutoMerged()  | 
boolean | 
isCreateEditPDef()  | 
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 | 
isInheritPolicyStrict()  | 
boolean | 
isLoadBase()  | 
boolean | 
isLoadHLDefs()  | 
boolean | 
isMajorVersionChanged()  | 
boolean | 
isMinorVersionChanged()  | 
boolean | 
isNew()
This method returns if this object is previously persisted. 
 | 
boolean | 
isNewRecurse()  | 
boolean | 
isPersonalizationEnabled()
For internal use only. 
 | 
boolean | 
isPersonalizationEnabled(PersistableDefObject.PersonalizationType type)
For internal use only. 
 | 
boolean | 
isPropertyExpression(java.lang.String hintName)  | 
boolean | 
isSaveToJSON()  | 
boolean | 
isSkipWrite()  | 
boolean | 
isWriteObject(DefPersistable parentObj,
             DefWriter defWriter)  | 
protected void | 
loadDefImports(DefElement xmlElement)  | 
PersistableDefObject | 
loadDefObject(boolean forTip,
             boolean forEditOrig,
             boolean resolveDef)  | 
void | 
loadXMLContents(DefElement xmlElement,
               java.lang.String fullName)  | 
void | 
loadXMLContentsNoResolve(DefElement xmlElement,
                        java.lang.String fullName)  | 
protected void | 
lockDefinitionContext()
Locks the definition object's definition context. 
 | 
PersistableDefObject | 
lookupHLDef(java.lang.String id)  | 
void | 
makeNew()  | 
static boolean | 
mergeChanges(PersistableDefObject editObj,
            PersistableDefObject tipObj,
            PersistableDefObject origObj,
            DiffResolver resolver,
            java.lang.String transMajor,
            java.lang.String transMinor)  | 
protected java.util.HashMap | 
mergeEditedPropertiesForJSON(boolean isEditLocal,
                            java.util.Map origPropsMap,
                            java.util.HashMap propsMap)  | 
void | 
mergePropertyMap(java.util.Map m)
For internal framework use only. 
 | 
protected void | 
objectRemoved()  | 
protected void | 
postSaveContents()  | 
void | 
readJSONObject(java.lang.String fileName)  | 
boolean | 
reapplyChanges(PersistableDefObject tipObj,
              DiffResolver resolver)  | 
static void | 
registerClass(java.lang.String tagName,
             java.lang.Class cls)  | 
void | 
registerDefObject()  | 
PersistableDefObject | 
registerHLDef(PersistableDefObject hlDef)  | 
void | 
registerSessionDefObject()  | 
void | 
registerSiteDefObject()  | 
void | 
reloadFromXMLContents()  | 
void | 
remove()  | 
boolean | 
removeAndDelete()  | 
void | 
removeDefImport(java.lang.String defName)  | 
protected boolean | 
removeExtendedDefObject(DefinitionObject extendedDefObject)  | 
void | 
removeProperty(java.lang.String hintName,
              LocaleContext locale)  | 
void | 
saveJSONContents()  | 
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 | 
setForRuntime()  | 
void | 
setFullName(java.lang.String name)
Give this object a fully-qualified name. 
 | 
void | 
setFullNameInternal(java.lang.String name)  | 
void | 
setLoadBase(boolean b)  | 
void | 
setLoadHLDefs(boolean b)  | 
void | 
setMajorVersionChanged(boolean b)  | 
void | 
setNew(boolean b)
This method marks the as previously persisted. 
 | 
void | 
setNewRecurse(boolean b)  | 
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)
Advanced API to be used in restricted scenarios. 
 | 
void | 
setPropertyMap(java.util.Map m)
For internal framework use only. 
 | 
void | 
setSkipWrite(boolean b)  | 
void | 
setupDefWriterFromMO(oracle.mds.core.MetadataObject mo)  | 
void | 
setWholeDefDirty(boolean b)  | 
void | 
setWholeDefNew(boolean b,
              boolean recurse)  | 
static void | 
staticUpdateChildrenList(DefWriter jos,
                        java.util.List lst,
                        java.util.List orgLst,
                        boolean useFullName,
                        boolean writeDelta,
                        boolean forceReplace,
                        DefPersistable parentObj)  | 
void | 
transferDefChangesInto(PersistableDefObject targetDef,
                      boolean isToTransferAllChildren)  | 
protected void | 
unlockDefinitionContext()  | 
void | 
updateChildObject(DefWriter jos,
                 DefPersistable child,
                 DefPersistable orgChild,
                 boolean useFullName,
                 boolean writeDelta,
                 boolean forceReplace)  | 
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. 
 | 
void | 
updateMdsKeyFromTip(PersistableDefObject tipObj)  | 
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 | 
writeHeaderForNew(DefWriter jos)  | 
void | 
writeJSONContents()  | 
void | 
writeObject(DefWriter jos)
Objects should write their persistence output in this method 
 | 
static void | 
writeVersion(DefWriter jos)  | 
void | 
writeXMLContents()  | 
addPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getBaseDefObject, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getMdsReferenceName, getPropertySetName, getPropertySetNames, getRootBaseDefObject, isBaseDefFor, isComponentDefinition, isDeprecated, isDynamicDefinitionObject, isObjectResolved, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, objectFound, objectInserted, resolveReferences, setBaseDefObject, setBaseDefObject, setDefScope, setMdsKey, setMdsReference, setName, setObjectResolved, setParent, setPropertySetName, staticLoadCustomProperties, staticLoadSchemaProperties, suppressUpdateCheckgetAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionDef, getPropertyExpressionsMap, getPropertyExprEval, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, hasProperty, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, resolvePropertyRaw, setPropertiesMap, setPropertiesMap2, setProperty, setPropertyExpressionMap, setRawPropertyValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFullNamegetProperty, removeProperty, setPropertyprotected java.util.Map mEditedProperties
protected java.util.Map mEditedPropertyExprs
public static java.lang.String JIT_PACKAGE_NAME
public static boolean mDebugToSkipEmptyDocForBug24949961
protected PersistableDefObject()
public PersistableDefObject(DefinitionManager defMgr, int defScope)
public static void registerClass(java.lang.String tagName,
                                 java.lang.Class cls)
@Concealed public static PersistableDefObject createFromXML(int defScope, DefinitionManager defMgr, java.lang.String fullName, java.lang.String metaObjectName, DefElement elem, DefinitionObject staticDef)
public DefPersistable getOrigObject()
getOrigObject in interface DefPersistablepublic void setOrigObject(DefPersistable origObject)
setOrigObject in interface DefPersistablepublic void setFullNameInternal(java.lang.String name)
public void setFullName(java.lang.String name)
NamedObjectImplsetFullName in class NamedObjectImplname - this object's fully-qualified name;
 the package name concatenated with the class name.public java.lang.String getMergeableName()
DiffMergeablegetMergeableName in interface DiffMergeablepublic java.lang.String getMergeableFullName()
DiffMergeablegetMergeableFullName in interface DiffMergeablepublic java.lang.String[] getSubstitutedNames(boolean recurse)
public void registerDefObject()
public void registerSiteDefObject()
public void registerSessionDefObject()
public void deregisterDefObject()
public void deregisterSessionObject()
public DefinitionManager getDefManager()
@Concealed protected void lockDefinitionContext()
unlockDefinitionContext().@Concealed protected void unlockDefinitionContext()
protected java.lang.Object getSyncLock()
lockDefinitionContext() insteadprotected java.lang.Object getSessionSyncLock()
lockDefinitionContext() insteadpublic boolean hasExtendedDefObjects()
hasExtendedDefObjects in class DefinitionObject@Concealed public java.util.List<DefinitionObject> getExtendedDefObjectsInternal()
getExtendedDefObjectsInternal in class DefinitionObjectprotected void addExtendedDefObject(DefinitionObject extendedDefObject)
addExtendedDefObject in class DefinitionObjectprotected boolean removeExtendedDefObject(DefinitionObject extendedDefObject)
removeExtendedDefObject in class DefinitionObjectpublic java.lang.String getEditVersionsAsString()
public int getMajorVersion()
public int getMinorVersion()
public boolean isMajorVersionChanged()
public void setMajorVersionChanged(boolean b)
public boolean isMinorVersionChanged()
public boolean isDirty()
DefPersistableisDirty in interface DefPersistablepublic void setDirty(boolean b)
DefPersistablesetDirty in interface DefPersistableb - If true the Object is marked Dirty.public void setWholeDefDirty(boolean b)
public void checkStructWithOld(PersistableDefObject pOldDef)
public boolean isNew()
DefPersistableisNew in interface DefPersistablepublic void setNew(boolean b)
DefPersistablesetNew in interface DefPersistableb - If true the Object is marked as new object.public boolean isNewRecurse()
isNewRecurse in interface DefPersistablepublic void setNewRecurse(boolean b)
setNewRecurse in interface DefPersistablepublic void setWholeDefNew(boolean b,
                           boolean recurse)
public void transferDefChangesInto(PersistableDefObject targetDef, boolean isToTransferAllChildren)
public static boolean baseIsWriteObject(DefPersistable defObj, DefPersistable parentObj, DefWriter defWriter)
public boolean isWriteObject(DefPersistable parentObj, DefWriter defWriter)
isWriteObject in interface DefPersistablepublic boolean isLoadHLDefs()
public void setLoadHLDefs(boolean b)
public boolean isFromTip()
public void checkEditableWithDefWriter(DefWriter jos)
public void checkEditable()
public boolean isEditable()
public void setEditableFlag(boolean b)
public void setEditableObject(PersistableDefObject editObj)
public void setEditable(boolean b)
public void setForRuntime()
public boolean isLoadBase()
public void setLoadBase(boolean b)
public boolean isSkipWrite()
isSkipWrite in interface DefPersistablepublic void setSkipWrite(boolean b)
setSkipWrite in interface DefPersistablepublic PersistableDefObject getEditObject()
public java.lang.String getBaseDir()
public java.lang.String getBasePackage()
public void setDefaultBaseDir(java.lang.String defaultBaseDir)
public void setDefMgr(DefinitionManager mgr)
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitionpublic java.lang.String getDefTypeName()
DiffMergeablegetDefTypeName in interface DiffMergeablepublic java.lang.String getXMLElementTag()
PersistentDefinitiongetXMLElementTag in interface PersistentDefinitionpublic java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace in interface PersistentDefinitionpublic java.lang.String getIdentificationAttributeName()
PersistentDefinitiongetIdentificationAttributeName in interface PersistentDefinitionpublic void setupDefWriterFromMO(oracle.mds.core.MetadataObject mo)
public DefWriter getDefWriter()
public void writeHeaderForNew(DefWriter jos)
public void writeObject(DefWriter jos)
PersistentDefinitionwriteObject in interface PersistentDefinitionjos - the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinitionwriteContents in interface PersistentDefinitionjos - the Output storage for persistencepublic DifferSkip getDifferSkip()
getDifferSkip in interface DiffSkippablepublic DifferSkip ensureDifferSkip()
ensureDifferSkip in interface DiffSkippablepublic PersistableDefObject lookupHLDef(java.lang.String id)
public java.util.Map<java.lang.String,PersistableDefObject> getHLDefMap()
public PersistableDefObject deregisterHLDef(java.lang.String diffName)
public PersistableDefObject registerHLDef(PersistableDefObject hlDef)
public void makeNew()
public static java.lang.String buildChildName(java.lang.String elemType,
                                              java.lang.String childName,
                                              java.lang.Object child)
public java.util.Map getChildren(boolean recurse,
                                 java.lang.Class cls)
public java.util.Map addChildren(java.util.Map m,
                                 boolean recurse,
                                 java.lang.Class cls)
public DifferDetails diffChildrenHLDefs(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
public DifferDetails diffChildrenProperties(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeabledifDetails 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 DiffMergeabledocDef - 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 diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeableorgDef.  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 DiffMergeabledocDef - 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 beginDiffObjects(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeableDiffMergeable's.  'this' object is the
 changed definition.
 beginDiffObjects in interface DiffMergeabledocDef - 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 diffObjects(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeablediffContents
 to diff scalar values and diffChildren to diff
 children objects.  The children objects themselves are expected
 to be DiffMergeable.  'this' object is the
 changed definition.
 diffObjects in interface DiffMergeabledocDef - 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 ensureDifferDetails(DifferDetails difDetails)
DiffMergeableDifferDetails.
 
 This method is to create a DifferDetails object to
 be used for diffing if necessary.  The difDetails may come in
 as null.  By calling this method, we can ensure that
 a non-null difDetails is there.  So, instead of
 writing:
 
    if (difDetails == null)
    {
       difDetails = new DifferDetails(..);
    }
    difDetails.addDiffDetail(..);
 
 we can write
 
    (difDetails = diffMergeable.ensureDifferDetails(difDetails)).addDiffDetail(..);
 
 ensureDifferDetails in interface DiffMergeabledifDetails - the incoming DifferDetails.  It may
   be null.difDetails if it wasn't
   null coming in, or a new DifferDetails if
   the incoming difDetails was nullpublic void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
DiffMergeabledif 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 DiffMergeablepublic 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 DiffMergeabledif - changes to be applied to 'this' defresolver - the diff resolver used in diff/merge operationpublic boolean reapplyChanges(PersistableDefObject tipObj, DiffResolver resolver)
@Concealed public static boolean mergeChanges(PersistableDefObject editObj, PersistableDefObject tipObj, PersistableDefObject origObj, DiffResolver resolver, java.lang.String transMajor, java.lang.String transMinor)
public boolean isAutoMerged()
@Concealed public void updateMdsKeyFromTip(PersistableDefObject tipObj)
@Concealed public void updateChildObject(DefWriter jos, DefPersistable child, DefPersistable orgChild, boolean useFullName, boolean writeDelta, boolean forceReplace)
@Concealed public void updateChildrenList(DefWriter jos, java.util.List lst, java.util.List orgLst, boolean useFullName, boolean writeDelta, boolean forceReplace)
@Concealed public static void staticUpdateChildrenList(DefWriter jos, java.util.List lst, java.util.List orgLst, boolean useFullName, boolean writeDelta, boolean forceReplace, DefPersistable parentObj)
public java.util.List getDefImports()
protected java.lang.Object findDefImport(java.lang.String defName)
public java.lang.Object addDefImport(java.lang.String defName,
                                     boolean doFind)
public void removeDefImport(java.lang.String defName)
protected void loadDefImports(DefElement xmlElement)
protected java.util.HashMap adjustPropertyMapForWrite()
public boolean includeCustomizationLayerInfo()
public boolean isInheritPolicyStrict()
public void writeChildren(DefWriter jos)
PersistentDefinitionwriteChildren in interface PersistentDefinitionjos - the Output storage for persistenceprotected java.util.HashMap mergeEditedPropertiesForJSON(boolean isEditLocal,
                                                         java.util.Map origPropsMap,
                                                         java.util.HashMap propsMap)
public boolean isSaveToJSON()
public void writeXMLContents()
public void writeJSONContents()
public void readJSONObject(java.lang.String fileName)
public java.lang.String getFileName()
public boolean isCreateEditPDef()
public PersDefBase createEditPDef()
public PersDefBase allocatePDef()
public void extractCustIntoPDef(PersDefBase pDef)
public PersistableDefObject loadDefObject(boolean forTip, boolean forEditOrig, boolean resolveDef)
public void saveXMLContents()
public void forgetChanges()
public void reloadFromXMLContents()
public void saveJSONContents()
protected void postSaveContents()
@Concealed public void addSavedDocName(java.lang.String absoluteDocName)
absoluteDocName - the document name for a regenerated file@Concealed public java.util.List<java.lang.String> getSavedDocNames()
protected void finishedLoading()
finishedLoading in class DefinitionObjectprotected void callFinishedLoading()
callFinishedLoading in class DefinitionObjectpublic void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
public void loadXMLContentsNoResolve(DefElement xmlElement, java.lang.String fullName)
public void close()
protected void objectRemoved()
objectRemoved in class DefinitionObjectpublic void remove()
public boolean removeAndDelete()
public java.lang.String getFullFileName()
public java.lang.String buildFileName(java.lang.String objFullName)
public java.lang.String getFullDirName()
public void guaranteePath()
public static void verifyVersion(DefElement xmlElement, java.lang.String name)
public static void verifyVersionNullCheck(DefElement xmlElement, java.lang.String name, boolean nullOK)
public static void writeVersion(DefWriter jos)
public java.util.Map getPropertyMap()
NamedObjectImplgetPropertyMap in class NamedObjectImplpublic final boolean isPropertyExpression(java.lang.String hintName)
isPropertyExpression in class NamedObjectImpl@Concealed protected java.util.Map allocatePropertyMap()
allocatePropertyMap in class NamedObjectImpl@Concealed public java.util.Set<java.lang.String> getPropertyNamesSet()
NamedObjectImplgetPropertyNamesSet in class NamedObjectImplpublic void removeProperty(java.lang.String hintName,
                           LocaleContext locale)
removeProperty in class NamedObjectImplpublic void setProperty(java.lang.String hintName,
                        java.lang.Object hintValue,
                        LocaleContext locale)
setProperty in class NamedObjectImpl@Restricted
public void setPropertyExpression(java.lang.String hintName,
                                              java.lang.String hintExpression)
setPropertyExpression in class NamedObjectImplhintName - the property namehintExpression - expression that will be evaluated in the
 context of a row or definition object@Concealed protected java.util.Map allocatePropertyMapForEdits()
@Concealed public java.util.HashMap getEditedPropertiesMap()
@Concealed protected java.util.Map getEditedPropertyMap()
@Concealed protected java.util.HashMap getEditedPropertyExpressionsMap()
@Restricted public void setPropertyMap(java.util.Map m)
setPropertyMap in class NamedObjectImpl@Concealed public void mergePropertyMap(java.util.Map m)
mergePropertyMap in class NamedObjectImplpublic boolean isCustomizationEnabled()
public boolean isCustomizationEnabled(PersistableDefObject.CustomizationType type)
public void setCustomizationEnabled(PersistableDefObject.CustomizationType type, boolean flag)
public void setCustomizationEnabled(java.util.EnumSet<PersistableDefObject.CustomizationType> types, boolean flag)
public boolean isPersonalizationEnabled()
public boolean isPersonalizationEnabled(PersistableDefObject.PersonalizationType type)
public void setPersonalizationEnabled(PersistableDefObject.PersonalizationType type, boolean flag)
public void setPersonalizationEnabled(java.util.EnumSet<PersistableDefObject.PersonalizationType> types, boolean flag)