Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.model.adapter.dataformat
Class AccessorDef

`java.lang.Object
oracle.binding.metaimpl.BaseValueObjectDefinition
oracle.binding.metaimpl.BaseAttributeDefinition
oracle.adf.model.adapter.dataformat.AttributeDef
oracle.adf.model.adapter.dataformat.AccessorDef`

All Implemented Interfaces:
  AccessorDefinition, AttributeDefinition, Definition, NamedDefinition, VariableDefinition

public class AccessorDef
extends AttributeDef
implements AccessorDefinition

Defines an accessor.

Since:
  10.1.3
Version:
  1.0

Field Summary

Fields inherited from class oracle.adf.model.adapter.dataformat.AttributeDef
`LEAFELEMENT_HINT, LEAFELEMENT_NO_ATTRIBUTE, LEAFELEMENT_WITH_ATTRIBUTE`

Fields inherited from interface oracle.binding.meta.Definition
`TYPE_ACCESSOR, TYPE_ATTRIBUTE, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_METHODRETURN, TYPE_NAMED, TYPE_OPERATION, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE`

Constructor Summary
`AccessorDef(java.lang.String id, StructureDefinition parent, boolean isCollection)` Creates a new accessor definition as a complex type.
`AccessorDef(java.lang.String id, StructureDefinition parent, java.lang.String type)` Creates a new accessor definition as a java type collection.
`AccessorDef(java.lang.String id, StructureDefinition parent, java.lang.String type, java.lang.String elementType)` Creates a new accessor definition as a collection of a scalar type.
`AccessorDef(java.lang.String id, StructureDefinition parent, StructureDefinition struct, boolean isCollection)` Creates a new accessor definition as a complex type.
`AccessorDef(java.lang.String id, StructureDefinition parent, StructureDefinition struct, boolean isCollection, boolean isScalarCollection)` Creates a new accessor definition as a complex type.

Method Summary
`AccessorDef` | `clone(StructureDef parentStruct, java.lang.String id)` Clones the accessor with a new id and a new parent.
`StructureDefinition` | `getCollectionStructure()` Retrieves the metadata of the collection itself.
`int` | `getDefinitionType()` Retrieves the type of this definition.
`java.lang.String` | `getFullName()` Returns the bind path for this accessor.
`NamedDefinition` | `getParentAccessor()` Retrieves the AccessorDefinition of the parent accessor.
`StructureDefinition` | `getStructure()` Retrieves the metadata of the elements that the accessor collection contains.
`boolean` | `isCollection()` Since an accessor can return a structured object (or a collection).
`boolean` | `isScalarCollection()` Returns true if the accessor returns a collection of scalars.
`void` | `setCollectionStructure(StructureDefinition def)` Set the structure definition for the collection if the return is a collection.
`void` | `setParentAccessor(AccessorDefinition parentAccessor)`
`void` | `setParentAccessor(MethodReturnDefinition parentAccessor)`
`void` | `setStructure(StructureDefinition struct)`

Methods inherited from class oracle.adf.model.adapter.dataformat.AttributeDef
`addProperties, addProperty, getBindPath, getName, getProperties, getProperty, setBindPath, setName`

Methods inherited from class oracle.binding.metaimpl.BaseAttributeDefinition
`getSourceTypeString, isKey, isReadOnly, setReadOnly, setSourceTypeString`

Methods inherited from class oracle.binding.metaimpl.BaseValueObjectDefinition
`getDataControlDefinition, getDefinitionParent, getJavaTypeString`

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

Methods inherited from interface oracle.binding.meta.AttributeDefinition
`getSourceTypeString, isKey, isReadOnly`

Methods inherited from interface oracle.binding.meta.VariableDefinition
`getDataControlDefinition, getJavaTypeString`

Methods inherited from interface oracle.binding.meta.NamedDefinition
`getDefinitionParent, getName, getProperties, getProperty`

Constructor Detail

### AccessorDef

    public AccessorDef(java.lang.String id,
                       StructureDefinition parent,
                       java.lang.String type)

  Creates a new accessor definition as a java type collection.
Parameters:
  `id` - unique id for the definition.
  `parent` - parent structure definition that this accessor is a part of.
  `type` - the data type defined as a java type available for the system.

### AccessorDef

    public AccessorDef(java.lang.String id,
                       StructureDefinition parent,
                       java.lang.String type,
                       java.lang.String elementType)

  Creates a new accessor definition as a collection of a scalar type.
Parameters:
  `id` - unique id for the definition
  `parent` - parent structure definition that this accessor is a part of.
  `type` - the data type defined as a java type available for the system.
  `elementType` - the java type of each element in the collection.

### AccessorDef

    public AccessorDef(java.lang.String id,
                       StructureDefinition parent,
                       StructureDefinition struct,
                       boolean isCollection)

  Creates a new accessor definition as a complex type.

  Accessors can be used to define the complex structure for which a java type may not be defined. For accessors that are collection of scalar types, use the constructor with the additional isScalarCollection parameter.

Parameters:
  `id` - unique id for the definition.
  `parent` - parent structure definition that this accessor is a part of.
  `struct` - the complex structer that describes this accessor.
  `isCollection` - indicates if the accessor is a collection.

### AccessorDef

    public AccessorDef(java.lang.String id,
                       StructureDefinition parent,
                       StructureDefinition struct,
                       boolean isCollection,
                       boolean isScalarCollection)

  Creates a new accessor definition as a complex type.

  Accessors can be used to define the complex structure for which a java type may not be defined.

Parameters:
  `id` - unique id for the definition.
  `parent` - parent structure definition that this accessor is a part of.
  `struct` - the complex structer that describes this accessor.
  `isCollection` - indicates if the accessor is a collection.
  `isScalarCollection` - indicates if the accessor is a collection of scalars.

### AccessorDef

    public AccessorDef(java.lang.String id,
                       StructureDefinition parent,
                       boolean isCollection)

  Creates a new accessor definition as a complex type.

  Accessors can be used to define the complex structure for which a java type may not be defined.

Parameters:
  `id` - unique id for the definition.
  `parent` - parent structure definition that this accessor is a part of.
  `isCollection` - indicates if the accessor is a collection.

Method Detail

### getFullName

    public java.lang.String getFullName()

  Returns the bind path for this accessor. Runtime fetches data depending on the bind path defined.
  Specified by:
    `getFullName` in interface `NamedDefinition`
  Overrides:
    `getFullName` in class `AttributeDef`
  Returns:
    a dot (.) separated `String` value. If the bind path is set, it returns <bind_path>.<this_name>. Otherwise it returns <parent_path>.<this_name>.

### isCollection

    public boolean isCollection()

  Description copied from interface: `AccessorDefinition`
  Since an accessor can return a structured object (or a collection). This function should return true when the accessor represents a collection.
  Specified by:
    `isCollection` in interface `AccessorDefinition`
  Returns:
    true if the accessor is a collection, false if it is a simple object such as a String or an int.

### isScalarCollection

    public boolean isScalarCollection()

  Description copied from interface: `AccessorDefinition`
  Returns true if the accessor returns a collection of scalars. Scalars are simple types that are not structured and are not collections.
  Specified by:
    `isScalarCollection` in interface `AccessorDefinition`
  Returns:
    true if the accessor is a collection of scalars, false otherwise.

### getStructure

    public StructureDefinition getStructure()

  Description copied from interface: `AccessorDefinition`
  Retrieves the metadata of the elements that the accessor collection contains.
  Specified by:
    `getStructure` in interface `AccessorDefinition`
  Returns:
    The metadata describing the structure of the elements in the accessor collection.

### getCollectionStructure

    public StructureDefinition getCollectionStructure()

  Description copied from interface: `AccessorDefinition`
  Retrieves the metadata of the collection itself. It is possible that the collection itself has operations defined, such as if the collection is a class that implements a java.util.Collection interface and contains methods for searching through its elements. Please note that this is different from the getStructure API, which returns the metadata of the collection elements.
  Specified by:
    `getCollectionStructure` in interface `AccessorDefinition`
  Returns:
    The metadata describing the structure of the collection, or null if there is none available for the collection.

### getParentAccessor

    public NamedDefinition getParentAccessor()

  Description copied from interface: `AccessorDefinition`
  Retrieves the AccessorDefinition of the parent accessor. A parent accessor is the accessor from which this accessor is obtained from. For example, we have a Dept structure, which contains an accessor called emps that returns a collection of Employee. Each Employee structure in turn contains an accessor called address that returns a structured type Address. The parent accessor of address would be the accessor emps in the Dept structure.
  Specified by:
    `getParentAccessor` in interface `AccessorDefinition`
  Returns:
    The definition of the parent accessor.

### getDefinitionType

    public int getDefinitionType()

  Description copied from interface: `Definition`
  Retrieves the type of this definition. It can be one of the TYPE_* constants defined in this class. This is useful to find out the actual type of the Definition without doing an instanceof operations.
  Specified by:
    `getDefinitionType` in interface `Definition`
  Overrides:
    `getDefinitionType` in class `AttributeDef`

### setCollectionStructure

    public void setCollectionStructure(StructureDefinition def)

  Set the structure definition for the collection if the return is a collection. Collection structures usually contain methods applicable for the collection.

### setStructure

    public void setStructure(StructureDefinition struct)

### setParentAccessor

    public void setParentAccessor(AccessorDefinition parentAccessor)

### setParentAccessor

    public void setParentAccessor(MethodReturnDefinition parentAccessor)

### clone

    public AccessorDef clone(StructureDef parentStruct,
                             java.lang.String id)

  Clones the accessor with a new id and a new parent.
  Parameters:
    `parentStruct` - the parent structure definition of the cloned accessor.
    `id` - id of the new accessor.
  Returns:
    a cloned `AccessorDef` value.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION 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.