Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server
Class EntityAssociation

`java.lang.Object
oracle.jbo.common.NamedObjectImpl
oracle.jbo.mom.DefinitionObject
oracle.jbo.server.DefObject
oracle.jbo.server.AssociationDefBase
oracle.jbo.server.EntityAssociation`

All Implemented Interfaces:
  oracle.jbo.server.Association, VariableManagerOwner

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 `AssociationDefImpl`s 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 `AssociationDefImpl`s.

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 `AssociationDefImpl`s and determines whether they are source or destination attributes.

Since:
  JDevloper 3.0

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.AssociationDefBase
`mComponentClass`

Fields inherited from class oracle.jbo.mom.DefinitionObject
`mBaseDefObject, mExtendedDefObjects, mObjectResolved`

Fields inherited from class oracle.jbo.common.NamedObjectImpl
`mFullName, mObjName, mParent, mProperties`

Method Summary
`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().
`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.
`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.
`void` | `link(AssociationDefImpl srcAccr, AssociationDefImpl dstAccr)` Establishes a link between two Entity Objects.
`protected void` | `resolveReferences()`
`void` | `setBindVariables(AttributeDefImpl[] vars)` Sets the bind variables for one end of the association.
`void` | `setOtherBindVariables(AttributeDefImpl[] vars)` Sets the bind variables for the other end of the association.

Methods inherited from class oracle.jbo.server.AssociationDefBase
`ensureVariableManager, findEndAccessorByName, findEndByName, finishedLoading, getAccessors, getAttributeDefImpls, getAttributeDefImplsByEndName, getBaseDefObject, getClientProxyClassName, getComponentInterfaceName, getDefs, getDestinationEnd, getDestinationOwner, getEffectiveClientProxyClassName, getEffectiveComponentInterfaceName, getMessageBundleClass, getName, getOtherAttributeDefImpls, getPackageDef, getPackageName, getSourceEnd, getSourceOwner, getVariableManager, getVarMgrParents, hasVariables, loadProperties, loadVariables, setBaseDefObject, setClientProxyClassName, setComponentInterfaceName, setMessageBundleClass, setName, setParent`

Methods inherited from class oracle.jbo.mom.DefinitionObject
`addExtendedDefObject, getContainerDef, getContainerName, getExtendedDefObjects, hasExtendedDefObjects, isBaseDefFor, isDynamicDefinitionObject, isObjectResolved, setObjectResolved`

Methods inherited from class oracle.jbo.common.NamedObjectImpl
`getFullName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, refreshProperty, setFullName, setPropertiesMap, setProperty`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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.

Method Detail

### 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()`

### resolveReferences

    protected void resolveReferences()

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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