Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.data.bean
Class IntrospectionAdapter

java.lang.Object
  |
  +--oracle.cabo.ui.data.bean.IntrospectionAdapter
All Implemented Interfaces:
BeanDOAdapter, DataObject

public class IntrospectionAdapter
extends java.lang.Object
implements BeanDOAdapter

The IntrospectionAdapter class can adapt a JavaBean-style class into a DataObject. It also supports some features that JavaBeans does not:

  1. Public fields (that is - instance variables) are supported
  2. Package-private classes are supported - but only if its properties can be retrieved after first casting to a public superclass or public interface. So, for instance, if getFoo() is first defined in a package-private class, the "foo" property won't be accessible. But if it's defined in a public interface that is implemented by that package-private class, then it will be accessible.

IntrospectionAdapter will automatically cache the results of introspection per-class, so it's fairly efficient. Developers may wish to create a more performant adapter class for beans that are performance-critical; see the BuildBeanDOAdapter tool.

See Also:
BeanAdapterUtils, BuildBeanDOAdapter

Method Summary
static BeanDOAdapter getAdapter(java.lang.Object instance)
          Creates an adapter around an object instance.
 java.lang.Object selectValue(RenderingContext context, java.lang.Object select)
          Given a select string, returns the value matching that selection.
 void setInstance(java.lang.Object instance)
          Attaches an instance of the bean class to the adapter.
 void updateValue(RenderingContext context, java.lang.Object select, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAdapter

public static BeanDOAdapter getAdapter(java.lang.Object instance)
Creates an adapter around an object instance.

setInstance

public void setInstance(java.lang.Object instance)
Attaches an instance of the bean class to the adapter.
Specified by:
setInstance in interface BeanDOAdapter

selectValue

public java.lang.Object selectValue(RenderingContext context,
                                    java.lang.Object select)
Description copied from interface: DataObject
Given a select string, returns the value matching that selection. It is legal to return null if the select key doesn't match anything.

Specified by:
selectValue in interface DataObject
Following copied from interface: oracle.cabo.ui.data.DataObject
Parameters:
context - the current rendering context
select - a select criterion, syntax as defined by the data object

updateValue

public void updateValue(RenderingContext context,
                        java.lang.Object select,
                        java.lang.Object value)

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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