Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.util
Class GenericType

java.lang.Object
  extended by oracle.adfnmc.util.GenericType
Direct Known Subclasses:
JavaBeanObject, SoapGenericType

public class GenericType
extends java.lang.Object

GenericType provides a generic implementation for any "bean" like object. It is ideal for holding hierarchal data that is read in dynamically or described via metadata.


Field Summary
protected  Vector attribute
           
protected  Vector attributeInfo
           
protected  boolean complex
           
static int GENERIC_TYPE_DEBUG
           
protected  java.lang.String name
           
protected  java.lang.String namespace
           
protected  GenericType parent
           
 
Constructor Summary
GenericType()
          Default constructor
GenericType(java.lang.String namespace, java.lang.String name)
          Create a new generic type for the namespace/name type.
 
Method Summary
 void copy(GenericType gt, boolean shallow)
           
 void defineAttribute(GenericType value)
          Define the namespace/name attribute (of type klass) with a specified value.
 void defineAttribute(java.lang.String namespace, java.lang.String name, java.lang.Class klass)
          Define the given namespace/name attribute of type klass.
 void defineAttribute(java.lang.String namespace, java.lang.String name, java.lang.Class klass, java.lang.Object value)
          Define the namespace/name attribute (of type klass) with a specified value.
 java.lang.Object getAttribute(int i)
          return the i'th attribute NOTE: Order of defines does matter, this method will always return the i'th attribute that was defined.
 java.lang.Object getAttribute(java.lang.String name)
          return the attribute value for the given name attribute
 java.lang.Object getAttribute(java.lang.String name, int index)
          return the attribute value for the namespace/name attribute
 java.lang.Object getAttribute(java.lang.String namespace, java.lang.String name)
          return the attribute value for the namespace/name attribute
protected  List getAttributeCollection(java.lang.String name)
           
 int getAttributeCount()
           
 int getAttributeCount(java.lang.String name)
           
 int getAttributeCount(java.lang.String namespace, java.lang.String name)
           
 AttributeInfo getAttributeInfo(int i)
          return the attribute information for the i'th attribute
 AttributeInfo getAttributeInfo(java.lang.String name)
          return the attribute information for the name attribute
 AttributeInfo getAttributeInfo(java.lang.String name, int index)
          return the attribute information for the namespace/name attribute
 AttributeInfo getAttributeInfo(java.lang.String namespace, java.lang.String name)
          return the attribute information for the name attribute
protected  List getAttributeInfoCollection(java.lang.String name)
           
 java.lang.Class getAttributeType(java.lang.String name)
          return the attribute type for the name attribute
 java.lang.String getName()
           
 java.lang.String getNamespace()
           
 GenericType getParent()
           
 boolean isComplexType()
           
protected  void log(Level level, ResourceBundle bundle, java.lang.String key, java.lang.Object[] params)
           
protected  void log(Level level, java.lang.String msg)
           
 void setAttribute(int i, java.lang.Object value)
          Set the value of the given attribute NOTE: Order of defines does matter, so setting the i'th attribute will alway set the i'th attribute that was defined.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set the value of the given attribute
 void setAttribute(java.lang.String namespace, java.lang.String name, java.lang.Object value)
          Set the value of the given attribute
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GENERIC_TYPE_DEBUG

public static final int GENERIC_TYPE_DEBUG

complex

protected boolean complex

namespace

protected java.lang.String namespace

name

protected java.lang.String name

attribute

protected Vector attribute

attributeInfo

protected Vector attributeInfo

parent

protected GenericType parent
Constructor Detail

GenericType

public GenericType()
Default constructor


GenericType

public GenericType(java.lang.String namespace,
                   java.lang.String name)
Create a new generic type for the namespace/name type.

Parameters:
namespace -
name -
Method Detail

defineAttribute

public void defineAttribute(java.lang.String namespace,
                            java.lang.String name,
                            java.lang.Class klass)
Define the given namespace/name attribute of type klass. NOTE: Order of defines does matter.

Parameters:
namespace - attribute namespace
name - attribute name
klass - attribute type

defineAttribute

public void defineAttribute(java.lang.String namespace,
                            java.lang.String name,
                            java.lang.Class klass,
                            java.lang.Object value)
Define the namespace/name attribute (of type klass) with a specified value. NOTE: Order of defines does matter.

Parameters:
namespace - attribute namespace
name - attribute name
klass - attribute type
value - attribute value

defineAttribute

public void defineAttribute(GenericType value)
Define the namespace/name attribute (of type klass) with a specified value. NOTE: Order of defines does matter.

Parameters:
value - attribute value

getAttributeCount

public int getAttributeCount()
Returns:
the number of attributes defined for this generic type

getAttribute

public java.lang.Object getAttribute(int i)
return the i'th attribute NOTE: Order of defines does matter, this method will always return the i'th attribute that was defined.

Parameters:
i - the attribute index in question
Returns:
value of the attribute or null

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
return the attribute value for the given name attribute

Parameters:
name - of the attribute
Returns:
value of the attribute or null

getAttribute

public java.lang.Object getAttribute(java.lang.String namespace,
                                     java.lang.String name)
return the attribute value for the namespace/name attribute

Parameters:
namespace - of the attribute
name - of the attribute
Returns:
value of the attribute or null

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     int index)
return the attribute value for the namespace/name attribute

Parameters:
name - of the attribute
Returns:
value of the attribute or null

getAttributeCount

public int getAttributeCount(java.lang.String namespace,
                             java.lang.String name)

getAttributeCount

public int getAttributeCount(java.lang.String name)

getAttributeInfo

public AttributeInfo getAttributeInfo(java.lang.String name)
return the attribute information for the name attribute

Parameters:
name - of the attribute
Returns:
info of the attribute or null

getAttributeInfo

public AttributeInfo getAttributeInfo(java.lang.String namespace,
                                      java.lang.String name)
return the attribute information for the name attribute

Parameters:
namespace - of the attribute
name - of the attribute
Returns:
info of the attribute or null

getAttributeInfo

public AttributeInfo getAttributeInfo(int i)
return the attribute information for the i'th attribute

Parameters:
i - for the i'th attribute
Returns:
info of the attribute or null

getAttributeInfo

public AttributeInfo getAttributeInfo(java.lang.String name,
                                      int index)
return the attribute information for the namespace/name attribute

Parameters:
name - of the attribute
Returns:
info of the attribute or null

getAttributeType

public java.lang.Class getAttributeType(java.lang.String name)
return the attribute type for the name attribute

Parameters:
name - of the attribute
Returns:
type of the attribute or null

getNamespace

public java.lang.String getNamespace()

getName

public java.lang.String getName()

getParent

public GenericType getParent()

isComplexType

public boolean isComplexType()
Returns:
true if the attribute is a complex type

copy

public void copy(GenericType gt,
                 boolean shallow)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set the value of the given attribute

Parameters:
name - of the attribute
value - of the attribute

setAttribute

public void setAttribute(java.lang.String namespace,
                         java.lang.String name,
                         java.lang.Object value)
Set the value of the given attribute

Parameters:
namespace - of the attribute
name - of the attribute
value - of the attribute

setAttribute

public void setAttribute(int i,
                         java.lang.Object value)
Set the value of the given attribute NOTE: Order of defines does matter, so setting the i'th attribute will alway set the i'th attribute that was defined.

Parameters:
i - attribute index
value - of the attribute

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a human readable form of the object

getAttributeCollection

protected List getAttributeCollection(java.lang.String name)

getAttributeInfoCollection

protected List getAttributeInfoCollection(java.lang.String name)

log

protected void log(Level level,
                   java.lang.String msg)

log

protected void log(Level level,
                   ResourceBundle bundle,
                   java.lang.String key,
                   java.lang.Object[] params)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.