public class BeanMetaDataUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NOT_NULLABLE |
static String |
NOT_UPDATABLE |
static String |
SERIAL_VERSION_UID |
| Constructor and Description |
|---|
BeanMetaDataUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
getBeanPropertyByName(Object pObject,
String pPropertyName) |
static Class |
getBeanPropertyType(Object pObject,
String pPropertyName) |
static Map<String,JDBCColumn> |
getColumnMetaData(Class pClass)
Returns a Map containing a mapping from the Bean attribute names to their JDBCColumn
annotations.
|
static Field[] |
getDeclaredFieldsInclParent(Class pClass)
Using Class.getDeclaredFields does not return fields declared in a potentially existing super-class.
|
static JDBCColumn |
getJDBCColumnAnnotation(Field pField)
Returns the annotations for a given field.
|
static Long |
getPrimaryKeyValue(IBean pBean)
Retrieves the value of the (primary) key of the bean passed to this method.
|
static void |
setPrimaryKeyValue(IBean pBean,
Number pPKValue)
Sets the value of the (primary) key of the bean passed to this method.
|
static void |
setVersionColumnValue(IBean pBean,
Object pVersionColumnValue)
Sets the value of the version column of the bean passed to this method.
|
public static final String NOT_UPDATABLE
public static final String NOT_NULLABLE
public static final String SERIAL_VERSION_UID
public static Field[] getDeclaredFieldsInclParent(Class pClass)
pClass - public static JDBCColumn getJDBCColumnAnnotation(Field pField)
pField - the fieldpublic static Map<String,JDBCColumn> getColumnMetaData(Class pClass)
pClass - the Bean typepublic static Long getPrimaryKeyValue(IBean pBean)
pBean - the bean instance.public static Object getBeanPropertyByName(Object pObject, String pPropertyName)
public static void setPrimaryKeyValue(IBean pBean, Number pPKValue)
pBean - the bean instance.pPKValue - the value of the primary key.public static void setVersionColumnValue(IBean pBean, Object pVersionColumnValue)
pBean - the bean instance.pVersionColumnValue - the value of the version column.Copyright © 2013. All rights reserved.