读书人

hibernate对象淘选功能

发布时间: 2012-12-28 10:29:05 作者: rapoo

hibernate对象筛选功能

筛选功能?

?

?

package hb.util;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;public class ParamObject {private Object instance;private String method;public ParamObject(Object instance,String method){this.instance = instance;this.method = method;}public Object execute() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException{Class cls = instance.getClass();Method md = cls.getMethod(this.method, null);return md.invoke(instance, null);}}

?

读书人网 >开源软件

热点推荐