public class ViewLinkDefImpl extends AssociationDefBase
NAME ViewLinkDefImpl.java - DESCRIPTION The ViewLinkDefImpl describes relationship between two query objects. NOTES VERSION MODIFIED (MM/DD/YY) jloropez 06/08/04 -
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType
Modifier and Type | Field and Description |
---|---|
protected oracle.jbo.server.EntityAssociationReference |
mAssocRef |
mComponentClass, PERSMERGED_BASE_PACKAGE
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
XML_STATEMENT
Constructor and Description |
---|
ViewLinkDefImpl()
Constructs a query association
|
ViewLinkDefImpl(int defScope,
java.lang.String name) |
ViewLinkDefImpl(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
applyDiffContents(DifferDetails dif,
DiffResolver resolver)
When diff/merge operation is requested, we have the following
three def objects:
|
void |
buildLinkEnds(ViewDefImpl source,
java.lang.String srcName,
int srcCardinality,
boolean isSrcPartitionUsingWhereClause,
AttributeDefImpl[] srcAttrs,
java.lang.String[] srcUnboundAttrNames,
ViewDefImpl destination,
java.lang.String destName,
int destCardinality,
boolean isDestPartitionUsingWhereClause,
AttributeDefImpl[] destAttrs,
java.lang.String[] destUnboundAttrNames,
java.lang.Object entityAssocObj,
java.lang.String assocClause,
java.lang.String reverseAssocClause)
Internal use only.
|
DifferDetails |
diffContents(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails)
Performs diff of scalar values.
|
static ViewLinkDefImpl |
findDefObject(java.lang.String viewLinkDefName)
Finds the ViewLinkDefImpl from the statically maintained list of Meta Objects.
|
static ViewLinkDefImpl |
findDefObjectNoSub(java.lang.String viewLinkDefName)
Finds the ViewLinkDefImpl from the statically maintained list of Meta Objects.
|
static java.lang.String[] |
getAllDefNames() |
java.lang.String |
getBaseAssociationName() |
int |
getBindingStyle() |
java.lang.Class |
getComponentClass()
Gets the Java
Class of the component that this definition
object describes, i.e., oracle.jbo.server.ViewLinkImpl. |
int |
getDefTypeId() |
java.lang.String |
getDefXMLElementTag() |
ViewAttributeDefImpl[] |
getDestinationBindVariables() |
AssociationEnd |
getDestinationEntityAssocEnd() |
java.lang.String |
getEndDefXMLElementTag() |
EntityAssociation |
getEntityAssociation() |
oracle.jbo.server.EntityAssociationReference |
getEntityAssociationReference() |
AssociationEnd |
getSourceEntityAssocEnd() |
boolean |
isEntityAssociationReversed() |
boolean |
isPartitionUsingWhereClause(boolean isReversed) |
boolean |
isSDOHidden() |
static ViewLinkDefImpl |
loadFromXML(DefElement xmlElement)
Deprecated.
|
void |
loadXMLContents(DefElement xmlElement,
java.lang.String fullName) |
protected void |
resolveReferences() |
void |
setBaseAssociationName(java.lang.String assocName) |
protected void |
setDefForComponent(ComponentObjectImpl comp) |
void |
setDestinationBindVariables(ViewAttributeDefImpl[] vars) |
void |
setEntityAssociationReference(oracle.jbo.server.EntityAssociationReference assocRef) |
void |
setEntityAssociationReversed(boolean b) |
void |
setSDOHidden(boolean b) |
protected void |
unsetDefForComponent(ComponentObjectImpl comp) |
void |
writeContents(DefWriter jos)
Objects should write their persistence output in this method
|
applyDiffChildren, diffChildren, findEndAccessorByName, findEndByName, getAccessors, getAssociationClause, getAttributeDefImpls, getAttributeDefImplsByEndName, getDefs, getDestinationEnd, getDestinationOwner, getOtherAttributeDefImpls, getReverseAssociationClause, getSourceEnd, getSourceOwner, resolveDefObject, setAssociationClause, setDirty, setReverseAssociationClause, writeChildren
deregisterSessionObject, getEditVersionsAsString, getInheritPersonalizationValue, getMajorVersion, getMessageBundleClass, getMinorVersion, getMsgBundleDef, getPackageDef, getPackageName, getPersDef, getPersDefNoUpdateCheck, getPersMergedDef, getResourceBundleDef, getResourcePrefix, isDynamic, isInheritPersonalization, loadDefVersions, loadResourceBundle, registerDefObject, registerSessionDefObject, resetDefResolved, setInheritPersonalization, setInheritPersonalizationStrValue, setMessageBundleClass, setResourceBundleDef
ensureVariableManager, finishedLoading, getAdfmConfigStartupProperty, getAllProperties, getBaseDefObject, getBooleanAdfmConfigProperty, getDefXMLNameSpace, getVariableManager, getVarMgrParents, hasVariables, isDeprecated, isFromCustomization, loadProperties, loadVariables, resolvePropertyRaw, setBaseDefObject, setBaseDefObject, setName, setParent
addDefImport, addExtendedDefObject, addSavedDocName, adjustPropertyMapForWrite, allocatePropertyMap, allocatePropertyMapForEdits, beginDiffObjects, checkEditable, checkStructWithOld, close, createFromXML, deregisterDefObject, diffObjects, ensureDifferDetails, findDefImport, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefTypeName, getDefWriter, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getEditObject, getExtendedDefObjectsInternal, getFileName, getFullDirName, getFullFileName, getMergeableFullName, getMergeableName, getOrigObject, getPropertyMap, getSavedDocNames, getSessionSyncLock, getSubstitutedNames, getSyncLock, getXMLElementTag, guaranteePath, hasExtendedDefObjects, includeCustomizationLayerInfo, isCustomizationEnabled, isCustomizationEnabled, isDirty, isEditable, isFromTip, isLoadBase, isMajorVersionChanged, isMinorVersionChanged, isNew, isPersonalizationEnabled, isPersonalizationEnabled, isPropertyExpression, loadDefImports, loadDefObject, loadXMLContentsNoResolve, lockDefinitionContext, mergeChanges, mergePropertyMap, objectRemoved, reapplyChanges, registerClass, registerSiteDefObject, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, removeProperty, saveXMLContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setEditable, setEditableFlag, setEditableObject, setFullName, setFullNameInternal, setLoadBase, setMajorVersionChanged, setNew, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, setupDefWriterFromMO, staticUpdateChildrenList, unlockDefinitionContext, updateChildrenList, updateMdsKeyFromTip, verifyVersion, verifyVersionNullCheck, writeHeaderForNew, writeObject, writeVersion, writeXMLContents
addPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, getRootBaseDefObject, isBaseDefFor, isComponentDefinition, isDynamicDefinitionObject, isObjectResolved, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, setDefScope, setMdsKey, setMdsReference, setObjectResolved, setPropertySetName, staticLoadCustomProperties, staticLoadSchemaProperties, suppressUpdateCheck
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionDef, getPropertyExpressionsMap, getPropertyNamesSet, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setPropertiesMap, setPropertiesMap2, setProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFullName, getName
getName
getFullName
public ViewLinkDefImpl()
public ViewLinkDefImpl(int defScope, java.lang.String name)
public ViewLinkDefImpl(java.lang.String name)
public static java.lang.String[] getAllDefNames()
public static ViewLinkDefImpl findDefObjectNoSub(java.lang.String viewLinkDefName)
findDefObject
,
except that it does not observe meta-object substitution.viewLinkDefName
- The fully qualified Name of the ViewDefImpl.public static ViewLinkDefImpl findDefObject(java.lang.String viewLinkDefName)
viewLinkDefName
- The fully qualified Name of the ViewDefImpl.public java.lang.Class getComponentClass()
Class
of the component that this definition
object describes, i.e., oracle.jbo.server.ViewLinkImpl.public void buildLinkEnds(ViewDefImpl source, java.lang.String srcName, int srcCardinality, boolean isSrcPartitionUsingWhereClause, AttributeDefImpl[] srcAttrs, java.lang.String[] srcUnboundAttrNames, ViewDefImpl destination, java.lang.String destName, int destCardinality, boolean isDestPartitionUsingWhereClause, AttributeDefImpl[] destAttrs, java.lang.String[] destUnboundAttrNames, java.lang.Object entityAssocObj, java.lang.String assocClause, java.lang.String reverseAssocClause)
public java.lang.String getBaseAssociationName()
public void setBaseAssociationName(java.lang.String assocName)
public int getBindingStyle()
public boolean isEntityAssociationReversed()
public void setEntityAssociationReversed(boolean b)
public oracle.jbo.server.EntityAssociationReference getEntityAssociationReference()
public void setEntityAssociationReference(oracle.jbo.server.EntityAssociationReference assocRef)
assocRef
- The EntityAssociationReference.public EntityAssociation getEntityAssociation()
public AssociationEnd getSourceEntityAssocEnd()
public AssociationEnd getDestinationEntityAssocEnd()
public ViewAttributeDefImpl[] getDestinationBindVariables()
public boolean isPartitionUsingWhereClause(boolean isReversed)
public void setDestinationBindVariables(ViewAttributeDefImpl[] vars)
vars
- The list of AttributeDefImpls as bind variables on other end.public void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
writeContents
in class AssociationDefBase
jos
- the Output storage for persistencepublic void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
loadXMLContents
in class MetaObject
@Deprecated public static ViewLinkDefImpl loadFromXML(DefElement xmlElement)
protected void resolveReferences()
resolveReferences
in class AssociationDefBase
public int getDefTypeId()
getDefTypeId
in class DefObject
protected void setDefForComponent(ComponentObjectImpl comp)
setDefForComponent
in class DefObject
protected void unsetDefForComponent(ComponentObjectImpl comp)
unsetDefForComponent
in class DefObject
public java.lang.String getEndDefXMLElementTag()
getEndDefXMLElementTag
in class AssociationDefBase
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
getDefXMLElementTag
in class PersistableDefObject
public boolean isSDOHidden()
public void setSDOHidden(boolean b)
public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeable
orgDef
. Then, help
methods on DifferBase
can be used to diff the attr values
and accumulate the details of diff in difDetails
.
Here is example code snippet:
private static final String DIFF_STRING_ELEMS[] = { "MyStringVal1", "MyStringVal2" }; private static final String DIFF_INT_ELEMS[] = { "MyIntVal", } public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails) {orgDefImpl = ( ) orgDef; final String editStringValues[] = { this.getMyStringVal1(), this.getMyStringVal2() }; String orgStringValues[] = null; if (orgDef != null) { String orgV[] = { orgDefImpl.getMyStringVal1(), orgDefImpl.getMyStringVal2() }; orgStringValues = orgV; } final int editIntValues[] = { this.getMyIntVal(), }; int orgIntValues[] = null; if (orgDef != null) { int orgV[] = { orgDefImpl.getMyIntVal() }; orgIntValues = orgV; } difDetails = DifferBase.diffStringArray(this, DIFF_STRING_ELEMS, editStringValues, orgStringValues, difDetails); difDetails = DifferBase.diffIntArray(this, DIFF_INT_ELEMS, editIntValues, orgIntValues, difDetails); return difDetails; }
diffContents
in interface DiffMergeable
diffContents
in class AssociationDefBase
docDef
- the document-level definitionorgDef
- the original definition. It could be
null
if the definition did not exist originallydifDetails
- the DifferDetails
that accumulate
the details of diff from the document-level (top-level) defDifferDetails
that has all the details
of diffpublic void applyDiffContents(DifferDetails dif, DiffResolver resolver)
DiffMergeable
orgDef - original def object (from the branch point)
editDef - def object into which changes are to be merge
toMergeDef - def object to be merged (source of changes)
For sandbox refresh operation, orgDef
comes from the branch
point, editDef
from the sandbox, toMergeDef
from the
mainline of the repos. With these three defs, we first diff editDef
against orgDef
, producing editDifDetails
.
Similarly, toMergeDef
is diffed against orgDef
,
producing toMergeDifDetails
. The diff engine then
walks through these two sets of diffs and identifies conflicts.
After the conflicts are all resolved, we apply appropriate
changes to editDef
.
applyDiffContents
is called to apply changes to
scalar values. dif
contains the changed values to
be applied to 'this'
object. Use sample code like
the following:
public void applyDiffContents(DifferDetails dif, DiffResolver resolver) { DifferChangeMap detailMap = dif.getDetailMap(); Object[] updValues; // DIFF_STRING_ELEMS from the above example code for (int j = 0; j < DIFF_STRING_ELEMS.length; j++) { if ((updValues = (Object[]) detailMap.getValue(DIFF_STRING_ELEMS[j])) != null) { switch(j) { case 0: setMyStringVal1((String) updValues[0]); break; case 1: setMyStringVal2((String) updValues[0]); break; } } } for (int j = 0; j < DIFF_INT_ELEMS.length; j++) { if ((updValues = (Object[]) detailMap.getValue(DIFF_INT_ELEMS[j])) != null) { switch(j) { case 0: setMyIntVal((Integer) updValues[0]); break; } } } }
Notice that the index specified in the case
statement is the array index of the attr in the String, int,
or boolean array.
applyDiffContents
in interface DiffMergeable
applyDiffContents
in class AssociationDefBase
dif
- changes to be applied to 'this'
defresolver
- the diff resolver used in diff/merge operation