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

E10653-05

oracle.adfinternal.model.adapter.bean
Class BeanDCUtils

java.lang.Object
  extended by oracle.adfinternal.model.adapter.bean.BeanDCUtils

public class BeanDCUtils
extends java.lang.Object

Since:
11.1.2

Field Summary
static java.lang.String READ_ONLY_COLLECTION
           
static java.lang.String READ_ONLY_SINGLE_VALUE
           
static java.lang.String UPDATEABLE_COLLECTION
           
static java.lang.String UPDATEABLE_SINGLE_VALUE
           
 
Constructor Summary
BeanDCUtils()
           
 
Method Summary
static void addTransactionalOperations(StructureDef operationsDef)
          Adds default ADF Transactional operations to data control's StructureDefinition.
static boolean areEqual(java.lang.Object obj1, java.lang.Object obj2)
           
static boolean areEquivalentCollections(java.util.Collection coll1, java.util.Collection coll2)
           
static boolean areEquivalentParameters(java.util.Collection<java.util.List<java.lang.String>> params1, java.util.Collection<java.util.List<java.lang.String>> params2)
           
static StructureDef buildReadOnlyCollectionOperations()
           
static StructureDef buildSingleValueReadOnlyOperations()
           
static StructureDef buildSingleValueUpdateableOperations()
           
static StructureDef buildUpdateableCollectionOperations()
           
static java.lang.String capitalize(java.lang.String propertyName)
          Capitalize the first character of the given string.
static BeanMethodInfo findMethod(java.lang.Class clz, java.lang.String methodName, java.util.List params)
           
static java.lang.String getClassFromPrimitive(java.lang.String type)
          Get the name of the Class associated with a given primitive type name.
static java.util.List<BeanMethodInfo> getConstructorMethods(java.lang.Class clz, int modifier)
           
static java.lang.String getGenericCollectionType(java.lang.String type)
           
static java.util.List<BeanMethodInfo> getMethods(java.lang.Class clz, int modifier)
           
static java.lang.String getPackage(java.lang.String qualifiedClassName)
          Extracts the package name from a qualified name.
static java.lang.String getPrimitiveFromClass(java.lang.String type)
          Get the name of the primitive associated with a given Class name.
static java.lang.String getQualifiedTypeName(java.lang.reflect.Type type)
           
static java.lang.String getReturnType(java.lang.reflect.Method m)
           
static java.lang.String getShortName(java.lang.String qualifiedClassName)
          Extracts a class name from a qualified name.
static java.lang.String getType(java.lang.String type)
           
static boolean isArray(java.lang.String type)
           
static boolean isCollection(java.lang.String type)
           
static boolean isComplex(java.lang.String type)
           
static java.lang.String makeReaderName(java.lang.String propertyName)
          Generate the name of a JavaBeans compliant read accessor given a property name.
static java.lang.String makeReaderName(java.lang.String propertyName, java.lang.String type)
          Generate the name of a JavaBeans compliant read accessor given a property name.
static java.lang.String makeWriterName(java.lang.String propertyName)
          Generate the name of a JavaBeans compliant write accessor given a property name.
static boolean shouldHaveMetaData(java.lang.String sType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_ONLY_COLLECTION

public static final java.lang.String READ_ONLY_COLLECTION
See Also:
Constant Field Values

UPDATEABLE_COLLECTION

public static final java.lang.String UPDATEABLE_COLLECTION
See Also:
Constant Field Values

UPDATEABLE_SINGLE_VALUE

public static final java.lang.String UPDATEABLE_SINGLE_VALUE
See Also:
Constant Field Values

READ_ONLY_SINGLE_VALUE

public static final java.lang.String READ_ONLY_SINGLE_VALUE
See Also:
Constant Field Values
Constructor Detail

BeanDCUtils

public BeanDCUtils()
Method Detail

getShortName

public static java.lang.String getShortName(java.lang.String qualifiedClassName)
Extracts a class name from a qualified name.

Parameters:
qualifiedClassName - a Java name; a sequence of identifiers with interspersed '.' tokens.
Returns:
the identifier that follows the last '.' token, or all of qualifiedClassName if it contains no '.' tokens.

getPackage

public static final java.lang.String getPackage(java.lang.String qualifiedClassName)
Extracts the package name from a qualified name.

Parameters:
qualifiedClassName - a Java name; a sequence of identifiers with interspersed '.' tokens.
Returns:
the portion of qualifiedClassName that precedes the last '.' token, or the empty string if qualifiedClassName contains no '.' tokens.

isComplex

public static boolean isComplex(java.lang.String type)

isCollection

public static boolean isCollection(java.lang.String type)

isArray

public static boolean isArray(java.lang.String type)

areEqual

public static boolean areEqual(java.lang.Object obj1,
                               java.lang.Object obj2)

areEquivalentCollections

public static boolean areEquivalentCollections(java.util.Collection coll1,
                                               java.util.Collection coll2)

areEquivalentParameters

public static boolean areEquivalentParameters(java.util.Collection<java.util.List<java.lang.String>> params1,
                                              java.util.Collection<java.util.List<java.lang.String>> params2)
Parameters:
params1 - Collection of List, where each List is a param type/name pair
params2 - Collection of List, where each List is a param type/name pair
Returns:
true if both Collections are null/empty, or if the type components of each Collection's List are equivalent

getType

public static java.lang.String getType(java.lang.String type)
Returns:
the type part of this type

getReturnType

public static java.lang.String getReturnType(java.lang.reflect.Method m)
Returns:
a fully qualifed type part of this method

getQualifiedTypeName

public static java.lang.String getQualifiedTypeName(java.lang.reflect.Type type)
Returns:
a fully qualified type name

getGenericCollectionType

public static java.lang.String getGenericCollectionType(java.lang.String type)
Returns:
the element type of a JDK 1.5 generic collection type, or null if it is not a generic collection type.

getPrimitiveFromClass

public static java.lang.String getPrimitiveFromClass(java.lang.String type)
Get the name of the primitive associated with a given Class name.

Parameters:
type - The Class name of a primitive Class.
Returns:
The name of the primitive for which the Class is a wrapper else null.

getClassFromPrimitive

public static java.lang.String getClassFromPrimitive(java.lang.String type)
Get the name of the Class associated with a given primitive type name.

Parameters:
type - The primitive type name.
Returns:
The name of the Class which is a wrapper for the primitive, else null.

capitalize

public static java.lang.String capitalize(java.lang.String propertyName)
Capitalize the first character of the given string.

Parameters:
propertyName - The string to capitalize.
Returns:
The specified string with its first character capitalized.

makeReaderName

public static java.lang.String makeReaderName(java.lang.String propertyName,
                                              java.lang.String type)
Generate the name of a JavaBeans compliant read accessor given a property name. Will be either get(PropertyName) or is(PropertyName) dependant on the property type.

Parameters:
propertyName - Name of the property to which the reader applies.
type - Class name of the property type.
Returns:
The name of a JavaBeans compliant read accessor.

makeReaderName

public static java.lang.String makeReaderName(java.lang.String propertyName)
Generate the name of a JavaBeans compliant read accessor given a property name. Will be of the form get(PropertyName).

Parameters:
propertyName - Name of the property to which the reader applies.
Returns:
The name of a JavaBeans compliant read accessor.

makeWriterName

public static java.lang.String makeWriterName(java.lang.String propertyName)
Generate the name of a JavaBeans compliant write accessor given a property name. Will be of the form set(PropertyName).

Parameters:
propertyName - Name of the property to which the writer applies.
Returns:
The name of a JavaBeans compliant write accessor.

shouldHaveMetaData

public static boolean shouldHaveMetaData(java.lang.String sType)
Parameters:
sType -
Returns:
true if object is complex type

getMethods

public static java.util.List<BeanMethodInfo> getMethods(java.lang.Class clz,
                                                        int modifier)
Parameters:
clz -
modifier -
Returns:
list of bean methods

getConstructorMethods

public static java.util.List<BeanMethodInfo> getConstructorMethods(java.lang.Class clz,
                                                                   int modifier)
Parameters:
clz -
modifier -
Returns:
list of constructor operations

findMethod

public static BeanMethodInfo findMethod(java.lang.Class clz,
                                        java.lang.String methodName,
                                        java.util.List params)
Parameters:
clz -
methodName -
params -
Returns:
not null if method exist

addTransactionalOperations

public static void addTransactionalOperations(StructureDef operationsDef)
Adds default ADF Transactional operations to data control's StructureDefinition.


buildSingleValueUpdateableOperations

public static StructureDef buildSingleValueUpdateableOperations()
Returns:
the structure for update single value

buildSingleValueReadOnlyOperations

public static StructureDef buildSingleValueReadOnlyOperations()
Returns:
the structure for read only single value

buildUpdateableCollectionOperations

public static StructureDef buildUpdateableCollectionOperations()
Returns:
the structure for updatable collection

buildReadOnlyCollectionOperations

public static StructureDef buildReadOnlyCollectionOperations()
Returns:
the structure for read only collection

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

E10653-05

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