public class PDefEntityObject extends PDefRow implements ValidationManager, TriggerContainer, CustomizableEntityDef
If this PDefEntityObject's attribute is changed later, and nothing cuased the PDefViewObject to be reloaded from XML, the PDefViewObject may end up with stale definition. To fix this problem, Jedi code will invoke DefinitionManager::removeAllSessionDefinitions() to 'dump' all session definitions and pers definitions. Additionally Jedi ensures that PDefViewObject mirrors attribute level customizations done on the PDefEntityObject's personalized attributes so that runtime does not forget loading these personalizations.
Any ADFbc client who performs similar DTRT operations, should make the same call. However, one must take care when calling removeAllSessionDefinitions() as it will remove all session defs and clear out the MDS cache.
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType
APPLY_PERS_DB, APPLY_PERS_DEFAULT, APPLY_PERS_EVENTS, APPLY_PERS_PROPS, APPLY_PERS_QUERY, APPLY_PERS_STRUCT, APPLY_PERS_TO_BASE_DEF, APPLY_PERS_VALS, mUserPDefLogger
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 |
---|
PDefEntityObject() |
PDefEntityObject(EntityDefImpl entityDef) |
Modifier and Type | Method and Description |
---|---|
AssociationDefImpl |
addAssocAccessor(java.lang.String accName,
java.lang.String assocName,
java.lang.Class javaType) |
AssociationDefImpl |
addAssocAccessor(java.lang.String accName,
java.lang.String assocName,
java.lang.Class javaType,
AssociationDefBase.IntersectExpandEnd mtomEnd) |
AttributeDefImpl |
addAttribute(java.lang.String attrName,
java.lang.String columnName,
java.lang.Class javaType,
boolean isPersistent) |
AttributeDefImpl |
addCustomAttribute(java.lang.String attrName,
java.lang.String columnName,
java.lang.Class javaType,
boolean isPersistent) |
void |
addEventDef(EventDef eventDef) |
void |
addEventMapping(EventMapping eventMapping) |
void |
addPersTrigger(TriggerType trig,
JboValidatorInterface validator)
Internal: Applications should not use this method. *
|
void |
addTrigger(TriggerType trig,
JboValidatorHints validator)
Internal: Applications should not use this method. *
|
void |
addTrigger(TriggerType trig,
JboValidatorInterface validator)
Internal: Applications should not use this method. *
|
void |
addValidator(JboValidatorHints validator) |
void |
addValidator(JboValidatorInterface validator) |
protected java.util.HashMap |
adjustPropertyMapForWrite() |
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 |
applyPersDB(java.lang.Object instance) |
void |
applyPersEvents(java.lang.Object instance) |
void |
applyPersonalization(int mode,
java.lang.Object instance) |
void |
applyPersonalizationToBaseDef() |
void |
applyPersProps(java.lang.Object instance) |
void |
applyPersStruct(java.lang.Object instance) |
void |
applyPersVals(java.lang.Object instance) |
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.
|
static PDefEntityObject |
findDefObject(java.lang.String persDefName) |
static PDefEntityObject |
findDefObjectNoSub(java.lang.String persDefName) |
DefinitionObject |
findStaticDefinitionObject(java.lang.String fullName) |
StructureDef |
findStructureDefByName(java.lang.String structDefFullName) |
JboValidatorHints |
findTrigger(TriggerType trig,
java.lang.String name) |
JboValidatorHints |
findValidator(java.lang.String name) |
static java.lang.String[] |
getAllDefNames() |
java.util.HashMap |
getAllProperties(java.util.HashMap map,
LocaleContext locale) |
java.lang.String |
getDefXMLNameSpace() |
java.lang.String |
getEditVersionsAsString() |
java.util.ArrayList |
getEventDefs() |
java.util.ArrayList |
getEventMappings() |
oracle.jbo.server.InheritPersonalization |
getInheritPersonalizationValue() |
protected int |
getLoadSubclassLevel() |
int |
getMajorVersion() |
int |
getMinorVersion() |
protected java.lang.String |
getNoPersDefObjectName(java.lang.String metaObjectName) |
java.util.ArrayList |
getPersTriggers(TriggerType trig)
Internal: Applications should not use this method. *
|
java.util.ArrayList |
getPersValidators() |
java.util.ArrayList |
getTriggers(TriggerType trig)
Internal: Applications should not use this method. *
|
java.util.ArrayList |
getValidators() |
boolean |
isCustIntoStaticDef() |
PersistableDefObject |
loadDefObject(boolean forTip,
boolean forEditOrig,
boolean resolveDef) |
protected void |
loadDefVersions(DefElement xmlElement) |
void |
loadXMLAttrDefContents(DefElement elem,
int index) |
void |
loadXMLContents(DefElement xmlElement,
java.lang.String fullName) |
EventDef |
lookupEventDef(java.lang.String eventName) |
EventMapping |
lookupEventMapping(java.lang.String name) |
ExprDef |
lookupExprDef(OwnerType type,
java.lang.String path)
Search for an ExprDef in the ComponentOperationsManager's namespace.
|
JboValidatorHints |
lookupPersTrigger(TriggerType trig,
java.lang.String valName) |
JboValidatorHints |
lookupPersValidator(java.lang.String valName) |
JboValidatorHints |
lookupTrigger(TriggerType trig,
java.lang.String valName)
Internal: Applications should not use this method. *
|
JboValidatorHints |
lookupValidator(java.lang.String valName) |
JboValidatorInterface |
lookupValidatorByName(java.lang.String valName) |
EventDef |
personalizeEventDef(java.lang.String name) |
EventMapping |
personalizeEventMapping(java.lang.String eventName,
EventMapping.EventPointType type) |
JboValidatorHints |
personalizeTrigger(TriggerType trig,
java.lang.String name,
java.lang.String validatorType,
java.lang.String validatorSubType)
Internal: Applications should not use this method. *
|
JboValidatorHints |
personalizeValidator(java.lang.String name,
java.lang.String validatorType,
java.lang.String validatorSubType) |
protected void |
processAccessors() |
boolean |
removeEventDef(java.lang.String eventName) |
boolean |
removeEventMapping(java.lang.String name) |
boolean |
removePayloadItem(java.lang.String eventDefName,
java.lang.String attrName)
Removes the specified event payload item from this entity object, if it is
present.
|
boolean |
removePersTrigger(TriggerType trig,
java.lang.String valName) |
boolean |
removePersValidator(java.lang.String valName) |
void |
removeTrigger(TriggerType trig,
java.lang.String valName)
Internal: Applications should not use this method. *
|
void |
removeValidator(java.lang.String valName) |
void |
resolveDefObject() |
protected java.lang.Object |
resolvePropertyRaw(java.lang.String property,
LocaleContext locale) |
void |
saveXMLContents() |
void |
setBatchThreshold(int num) |
void |
setCustIntoStaticDef(boolean b) |
void |
setInheritPersonalizationStrValue(java.lang.String s) |
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 |
writeXMLContents() |
addListBindingDef, addRowOperation, addScriptRowOperation, addViewAccessorDef, findAttributeDef, findListBindingDef, findRowOperationDefinition, findViewAccessorDef, getAttrDefsMap, getAttributeCount, getAttributeDef, getAttributeDefs, getAttributeDefs2, getAttributeIndexOf, getChildDefOwner, getColumnNameForQuery, getHiddenAttributes, getHiddenAttributesList, getListBindingDefs, getPersonalizedAttributes, getResourceBundleDef, getScriptRowOperationDefinitions, getScriptRowOperationDefinitions, getStructureDef, getViewAccessorDefs, hideAttribute, isObjectResolved, lookupAttributeDef, lookupListBindingDef, lookupPersonalizedAttribute, lookupRowOperationDefinition, lookupViewAccessorDef, personalizeAttribute, removeAttribute, removeHiddenAttribute, removeListBindingDef, removePersonalizedAttribute, removeRowOperation, removeViewAccessorDef, setEditable, setWholeDefDirty, setWholeDefNew
addOperation, addScriptOperation, applyDiffChildrenPDefComponentOperations, beginDiffObjects, diffChildrenPDefComponentOperations, editCodeSource, ensureCodeSource, ensureVariableManager, findOperationDefinition, getMessageBundleClass, getOperationDefinitions, getPersonalizedVariables, getResourceBundleDef, getResourcePrefix, getRowOperationDefinitions, getScriptOperationDefinitions, getVariableManager, hasPersonalizedComponentOperations, hasVariables, isDynamicCodeSourceEnabled, lookupCodeSource, lookupOperationDefinition, lookupPersonalizedVariable, lookupRowOperationDefinition, personalizeOperations, personalizeVariable, reapplyChanges, removeOperation, removePersonalizedVariable, setReapplyMerge, setVariableManager, updateMdsKeyFromTip
applyPersonalization, applyPropertiesPersonalization, deregisterDefObject, deregisterSessionObject, getBasePackage, getFileName, getStaticDef, getStaticDefWithCheck, getTrimmedFullName, getTrimmedFullNameForDef, hasStaticDefElem, isAuditEnabled, isAuditEnabled, isAutoMerged, isDeprecated, loadSubclassXMLContents, loadXMLContents, mergePropertyMap, raiseCustomAuditEvent, registerDefObject, registerSessionDefObject, removeProperty, setDefinitionState, setFullName, setFullName, setProperty, setPropertyExpression, setPropertyMap, setStaticDef, setStaticDefPublic
addChildren, addDefImport, addExtendedDefObject, addSavedDocName, allocatePDef, allocatePropertyMap, allocatePropertyMapForEdits, baseIsWriteObject, buildChildName, buildFileName, callFinishedLoading, checkEditable, checkEditableWithDefWriter, checkStructWithOld, close, createEditPDef, createFromXML, deregisterHLDef, diffChildrenHLDefs, diffChildrenProperties, diffObjects, ensureDifferDetails, ensureDifferSkip, extractCustIntoPDef, findDefImport, finishedLoading, forgetChanges, getBaseDir, getChildren, getDefImports, getDefManager, getDefTypeName, getDefWriter, getDefXMLElementTag, getDifferSkip, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getEditObject, getExtendedDefObjectsInternal, getFullDirName, getFullFileName, getHLDefMap, getIdentificationAttributeName, getMergeableFullName, getMergeableName, getOrigObject, getPropertyMap, getPropertyNamesSet, getSavedDocNames, getSessionSyncLock, getSubstitutedNames, getSyncLock, getXMLElementTag, guaranteePath, hasExtendedDefObjects, includeCustomizationLayerInfo, isCreateEditPDef, isCustomizationEnabled, isCustomizationEnabled, isDirty, isEditable, isFromTip, isInheritPolicyStrict, isLoadBase, isLoadHLDefs, isMajorVersionChanged, isMinorVersionChanged, isNew, isNewRecurse, isPersonalizationEnabled, isPersonalizationEnabled, isPropertyExpression, isSaveToJSON, isSkipWrite, isWriteObject, loadDefImports, loadXMLContentsNoResolve, lockDefinitionContext, lookupHLDef, makeNew, mergeChanges, mergeEditedPropertiesForJSON, objectRemoved, postSaveContents, readJSONObject, registerClass, registerHLDef, registerSiteDefObject, reloadFromXMLContents, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, saveJSONContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setDirty, setEditableFlag, setEditableObject, setForRuntime, setFullNameInternal, setLoadBase, setLoadHLDefs, setMajorVersionChanged, setNew, setNewRecurse, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setSkipWrite, setupDefWriterFromMO, staticUpdateChildrenList, transferDefChangesInto, unlockDefinitionContext, updateChildObject, updateChildrenList, verifyVersion, verifyVersionNullCheck, writeHeaderForNew, writeJSONContents, writeObject, writeVersion
addPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getBaseDefObject, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getMdsReferenceName, getPropertySetName, getPropertySetNames, getRootBaseDefObject, isBaseDefFor, isComponentDefinition, isDynamicDefinitionObject, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, objectFound, objectInserted, resolveReferences, setBaseDefObject, setBaseDefObject, setDefScope, setMdsKey, setMdsReference, setName, setObjectResolved, setParent, 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
findAttributeDef, lookupAttributeDef, removeAttribute
getFullName, isDirty, isNew, saveXMLContents, setDirty, setEditable
getProperty, removeProperty, setProperty
getFullName, getName, getResourceBundleDef, getResourceBundleDef, getStructureDef
getName
getDefManager, getDefScope, getFullName
getFullName
public PDefEntityObject()
public PDefEntityObject(EntityDefImpl entityDef)
public static java.lang.String[] getAllDefNames()
public static PDefEntityObject findDefObjectNoSub(java.lang.String persDefName)
public static PDefEntityObject findDefObject(java.lang.String persDefName)
public DefinitionObject findStaticDefinitionObject(java.lang.String fullName)
findStaticDefinitionObject
in interface PersonalizableDef
findStaticDefinitionObject
in class PersDefBase
public java.util.ArrayList getValidators()
getValidators
in interface ValidationManager
getValidators
in class PDefRow
public JboValidatorHints findValidator(java.lang.String name)
public JboValidatorInterface lookupValidatorByName(java.lang.String valName)
lookupValidatorByName
in interface CustomizableEntityDef
public JboValidatorHints lookupValidator(java.lang.String valName)
lookupValidator
in interface CustomizableEntityDef
public void addValidator(JboValidatorHints validator)
public void addValidator(JboValidatorInterface validator)
addValidator
in interface ValidationManager
addValidator
in class PDefRow
public void removeValidator(java.lang.String valName)
removeValidator
in interface CustomizableEntityDef
public java.util.ArrayList getPersValidators()
public JboValidatorHints personalizeValidator(java.lang.String name, java.lang.String validatorType, java.lang.String validatorSubType)
public JboValidatorHints lookupPersValidator(java.lang.String valName)
public boolean removePersValidator(java.lang.String valName)
@Restricted public java.util.ArrayList getTriggers(TriggerType trig)
getTriggers
in interface CustomizableEntityDef
public JboValidatorHints findTrigger(TriggerType trig, java.lang.String name)
@Concealed public JboValidatorHints lookupTrigger(TriggerType trig, java.lang.String valName)
lookupTrigger
in interface TriggerContainer
@Concealed public void addTrigger(TriggerType trig, JboValidatorInterface validator)
addTrigger
in interface TriggerContainer
@Restricted public void addTrigger(TriggerType trig, JboValidatorHints validator)
@Restricted public void removeTrigger(TriggerType trig, java.lang.String valName)
removeTrigger
in interface TriggerContainer
@Concealed public java.util.ArrayList getPersTriggers(TriggerType trig)
public JboValidatorHints lookupPersTrigger(TriggerType trig, java.lang.String valName)
lookupPersTrigger
in interface TriggerContainer
@Concealed public void addPersTrigger(TriggerType trig, JboValidatorInterface validator)
addPersTrigger
in interface TriggerContainer
@Concealed public JboValidatorHints personalizeTrigger(TriggerType trig, java.lang.String name, java.lang.String validatorType, java.lang.String validatorSubType)
public boolean removePersTrigger(TriggerType trig, java.lang.String valName)
removePersTrigger
in interface TriggerContainer
public java.util.ArrayList getEventDefs()
public void addEventDef(EventDef eventDef)
public EventDef lookupEventDef(java.lang.String eventName)
public boolean removeEventDef(java.lang.String eventName)
public EventDef personalizeEventDef(java.lang.String name)
public java.util.ArrayList getEventMappings()
public void addEventMapping(EventMapping eventMapping)
public EventMapping lookupEventMapping(java.lang.String name)
public boolean removeEventMapping(java.lang.String name)
public EventMapping personalizeEventMapping(java.lang.String eventName, EventMapping.EventPointType type)
public boolean removePayloadItem(java.lang.String eventDefName, java.lang.String attrName)
eventDefName
- the name of the event containing the payload itemattrName
- the name of the payload item to be removedfalse
if the event or payload item was not foundpublic AssociationDefImpl addAssocAccessor(java.lang.String accName, java.lang.String assocName, java.lang.Class javaType, AssociationDefBase.IntersectExpandEnd mtomEnd)
public AssociationDefImpl addAssocAccessor(java.lang.String accName, java.lang.String assocName, java.lang.Class javaType)
addAssocAccessor
in interface CustomizableEntityDef
public void setBatchThreshold(int num)
public AttributeDefImpl addCustomAttribute(java.lang.String attrName, java.lang.String columnName, java.lang.Class javaType, boolean isPersistent)
addCustomAttribute
in interface CustomizableEntityDef
attrName
- columnName
- javaType
- isPersistent
- public AttributeDefImpl addAttribute(java.lang.String attrName, java.lang.String columnName, java.lang.Class javaType, boolean isPersistent)
public StructureDef findStructureDefByName(java.lang.String structDefFullName)
protected void processAccessors()
processAccessors
in class PDefRow
public void applyPersonalization(int mode, java.lang.Object instance)
applyPersonalization
in interface PersonalizableDef
applyPersonalization
in class PersDefBase
public void applyPersStruct(java.lang.Object instance)
public void applyPersDB(java.lang.Object instance)
public void applyPersProps(java.lang.Object instance)
public void applyPersVals(java.lang.Object instance)
public void applyPersEvents(java.lang.Object instance)
public void writeChildren(DefWriter jos)
PersistentDefinition
writeChildren
in interface PersistentDefinition
writeChildren
in class PDefRow
jos
- the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
writeContents
in class PDefComponentObjectBase
jos
- the Output storage for persistencepublic void writeXMLContents()
writeXMLContents
in interface CustomizableMetaObject
public void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
loadXMLContents
in class PDefComponentObjectBase
public void resolveDefObject()
resolveDefObject
in interface PersonalizableDef
resolveDefObject
in class PDefRow
public void loadXMLAttrDefContents(DefElement elem, int index)
public 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 PDefRow
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 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
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 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 PDefRow
public ExprDef lookupExprDef(OwnerType type, java.lang.String path)
ComponentOperationsManager
lookupExprDef
in interface ComponentOperationsManager
lookupExprDef
in class PDefRow
type
- the OwnerType
of the expressionpath
- the ExprDef.getPath()
of the expressionpublic oracle.jbo.server.InheritPersonalization getInheritPersonalizationValue()
public void setInheritPersonalizationStrValue(java.lang.String s)
public boolean isCustIntoStaticDef()
public void setCustIntoStaticDef(boolean b)
public PersistableDefObject loadDefObject(boolean forTip, boolean forEditOrig, boolean resolveDef)
loadDefObject
in class PersistableDefObject
protected int getLoadSubclassLevel()
public java.lang.String getEditVersionsAsString()
getEditVersionsAsString
in class PersistableDefObject
public int getMajorVersion()
getMajorVersion
in class PersistableDefObject
public int getMinorVersion()
getMinorVersion
in class PersistableDefObject
protected void loadDefVersions(DefElement xmlElement)
protected java.lang.String getNoPersDefObjectName(java.lang.String metaObjectName)
public void applyPersonalizationToBaseDef()
public void saveXMLContents()
saveXMLContents
in class PersDefBase
protected java.lang.Object resolvePropertyRaw(java.lang.String property, LocaleContext locale)
resolvePropertyRaw
in class NamedObjectImpl
public java.util.HashMap getAllProperties(java.util.HashMap map, LocaleContext locale)
getAllProperties
in class NamedObjectImpl
protected java.util.HashMap adjustPropertyMapForWrite()
adjustPropertyMapForWrite
in class PersistableDefObject
public java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace
in interface PersistentDefinition
getDefXMLNameSpace
in class PersistableDefObject
public 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 operation