Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.6.0)

E10653-07

oracle.adf.model.adapter.bean
Class BeanAbstractDefinition

java.lang.Object
  extended by oracle.adf.model.adapter.AbstractDefinition
      extended by oracle.adf.model.adapter.bean.BeanAbstractDefinition
All Implemented Interfaces:
DataControlDefinition, Definition, NamedDefinition
Direct Known Subclasses:
BeanAnnotationAbstractDefinition, TopLinkDefinition

public abstract class BeanAbstractDefinition
extends AbstractDefinition

This abstract implementation of AbstractDefinition provides structure definition and associated meta data creation behavior via the DataControlStructure framework. There are three cases when an AbstractDefinition will be created in ADF: 1) Runtime: The AbstractDefinition will be created via a zero arg constructor and will be provided the data control name, meta data, and parameters. It is then expected to know how to create the rt data control. 2) Designtime via the AbstractAdapter: In this case, the AbstractDefinition is created with a non zero arg contructor. It is expected to provide the StructureDefinition, dc name, and meta data. 3) Designtime via the Adapter framework: The AbstractDefinition is created via a zero arg constructor. It is expected to provide the StructureDefinition. The meta data and and dc name are provided by the Adapter framework. This class provides facilities for handling these cases in a uniform fashion without introducing direct designtime dependencies in the concrete AbstractDefinition implementation. Case 1: Follow the AbstractAdapter pattern for handling meta data loading and data control creation. Case 2: In the BeanAbstractAdapter implementation return the concrete implementation of this class in the getDefinition(DataControlStructure) method initialized with the DataControlStructure constructor. Case 3: The abstract implementation will load the required DataControlStructure when needed from the DataControlStructureProvider registered with the DCStructureProviderFactory for the definition type. Implementors of this class must indicate the provider type via the getProviderType() method.

Since:
11.1.1.0
See Also:
AbstractDefinition, DataControlStructure, oracle.adfinternal.model.adapter.generic.DataControlStructureProvider, oracle.adfinternal.model.adapter.bean.BeanAbstractAdapter

Field Summary
static java.lang.String DATA_CONTROL_HANDLER
          DataControl Handler - 11.1.2
protected  Node metaData
           
protected  java.util.Map parameters
           
 
Fields inherited from class oracle.adf.model.adapter.AbstractDefinition
CACHE_TO_CLASSPATH, CACHE_TO_SOURCEPATH, DONT_CACHE, mFullName
 
Fields inherited from interface oracle.binding.meta.Definition
TYPE_ACCESSOR, TYPE_ATTRIBUTE, TYPE_CRITERIA, TYPE_CRITERIA_ITEM, TYPE_CRITERIA_OPERATOR, TYPE_CRITERIA_ROW, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_NAMED, TYPE_OPERATION, TYPE_OPERATIONRETURN, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE
 
Constructor Summary
BeanAbstractDefinition()
          Called by the framework.
BeanAbstractDefinition(DataControlStructure dcStructure)
          Called by the BeanAbstractAdapter to create an initialized AbstractDefinition.
 
Method Summary
protected  java.lang.String getDCName()
          Returns the name of the data control.
 Node getMetadata()
          Returns the element that defines the metadata for the data control.
protected abstract  java.lang.String getProviderType()
          Indicates the type of DataControlStructureProvider to use during initialization.
protected  Node getRuntimeMetaData()
          Accessor that returns the DC meta data passed in by the loadFromMetadata() method.
protected  java.util.Map getRuntimeParameters()
          Accessor that returns the DC parameters passed in by the loadFromMetadata() method.
 StructureDefinition getStructure()
          Gets the structure definition of the output data.
protected  void initDefinition()
          Implementor to provide the definition
 boolean isStructureDirty(boolean refresh)
          Indicates to the Adapter framework to always recreate the DC on refresh.
 void loadFromMetadata(Node metaData, java.util.Map parameters)
          Loads the definition from a metadata Node.
 boolean usePersistedStructure()
          Indicates whether the definition delegates to the framework the task of deserializing its StructureDefinition (for example, from bean .xml files on disk).
 
Methods inherited from class oracle.adf.model.adapter.AbstractDefinition
assignDefaultPackage, createDataControl, createDuplicateDetailIterator, getAdapterContext, getAdapterType, getCachingMode, getConfigurationFullName, getDefClassName, getDefinitionParent, getDefinitionType, getFactoryClassName, getFullName, getName, getParameters, getProperties, getProperty, isSupported, setAdapterContext, setCachingMode, setCompileProjectOnCreate, setConfigurationFullName, setFullName, setName, setProperty, shouldCompileProjectOnCreate, shouldStoreStructureDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_CONTROL_HANDLER

public static final java.lang.String DATA_CONTROL_HANDLER
DataControl Handler - 11.1.2

See Also:
Constant Field Values

metaData

protected Node metaData

parameters

protected java.util.Map parameters
Constructor Detail

BeanAbstractDefinition

public BeanAbstractDefinition()
Called by the framework.


BeanAbstractDefinition

public BeanAbstractDefinition(DataControlStructure dcStructure)
Called by the BeanAbstractAdapter to create an initialized AbstractDefinition.

Method Detail

getRuntimeParameters

protected java.util.Map getRuntimeParameters()
Accessor that returns the DC parameters passed in by the loadFromMetadata() method.


getRuntimeMetaData

protected Node getRuntimeMetaData()
Accessor that returns the DC meta data passed in by the loadFromMetadata() method.


getProviderType

protected abstract java.lang.String getProviderType()
Indicates the type of DataControlStructureProvider to use during initialization.


getDCName

protected final java.lang.String getDCName()
Description copied from class: AbstractDefinition
Returns the name of the data control.

Specified by:
getDCName in class AbstractDefinition

getStructure

public final StructureDefinition getStructure()
Description copied from class: AbstractDefinition
Gets the structure definition of the output data.

Specified by:
getStructure in interface DataControlDefinition
Specified by:
getStructure in class AbstractDefinition
Returns:
Definition of the output data structure.

getMetadata

public final Node getMetadata()
Description copied from class: AbstractDefinition
Returns the element that defines the metadata for the data control.

Specified by:
getMetadata in class AbstractDefinition
Returns:
a Node that defines the metadata for this instance. This metadata will be used at the runtime to fetch data from the data source.

loadFromMetadata

public final void loadFromMetadata(Node metaData,
                                   java.util.Map parameters)
Description copied from class: AbstractDefinition
Loads the definition from a metadata Node.

Specified by:
loadFromMetadata in class AbstractDefinition
Parameters:
metaData - the metadata node. It can be null if no metadata is defined.
parameters - context parameters.

initDefinition

protected void initDefinition()
Implementor to provide the definition


usePersistedStructure

public boolean usePersistedStructure()
Indicates whether the definition delegates to the framework the task of deserializing its StructureDefinition (for example, from bean .xml files on disk). Overrides base method on AbstractDefinition.

Overrides:
usePersistedStructure in class AbstractDefinition
Returns:
by default true.

isStructureDirty

public boolean isStructureDirty(boolean refresh)
Indicates to the Adapter framework to always recreate the DC on refresh.

Overrides:
isStructureDirty in class AbstractDefinition
Parameters:
refresh - flag to indicate if the refresh is requested for the structure.
Returns:
true if the implementation decides that the structure of the data should be generated. The default implementation always returns false.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.6.0)

E10653-07

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