|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adfinternal.model.adapter.bean.BeanDCUtils
public class BeanDCUtils
Field Summary | |
---|---|
static java.lang.String |
MAIN_S
|
static java.lang.String |
PARAMETERIZED_COLLECTION
|
static java.lang.String |
PARAMETERIZED_SINGLE_VALUE
|
static java.lang.String |
READ_ONLY_COLLECTION
|
static java.lang.String |
READ_ONLY_SINGLE_VALUE
|
static java.lang.String |
SCALAR_COLLECTION
|
static java.lang.String |
UPDATEABLE_COLLECTION
|
static java.lang.String |
UPDATEABLE_SINGLE_VALUE
|
static java.lang.String |
VOID_S
|
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 o1,
java.lang.Object o2)
This is a utility method that compares two objects when one or both of the objects might be null The result of
this method is determined as follows:
If o1 and o2 are the same object
according to the == operator, return
true . |
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 |
buildParameterizedCollectionOperations()
|
static StructureDef |
buildReadOnlyCollectionOperations()
|
static StructureDef |
buildScalarCollectionOperations()
|
static StructureDef |
buildSingleValueParamaterizedOperations()
|
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.lang.Class... parameterTypes)
|
static BeanMethodInfo |
findMethod(java.lang.Class clz,
java.lang.String methodName,
java.util.List<java.lang.String> params)
|
static java.lang.Boolean |
getBooleanProperty(NamedDefinition def,
java.lang.String propertyName,
java.lang.Boolean defaultValue)
|
static java.lang.Class |
getClass(java.lang.String className)
|
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.util.List<java.lang.Class> |
getNestedClasses(java.lang.Class clz)
|
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 |
getStringProperty(NamedDefinition def,
java.lang.String propertyName,
java.lang.String defaultValue)
|
static java.lang.String |
getType(java.lang.String type)
|
static boolean |
hasLength(java.lang.CharSequence cs)
Returns true if the specified String is not
null and has a length greater than zero. |
static boolean |
hasLength(java.lang.String s)
|
static java.lang.Object |
invokeMethod(java.lang.Object instance,
java.lang.String methodName,
java.lang.Class[] paramTypes,
java.lang.Object[] params)
Invoke method by name, parameters, values |
static boolean |
isArray(java.lang.String type)
|
static boolean |
isBooleanType(java.lang.String name,
java.lang.String type)
|
static boolean |
isCollection(java.lang.String type)
|
static boolean |
isComplex(java.lang.String type)
|
static boolean |
isInstanceOf(java.lang.Class derivedClass,
java.lang.Class parentClass)
Determine if the incoming derivedClass has the parentName as its name, or has a super or interface class with parentName as its name. |
static boolean |
isInterface(java.lang.Class clz,
java.lang.String iface)
Is class implements interface |
static boolean |
isPrimitiveType(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 |
---|
public static final java.lang.String READ_ONLY_COLLECTION
public static final java.lang.String UPDATEABLE_COLLECTION
public static final java.lang.String SCALAR_COLLECTION
public static final java.lang.String PARAMETERIZED_COLLECTION
public static final java.lang.String UPDATEABLE_SINGLE_VALUE
public static final java.lang.String READ_ONLY_SINGLE_VALUE
public static final java.lang.String PARAMETERIZED_SINGLE_VALUE
public static final java.lang.String MAIN_S
public static final java.lang.String VOID_S
Constructor Detail |
---|
public BeanDCUtils()
Method Detail |
---|
public static java.lang.String getShortName(java.lang.String qualifiedClassName)
qualifiedClassName
- a Java name; a sequence of identifiers with interspersed '.' tokens.
qualifiedClassName
if it contains no '.' tokens.public static final java.lang.String getPackage(java.lang.String qualifiedClassName)
qualifiedClassName
- a Java name; a sequence of identifiers with interspersed '.' tokens.
qualifiedClassName
that precedes the last '.' token,
or the empty string if qualifiedClassName
contains no '.' tokens.public static boolean isComplex(java.lang.String type)
public static boolean isCollection(java.lang.String type)
public static boolean isArray(java.lang.String type)
public static boolean isBooleanType(java.lang.String name, java.lang.String type)
public static boolean areEquivalentCollections(java.util.Collection coll1, java.util.Collection coll2)
public static boolean areEquivalentParameters(java.util.Collection<java.util.List<java.lang.String>> params1, java.util.Collection<java.util.List<java.lang.String>> params2)
params1
- Collection of List, where each List is a param type/name
pairparams2
- Collection of List, where each List is a param type/name
pair
public static java.lang.String getType(java.lang.String type)
public static java.lang.String getReturnType(java.lang.reflect.Method m)
public static java.lang.String getQualifiedTypeName(java.lang.reflect.Type type)
public static java.lang.String getGenericCollectionType(java.lang.String type)
public static java.lang.String getPrimitiveFromClass(java.lang.String type)
type
- The Class name of a primitive Class.
public static java.lang.String getClassFromPrimitive(java.lang.String type)
type
- The primitive type name.
public static boolean isPrimitiveType(java.lang.String type)
public static java.lang.String capitalize(java.lang.String propertyName)
propertyName
- The string to capitalize.
public static java.lang.String makeReaderName(java.lang.String propertyName, java.lang.String type)
propertyName
- Name of the property to which the reader applies.type
- Class name of the property type.
public static java.lang.String makeReaderName(java.lang.String propertyName)
propertyName
- Name of the property to which the reader applies.
public static java.lang.String makeWriterName(java.lang.String propertyName)
propertyName
- Name of the property to which the writer applies.
public static boolean shouldHaveMetaData(java.lang.String sType)
sType
-
public static java.util.List<BeanMethodInfo> getMethods(java.lang.Class clz, int modifier)
clz
- modifier
-
public static java.util.List<java.lang.Class> getNestedClasses(java.lang.Class clz)
clz
- Class
public static java.util.List<BeanMethodInfo> getConstructorMethods(java.lang.Class clz, int modifier)
clz
- modifier
-
public static BeanMethodInfo findMethod(java.lang.Class clz, java.lang.String methodName, java.util.List<java.lang.String> params)
clz
- methodName
- params
-
public static BeanMethodInfo findMethod(java.lang.Class clz, java.lang.String methodName, java.lang.Class... parameterTypes)
public static void addTransactionalOperations(StructureDef operationsDef)
public static StructureDef buildSingleValueUpdateableOperations()
public static StructureDef buildSingleValueReadOnlyOperations()
public static StructureDef buildSingleValueParamaterizedOperations()
public static StructureDef buildUpdateableCollectionOperations()
public static StructureDef buildReadOnlyCollectionOperations()
public static StructureDef buildScalarCollectionOperations()
public static StructureDef buildParameterizedCollectionOperations()
public static final boolean hasLength(java.lang.String s)
hasLength(CharSequence)
public static final boolean hasLength(java.lang.CharSequence cs)
true
if the specified String
is not
null
and has a length greater than zero. This is
a very frequently occurring check.
public static final boolean areEqual(java.lang.Object o1, java.lang.Object o2)
null
The result of
this method is determined as follows:
o1
and o2
are the same object
according to the ==
operator, return
true
.
o1
or o2
is
null
, return false
.
o1.equals(o2)
.
equals
methods in
Arrays
should be used instead of this method.
Note that arrays with more than one dimension will require some
custom code in order to implement equals
properly.
public static boolean isInterface(java.lang.Class clz, java.lang.String iface)
clz
- Class
for implements classiface
- String
for interface
boolean
for ifacepublic static boolean isInstanceOf(java.lang.Class derivedClass, java.lang.Class parentClass)
derivedClass
- A classparentClass
- A class
public static java.lang.Class getClass(java.lang.String className)
public static java.lang.Object invokeMethod(java.lang.Object instance, java.lang.String methodName, java.lang.Class[] paramTypes, java.lang.Object[] params) throws java.lang.Exception
instance
- Object
methodName
- String
paramTypes
- Class[]
params
- Object[]
java.lang.Exception
public static java.lang.String getStringProperty(NamedDefinition def, java.lang.String propertyName, java.lang.String defaultValue)
public static java.lang.Boolean getBooleanProperty(NamedDefinition def, java.lang.String propertyName, java.lang.Boolean defaultValue)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |