Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

oracle.jbo.server
Class EntityAssociation

java.lang.Object
  extended by oracle.jbo.common.NamedObjectImpl
      extended by oracle.jbo.mom.DefinitionObject
          extended by oracle.jbo.mom.PersistableDefObject
              extended by oracle.jbo.server.DefObject
                  extended by oracle.jbo.server.MetaObject
                      extended by oracle.jbo.server.AssociationDefBase
                          extended by oracle.jbo.server.EntityAssociation
All Implemented Interfaces:
ResourceBundleOwner, DefPersistable, PersistentDefinition, Association, VariableManagerOwner, VariableManagerOwnerBase

public class EntityAssociation
extends AssociationDefBase

Describes the relationship between two Entity Objects. An association selects attributes from source and destination Entity Objects. Typically, these attributes represent key fields in a database table, but an association can be defined using any Entity Object attributes. Although an association identifies a source and destination end, the association can be navigated in either direction. Associations have package scope.

The EntityAssociation class determines the content of the AssociationDefImpl attributes on the Entity definitions. The AssociationDefImpl attributes are the attributes at the source Entity and the destination Entity. There are two AssociationDefImpls for each EntityAssociation. For example, in the case of an association between Dept and Emp, Dept will have one AssociationDefImpl attribute for Emp; Emp will have one AssociationDefImpl attribute for Dept. The EntityAssociation links the two AssociationDefImpls.

An instance of the EntityAssociation class maps to the XML file for the association. At runtime, when the XML for the EntityAssociation is read, the framework creates the two AssociationDefImpls and determines whether they are source or destination attributes.

Since:
JDevloper 3.0

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.jbo.mom.PersistableDefObject
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType
 
Field Summary
protected  AttributeDefImpl[] mBindVars
          The list of AttributeDefImpls as bind variables on one end.
protected  AttributeDefImpl[] mOtherBindVars
          The list of bind variable AttributeDefImpls on one end.
 
Fields inherited from class oracle.jbo.server.MetaObject
mComponentClass
 
Fields inherited from class oracle.jbo.mom.DefinitionObject
DEF_MDS_CLIENT_KEY, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY, PROPERTY_EXPRMAP
 
Fields inherited from class oracle.jbo.common.NamedObjectImpl
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX, RESID_SUFFIX
 
Fields inherited from interface oracle.jbo.mom.xml.DefPersistable
XML_STATEMENT
 
Constructor Summary
EntityAssociation()
          Constructs an entity association.
EntityAssociation(int defScope, java.lang.String name)
           
EntityAssociation(java.lang.String name)
           
 
Method Summary
static EntityAssociation findDefObject(java.lang.String assocName)
           
static EntityAssociation findDefObjectNoSub(java.lang.String assocName)
           
static EntityAssociation findEntityAssociation(java.lang.String entityAssocName)
          Finds the named entity association from the statically maintained list of metaobjects.
 AssociationDefImpl getAccessorByEndName(java.lang.String endName)
          Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.findEndAccessorByName().
static java.lang.String[] getAllDefNames()
           
 AssociationEnd getAssociationEnd(java.lang.String endName)
          Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.findEndByName().
 AttributeDefImpl[] getBindVariables()
          Returns the bind variables for one end of the association.
 java.lang.Class getComponentClass()
          Returns the class name of this Entity association's reference.
 int getDefTypeId()
           
 java.lang.String getDefXMLElementTag()
           
 EntityDefImpl getEntityDef()
          Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.getSourceOwner() and down cast it to EntityDefImpl.
 AttributeDefImpl[] getOtherBindVariables()
          Returns the bind variables for the other end of the association.
 EntityDefImpl getOtherEntityDef()
          Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.getDestinationOwner() and down cast it to EntityDefImpl.
 boolean hasSQLDerivedAttrs()
           
 void link(AssociationDefImpl srcAccr, AssociationDefImpl dstAccr)
          Establishes a link between two Entity Objects.
 void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
           
protected  void resolveReferences()
           
 void setAssociationReverseClause(java.lang.String reverseAssocClause)
           
 void setBindVariables(AttributeDefImpl[] vars)
          Sets the bind variables for one end of the association.
protected  void setDefForComponent(ComponentObjectImpl comp)
          Set the Component def for Association
protected  void setObjectResolved(boolean objResolved)
           
 void setOtherBindVariables(AttributeDefImpl[] vars)
          Sets the bind variables for the other end of the association.
protected  void unsetDefForComponent(ComponentObjectImpl comp)
          Unset the Component def for Association
 
Methods inherited from class oracle.jbo.server.AssociationDefBase
findEndAccessorByName, findEndByName, getAccessors, getAssociationClause, getAttributeDefImpls, getAttributeDefImplsByEndName, getDefs, getDestinationEnd, getDestinationOwner, getOtherAttributeDefImpls, getReverseAssociationClause, getSourceEnd, getSourceOwner, resolveDefObject, setAssociationClause, setReverseAssociationClause, writeChildren, writeContents
 
Methods inherited from class oracle.jbo.server.MetaObject
deregisterSessionObject, getMessageBundleClass, getMsgBundleDef, getPackageDef, getPackageName, getPersDef, getPersDefNoUpdateCheck, getResourceBundleDef, getResourcePrefix, isDynamic, loadResourceBundle, registerDefObject, registerSessionDefObject, setMessageBundleClass, setResourceBundleDef
 
Methods inherited from class oracle.jbo.server.DefObject
ensureVariableManager, finishedLoading, getAllProperties, getBaseDefObject, getDefXMLNameSpace, getVariableManager, getVarMgrParents, hasVariables, loadProperties, loadVariables, resolvePropertyRaw, setBaseDefObject, setBaseDefObject, setName, setParent
 
Methods inherited from class oracle.jbo.mom.PersistableDefObject
addDefImport, addExtendedDefObject, allocatePropertyMap, checkEditable, close, createFromXML, findDefImport, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefWriter, getEditObject, getExtendedDefObjectsInternal, getFileName, getFullDirName, getFullFileName, getOrigObject, getPropertyMap, getSubstitutedNames, getSyncLock, getXMLElementTag, guaranteePath, hasExtendedDefObjects, isCustomizationEnabled, isCustomizationEnabled, isDirty, isEditable, isNew, isPersonalizationEnabled, isPersonalizationEnabled, loadDefImports, mergePropertyMap, objectRemoved, reapplyChanges, reapplyChangesToChildren, reapplyChangesToContents, registerClass, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, removeProperty, saveXMLContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setDirty, setEditable, setFullName, setNew, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, updateChildrenList, verifyVersion, writeObject, writeVersion, writeXMLContents
 
Methods inherited from class oracle.jbo.mom.DefinitionObject
addPropertySetName, enableUpdateCheck, getContainerDef, getContainerName, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, isBaseDefFor, isDynamicDefinitionObject, isObjectResolved, isSuppressUpdateCheck, loadCustomProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, setDefScope, setMdsKey, setMdsReference, setPropertySetName, suppressUpdateCheck
 
Methods inherited from class oracle.jbo.common.NamedObjectImpl
getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionsMap, getResourcesFromBundle, getStringFromMessageBundle, isPropertyExpression, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, setPropertiesMap, setPropertiesMap2, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.jbo.server.Association
getFullName, getName
 
Methods inherited from interface oracle.jbo.VariableManagerOwner
getName
 
Methods inherited from interface oracle.jbo.mom.xml.DefPersistable
getFullName
 

Field Detail

mBindVars

protected AttributeDefImpl[] mBindVars
The list of AttributeDefImpls as bind variables on one end. This field is unused. Will be removed eventually.


mOtherBindVars

protected AttributeDefImpl[] mOtherBindVars
The list of bind variable AttributeDefImpls on one end. This field is unused. Will be removed eventually.

Constructor Detail

EntityAssociation

public EntityAssociation()
Constructs an entity association.


EntityAssociation

public EntityAssociation(int defScope,
                         java.lang.String name)

EntityAssociation

public EntityAssociation(java.lang.String name)
Method Detail

getAllDefNames

public static java.lang.String[] getAllDefNames()

findDefObjectNoSub

public static EntityAssociation findDefObjectNoSub(java.lang.String assocName)

findDefObject

public static EntityAssociation findDefObject(java.lang.String assocName)

findEntityAssociation

public static EntityAssociation findEntityAssociation(java.lang.String entityAssocName)
Finds the named entity association from the statically maintained list of metaobjects.

Parameters:
entityAssocName - the fully qualified name of the entity association.
Returns:
an entity association.

getComponentClass

public java.lang.Class getComponentClass()
Returns the class name of this Entity association's reference.

Returns:
an EntityAssociationReference class name.

link

public void link(AssociationDefImpl srcAccr,
                 AssociationDefImpl dstAccr)
Establishes a link between two Entity Objects.

Parameters:
srcAccr - the source Entity Object's association accessor.
dstAccr - the destination Entity Object's association accessor.

setBindVariables

public void setBindVariables(AttributeDefImpl[] vars)
Sets the bind variables for one end of the association.

Parameters:
vars - an array of bind variables.
See Also:
setOtherBindVariables(oracle.jbo.server.AttributeDefImpl[])

getBindVariables

public AttributeDefImpl[] getBindVariables()
Returns the bind variables for one end of the association.

Returns:
an array of bind variables.
See Also:
getOtherBindVariables()

setOtherBindVariables

public void setOtherBindVariables(AttributeDefImpl[] vars)
Sets the bind variables for the other end of the association.

Parameters:
vars - an array of bind variables.
See Also:
setBindVariables(oracle.jbo.server.AttributeDefImpl[])

getOtherBindVariables

public AttributeDefImpl[] getOtherBindVariables()
Returns the bind variables for the other end of the association.

Returns:
an array of bind variables.
See Also:
getBindVariables()

setAssociationReverseClause

public void setAssociationReverseClause(java.lang.String reverseAssocClause)

loadXMLContents

public void loadXMLContents(DefElement xmlElement,
                            java.lang.String fullName)
Overrides:
loadXMLContents in class PersistableDefObject

getDefXMLElementTag

public java.lang.String getDefXMLElementTag()
Specified by:
getDefXMLElementTag in interface PersistentDefinition
Overrides:
getDefXMLElementTag in class PersistableDefObject

hasSQLDerivedAttrs

public boolean hasSQLDerivedAttrs()

setObjectResolved

protected void setObjectResolved(boolean objResolved)
Overrides:
setObjectResolved in class DefinitionObject

resolveReferences

protected void resolveReferences()
Specified by:
resolveReferences in class AssociationDefBase

getDefTypeId

public int getDefTypeId()
Specified by:
getDefTypeId in class DefObject

setDefForComponent

protected void setDefForComponent(ComponentObjectImpl comp)
Set the Component def for Association

Specified by:
setDefForComponent in class DefObject

unsetDefForComponent

protected void unsetDefForComponent(ComponentObjectImpl comp)
Unset the Component def for Association

Specified by:
unsetDefForComponent in class DefObject

getEntityDef

public EntityDefImpl getEntityDef()
Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.getSourceOwner() and down cast it to EntityDefImpl.

Gets the entity definition of the source end of the association.

Returns:
the source entity definition.

getOtherEntityDef

public EntityDefImpl getOtherEntityDef()
Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.getDestinationOwner() and down cast it to EntityDefImpl.

Gets the entity definition of the destination end of the association.

Returns:
the destination entity definition.

getAccessorByEndName

public AssociationDefImpl getAccessorByEndName(java.lang.String endName)
Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.findEndAccessorByName().

Finds the association accessor given the association end name.

Parameters:
endName - the name of one of the association end.
Returns:
the association accessor definition .

getAssociationEnd

public AssociationEnd getAssociationEnd(java.lang.String endName)
Deprecated. Deprecated since 5.0. Instead, use AssociationDefBase.findEndByName().

Finds the association end given the name.

Parameters:
endName - the name of one of the association end.
Returns:
the association end.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.1.0)

E17483-02

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