public class AssociationEnd extends DefObject
 NAME
      AssociationEnd.java -
 DESCRIPTION
 NOTES
 VERSION
 MODIFIED   (MM/DD/YY)
 PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType| Modifier and Type | Field and Description | 
|---|---|
protected java.lang.String | 
mAliasName  | 
protected AttributeDefImpl[] | 
mColumnAttrs  | 
protected java.util.ArrayList | 
mColumns  | 
protected java.lang.String | 
mDBObjectName  | 
protected boolean | 
mIntersectInit  | 
protected java.lang.String | 
mOrderByClause  | 
mEditedProperties, mEditedPropertyExprsDEF_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_SUFFIXXML_STATEMENT| Modifier and Type | Method and Description | 
|---|---|
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: 
 | 
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. 
 | 
AssociationDefImpl | 
getAccessor()  | 
java.lang.String | 
getAliasName()  | 
java.util.List | 
getAttrDefNames()  | 
AttributeDefImpl[] | 
getAttributeDefImpls()  | 
java.util.ArrayList | 
getAttributeNames()  | 
int | 
getCardinality()  | 
java.util.ArrayList | 
getColumns()  | 
java.lang.String | 
getDBObjectName()  | 
int | 
getDefTypeId()  | 
java.lang.String | 
getDefXMLElementTag()  | 
java.util.List | 
getIntersectAttrDefNames()  | 
java.lang.String | 
getLockLevelStr(boolean nullForDefault)  | 
oracle.jbo.server.AssociationEnd.LockLevel | 
getLockLevelValue(java.lang.String s,
                 boolean processDefault)  | 
java.lang.Class | 
getMessageBundleClass()  | 
java.lang.String | 
getOrderByClause()  | 
DefObject | 
getOwner()  | 
java.lang.String | 
getOwnerName()  | 
ResourceBundleDef | 
getResourceBundleDef()  | 
boolean[] | 
getUnboundAttributeFlags()  | 
java.lang.String[] | 
getUnboundAttributeNames()  | 
byte | 
getUpdateableFlag()  | 
ViewDefImpl | 
getUsesViewObject()  | 
java.lang.String | 
getUsesViewObjectName()  | 
java.lang.String | 
getViewCriteriaName()  | 
boolean | 
hasContainer()  | 
boolean | 
isCascadeDelete()  | 
boolean | 
isCascadeUpdate()  | 
boolean | 
isCustomWhere()  | 
boolean | 
isDeleteContainee()  | 
boolean | 
isEffectiveDated()  | 
boolean | 
isEffectiveDatedDuringJoin()
EffectiveDatedDuringJoin controls if the entity usages are effective dated when the
 join view definition is created. 
 | 
boolean | 
isLockContainer()  | 
boolean | 
isLockTopContainer()  | 
boolean | 
isPartitionUsingWhereClause()  | 
boolean | 
isSource()  | 
boolean | 
isSuppressEvent()  | 
boolean | 
isUpdateHistoryColumn()  | 
void | 
loadXMLContents(DefElement xmlElement,
               java.lang.String fullName)  | 
protected void | 
resolveIntersectColumns()  | 
void | 
setAliasName(java.lang.String s)  | 
void | 
setAttributeDefImpls(AttributeDefImpl[] attrs)  | 
void | 
setAttributeNames(java.util.ArrayList arr)  | 
void | 
setCardinality(int i)  | 
void | 
setCascadeDelete(boolean b)  | 
void | 
setCascadeUpdate(boolean b)  | 
void | 
setDBObjectName(java.lang.String s)  | 
protected void | 
setDefForComponent(ComponentObjectImpl comp)  | 
void | 
setDeleteContainee(boolean b)  | 
void | 
setDirty(boolean b)
This method marks the Object dirty 
 | 
void | 
setEffectiveDated(boolean b)  | 
void | 
setEffectiveDatedDuringJoin(boolean b)
Controls if the entity usages are effective dated when the
 join view definition is created. 
 | 
void | 
setHasContainer(boolean b)  | 
void | 
setLockContainer(boolean b)
Sets flag to lock only the immediate container in this composition hierarchy. 
 | 
void | 
setLockLevel(oracle.jbo.server.AssociationEnd.LockLevel b)
Sets flag to lock the topmost container in this composition hierarchy. 
 | 
void | 
setLockTopContainer(boolean b)
Sets flag to lock the topmost container in this composition hierarchy. 
 | 
void | 
setOrderByClause(java.lang.String s)  | 
void | 
setOwner(DefObject owner)  | 
void | 
setOwnerName(java.lang.String ownerName)  | 
protected void | 
setParent(NamedObjectImpl parent)
Sets this object's parent. 
 | 
void | 
setPartitionUsingWhereClause(boolean b)  | 
void | 
setSource(boolean b)  | 
void | 
setSuppressEvent(boolean b)  | 
void | 
setUnboundAttributeNames(java.lang.String[] arr)  | 
void | 
setUpdateableFlag(byte updateable)  | 
void | 
setUpdateHistoryColumn(boolean b)  | 
void | 
setUsesViewObject(ViewDefImpl usesViewObject)  | 
void | 
setUsesViewObjectName(java.lang.String usesViewObjectName)  | 
protected void | 
setViewCriteriaName(java.lang.String vcName)  | 
void | 
setViewCriteriaName2(java.lang.String vcName)  | 
protected void | 
unsetDefForComponent(ComponentObjectImpl comp)  | 
boolean | 
useFindByKey()  | 
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 
 | 
ensureVariableManager, finishedLoading, getAdfmConfigStartupProperty, getAllProperties, getBaseDefObject, getBooleanAdfmConfigProperty, getDefXMLNameSpace, getVariableManager, getVarMgrParents, hasVariables, isDeprecated, isFromCustomization, loadProperties, loadVariables, resolvePropertyRaw, resolveReferences, setBaseDefObject, setBaseDefObject, setNameaddDefImport, addExtendedDefObject, addSavedDocName, adjustPropertyMapForWrite, allocatePropertyMap, allocatePropertyMapForEdits, beginDiffObjects, checkEditable, checkStructWithOld, close, createFromXML, deregisterDefObject, deregisterSessionObject, diffObjects, ensureDifferDetails, findDefImport, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefTypeName, getDefWriter, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getEditObject, getEditVersionsAsString, getExtendedDefObjectsInternal, getFileName, getFullDirName, getFullFileName, getMajorVersion, getMergeableFullName, getMergeableName, getMinorVersion, 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, registerDefObject, registerSessionDefObject, 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, writeXMLContentsaddPropertySetName, 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, suppressUpdateCheckgetFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionDef, getPropertyExpressionsMap, getPropertyNamesSet, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setPropertiesMap, setPropertiesMap2, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamegetFullNameprotected java.lang.String mDBObjectName
protected java.lang.String mAliasName
protected java.lang.String mOrderByClause
protected java.util.ArrayList mColumns
protected AttributeDefImpl[] mColumnAttrs
protected boolean mIntersectInit
protected void setParent(NamedObjectImpl parent)
DefObjectpublic void setDirty(boolean b)
DefPersistablesetDirty in interface DefPersistablesetDirty in class PersistableDefObjectb - If true the Object is marked Dirty.protected void resolveIntersectColumns()
public int getDefTypeId()
getDefTypeId in class DefObjectprotected void setDefForComponent(ComponentObjectImpl comp)
setDefForComponent in class DefObjectprotected void unsetDefForComponent(ComponentObjectImpl comp)
unsetDefForComponent in class DefObjectpublic void setViewCriteriaName2(java.lang.String vcName)
protected void setViewCriteriaName(java.lang.String vcName)
public AssociationDefImpl getAccessor()
public DefObject getOwner()
public void setOwner(DefObject owner)
public java.lang.String getOwnerName()
public void setOwnerName(java.lang.String ownerName)
public ViewDefImpl getUsesViewObject()
public java.lang.String getViewCriteriaName()
public void setUsesViewObject(ViewDefImpl usesViewObject)
public java.lang.String getUsesViewObjectName()
public void setUsesViewObjectName(java.lang.String usesViewObjectName)
public boolean isSource()
public void setSource(boolean b)
public byte getUpdateableFlag()
public void setUpdateableFlag(byte updateable)
public boolean isCascadeUpdate()
public void setCascadeUpdate(boolean b)
public boolean isCascadeDelete()
public void setCascadeDelete(boolean b)
public boolean isDeleteContainee()
public void setDeleteContainee(boolean b)
public void setLockLevel(oracle.jbo.server.AssociationEnd.LockLevel b)
public boolean isLockTopContainer()
public void setLockTopContainer(boolean b)
public boolean isLockContainer()
public void setLockContainer(boolean b)
public boolean isUpdateHistoryColumn()
public void setUpdateHistoryColumn(boolean b)
public boolean hasContainer()
public void setHasContainer(boolean b)
public int getCardinality()
public void setCardinality(int i)
public boolean useFindByKey()
public java.lang.String getDBObjectName()
public void setDBObjectName(java.lang.String s)
public java.lang.String getAliasName()
public void setAliasName(java.lang.String s)
public java.lang.String getOrderByClause()
public void setOrderByClause(java.lang.String s)
public java.util.ArrayList getColumns()
public java.util.List getIntersectAttrDefNames()
public boolean isSuppressEvent()
public void setSuppressEvent(boolean b)
public boolean isEffectiveDated()
public void setEffectiveDated(boolean b)
public boolean isEffectiveDatedDuringJoin()
setEffectiveDatedDuringJoin(boolean).public void setEffectiveDatedDuringJoin(boolean b)
b - a flag to change the behavior as explained above.public AttributeDefImpl[] getAttributeDefImpls()
public void setAttributeDefImpls(AttributeDefImpl[] attrs)
public java.util.ArrayList getAttributeNames()
public java.util.List getAttrDefNames()
public void setAttributeNames(java.util.ArrayList arr)
public boolean[] getUnboundAttributeFlags()
public java.lang.String[] getUnboundAttributeNames()
public void setUnboundAttributeNames(java.lang.String[] arr)
public boolean isPartitionUsingWhereClause()
public void setPartitionUsingWhereClause(boolean b)
public boolean isCustomWhere()
public java.lang.Class getMessageBundleClass()
public ResourceBundleDef getResourceBundleDef()
public oracle.jbo.server.AssociationEnd.LockLevel getLockLevelValue(java.lang.String s,
                                                                    boolean processDefault)
public java.lang.String getLockLevelStr(boolean nullForDefault)
public void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
loadXMLContents in class PersistableDefObjectpublic java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitiongetDefXMLElementTag in class PersistableDefObjectpublic void writeContents(DefWriter jos)
PersistentDefinitionwriteContents in interface PersistentDefinitionwriteContents in class PersistableDefObjectjos - the Output storage for persistencepublic void writeChildren(DefWriter jos)
PersistentDefinitionwriteChildren in interface PersistentDefinitionwriteChildren in class DefObjectjos - the Output storage for persistencepublic 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)
    {
        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 DiffMergeablediffContents in class PersistableDefObjectdocDef - 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 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 DiffMergeablediffChildren in class DefObjectdocDef - 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 DiffMergeableapplyDiffContents in class PersistableDefObjectdif - changes to be applied to 'this' defresolver - the diff resolver used in diff/merge operationpublic 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();
          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 DiffMergeableapplyDiffChildren in class DefObject