|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.meta.JavaTypes
public class JavaTypes
Type constants for managed fields.
Field Summary | |
---|---|
static int |
ARRAY
|
static int |
BIGDECIMAL
|
static int |
BIGINTEGER
|
static int |
BOOLEAN
|
static int |
BOOLEAN_OBJ
|
static int |
BYTE
|
static int |
BYTE_OBJ
|
static int |
CALENDAR
|
static int |
CHAR
|
static int |
CHAR_OBJ
|
static int |
COLLECTION
|
static int |
DATE
|
static int |
DOUBLE
|
static int |
DOUBLE_OBJ
|
static int |
FLOAT
|
static int |
FLOAT_OBJ
|
static int |
INPUT_READER
|
static int |
INPUT_STREAM
|
static int |
INT
|
static int |
INT_OBJ
|
static int |
LOCALE
|
static int |
LONG
|
static int |
LONG_OBJ
|
static int |
MAP
|
static int |
NUMBER
|
static int |
OBJECT
|
static int |
OID
|
static int |
PC
|
static int |
PC_UNTYPED
|
static int |
SHORT
|
static int |
SHORT_OBJ
|
static int |
STRING
|
Constructor Summary | |
---|---|
JavaTypes()
|
Method Summary | |
---|---|
static Class |
classForName(String name,
ClassMetaData context)
Check the given name against the same set of standard packages used when parsing metadata. |
static Class |
classForName(String name,
ClassMetaData context,
ClassLoader loader)
Check the given name against the same set of standard packages used when parsing metadata. |
static Class |
classForName(String name,
ValueMetaData context)
Check the given name against the same set of standard packages used when parsing metadata. |
static Class |
classForName(String name,
ValueMetaData context,
ClassLoader loader)
Check the given name against the same set of standard packages used when parsing metadata. |
static Object |
convert(Object val,
int typeCode)
Convert the given object to the given type if possible. |
static int |
getTypeCode(Class type)
Return the field metadata type code for the given class. |
static boolean |
maybePC(FieldMetaData field)
Return true if the (possibly unresolved) field or its elements might be persistence capable objects. |
static boolean |
maybePC(ValueMetaData val)
Return true if the (possibly unresolved) value might be a first class object. |
static Object |
toArray(Collection coll,
Class elem)
Helper method to return the given collection as an array. |
static List |
toList(Object val,
Class elem,
boolean mutable)
Helper method to return the given array value as a collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BOOLEAN
public static final int BYTE
public static final int CHAR
public static final int DOUBLE
public static final int FLOAT
public static final int INT
public static final int LONG
public static final int SHORT
public static final int OBJECT
public static final int STRING
public static final int NUMBER
public static final int ARRAY
public static final int COLLECTION
public static final int MAP
public static final int DATE
public static final int PC
public static final int BOOLEAN_OBJ
public static final int BYTE_OBJ
public static final int CHAR_OBJ
public static final int DOUBLE_OBJ
public static final int FLOAT_OBJ
public static final int INT_OBJ
public static final int LONG_OBJ
public static final int SHORT_OBJ
public static final int BIGDECIMAL
public static final int BIGINTEGER
public static final int LOCALE
public static final int PC_UNTYPED
public static final int CALENDAR
public static final int OID
public static final int INPUT_STREAM
public static final int INPUT_READER
Constructor Detail |
---|
public JavaTypes()
Method Detail |
---|
public static int getTypeCode(Class type)
public static Class classForName(String name, ClassMetaData context)
public static Class classForName(String name, ClassMetaData context, ClassLoader loader)
public static Class classForName(String name, ValueMetaData context)
public static Class classForName(String name, ValueMetaData context, ClassLoader loader)
public static Object convert(Object val, int typeCode)
Number
. If no known conversion or the value is null,
returns the original value.
public static boolean maybePC(FieldMetaData field)
public static boolean maybePC(ValueMetaData val)
public static List toList(Object val, Class elem, boolean mutable)
public static Object toArray(Collection coll, Class elem)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |