net.sf.imca.services
Class ReflectionUtil
java.lang.Object
net.sf.imca.services.ReflectionUtil
public class ReflectionUtil
- extends java.lang.Object
Utilities for common reflection tasks.
- Author:
- dougculnane
Field Summary |
static java.lang.String |
ENTITY
|
static java.lang.Object[] |
NO_PARAMS
|
Method Summary |
static java.util.Vector<java.lang.Object> |
getChildEntities(java.lang.Object dbObject)
|
static java.util.ArrayList<java.lang.Class> |
getClasses(java.lang.String packageName)
|
static java.lang.String |
getEntityId(java.lang.Object entity)
|
static java.lang.String[] |
getGetMethodNames(java.lang.Object entity)
|
static java.lang.Object |
getObject(java.lang.String className)
|
static java.lang.String[] |
getSetMethodNames(java.lang.Object entity)
|
static void |
mergeDBObject(java.lang.Object dbObject,
java.lang.Object newObject)
|
static void |
replaceDBObject(java.lang.Object dbObject,
java.lang.Object newObject)
|
static void |
setEntityValuesFromParameterMap(java.lang.Object entity,
java.util.Hashtable<java.lang.String,java.lang.String> parameterMap)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_PARAMS
public static final java.lang.Object[] NO_PARAMS
ENTITY
public static final java.lang.String ENTITY
- See Also:
- Constant Field Values
ReflectionUtil
public ReflectionUtil()
replaceDBObject
public static void replaceDBObject(java.lang.Object dbObject,
java.lang.Object newObject)
throws java.lang.Exception
- Throws:
java.lang.Exception
mergeDBObject
public static void mergeDBObject(java.lang.Object dbObject,
java.lang.Object newObject)
throws java.lang.Exception
- Throws:
java.lang.Exception
getObject
public static java.lang.Object getObject(java.lang.String className)
throws java.lang.ClassNotFoundException,
java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.IllegalArgumentException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
getSetMethodNames
public static java.lang.String[] getSetMethodNames(java.lang.Object entity)
getGetMethodNames
public static java.lang.String[] getGetMethodNames(java.lang.Object entity)
setEntityValuesFromParameterMap
public static void setEntityValuesFromParameterMap(java.lang.Object entity,
java.util.Hashtable<java.lang.String,java.lang.String> parameterMap)
throws java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException
- Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
getChildEntities
public static java.util.Vector<java.lang.Object> getChildEntities(java.lang.Object dbObject)
throws java.lang.IllegalArgumentException,
java.lang.SecurityException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.NoSuchMethodException
- Throws:
java.lang.IllegalArgumentException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
getClasses
public static java.util.ArrayList<java.lang.Class> getClasses(java.lang.String packageName)
throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
getEntityId
public static java.lang.String getEntityId(java.lang.Object entity)
throws java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
Copyright © 2007-2008 The International Moth Class Association (IMCA).. All Rights Reserved.