@@ -0,0 +1,1189 @@
+package jp.wicresoft.jdbc;%0A%0Aimport java.lang.reflect.InvocationTargetException;%0Aimport java.lang.reflect.Method;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Apublic class BasicJdbc %7B%0A%0A%09public %3CT%3E List%3CT%3E convertJdbcMapToBean(List%3CMap%3CString, Object%3E%3E mapList, Class%3CT%3E clazz) %7B%0A%09%09List%3CT%3E resultList = new ArrayList%3CT%3E();%0A%09%09for (Map%3CString, Object%3E map : mapList) %7B%0A%09%09%09try %7B%0A%09%09%09%09// initial Object T%0A%09%09%09%09T object = clazz.newInstance();%0A%09%09%09%09Method%5B%5D methods = clazz.getMethods();%0A%09%09%09%09for (String key : map.keySet()) %7B%0A%09%09%09%09%09// get each object and name%0A%09%09%09%09%09Object value = map.get(key);%0A%09%09%09%09%09// get setMethod%0A%09%09%09%09%09for (Method method : methods) %7B%0A%09%09%09%09%09%09if (method.getName().equals(translateSetMethodName(key))) %7B%0A%09%09%09%09%09%09%09method.invoke(object, value);%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09resultList.add(object);%0A%09%09%09%7D catch (SecurityException %7C IllegalAccessException %7C IllegalArgumentException %7C InvocationTargetException %7C InstantiationException e) %7B%0A%09%09%09%09// TODO Auto-generated catch block%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return resultList;%0A%09%7D%0A%0A%09private String translateSetMethodName(String key) %7B%0A%09%09return %22set%22 + key.substring(0, 1).toUpperCase() + key.substring(1);%0A%09%7D%0A%7D%0A

create reflection method convertJdbcMapToBean