Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.data.provider
Class DefaultingDataProvider

java.lang.Object
  |
  +--oracle.cabo.ui.data.provider.DefaultingDataProvider
All Implemented Interfaces:
DataProvider

public class DefaultingDataProvider
extends java.lang.Object
implements DataProvider

DataProvider that joins two other data providers, using the second only if the first cannot provide a DataObject.


Constructor Summary
DefaultingDataProvider(DataProvider first, DataProvider second)
          Creates a DefaultingDataProvider.
 
Method Summary
 void cleanup(RenderingContext context)
          RenderingContext implementations must call cleanup() once after the last callto getDataObject().
 DataObject getDataObject(RenderingContext cntxt, java.lang.String namespace, java.lang.String name)
          Returns the data object if the namespace and name are an exact match.
 void init(RenderingContext context)
          RenderingContext implementations must call init() once before calling getDataObject().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultingDataProvider

public DefaultingDataProvider(DataProvider first,
                              DataProvider second)
Creates a DefaultingDataProvider.
Parameters:
first - the primary data provider
second - the secondary data provider, used only if calls to the first fail
Method Detail

getDataObject

public DataObject getDataObject(RenderingContext cntxt,
                                java.lang.String namespace,
                                java.lang.String name)
Returns the data object if the namespace and name are an exact match.
Specified by:
getDataObject in interface DataProvider
Following copied from interface: oracle.cabo.ui.data.DataProvider
Parameters:
context - the current rendering context
namespace - the namespace of the requested DataObject
name - the name of the requested DataObject
Returns:
the DataObject for the specified namespace and name, or null if no such dataObject exists.

init

public void init(RenderingContext context)
RenderingContext implementations must call init() once before calling getDataObject(). In general, they should try to call it as early as possible.
Specified by:
init in interface DataProvider

cleanup

public void cleanup(RenderingContext context)
RenderingContext implementations must call cleanup() once after the last callto getDataObject().
Specified by:
cleanup in interface DataProvider

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.