|
|
|
@ -78,7 +78,7 @@ public class ObjectClient extends Client {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public <T> void insert(Class<T> poClass, T po) throws SQLException, ClassNotFoundException {
|
|
|
|
|
public <T> int insert(Class<T> poClass, T po) throws SQLException, ClassNotFoundException {
|
|
|
|
|
try {
|
|
|
|
|
Class aClass = classMap.get(poClass.getName());
|
|
|
|
|
if (aClass == null) {
|
|
|
|
@ -138,13 +138,14 @@ public class ObjectClient extends Client {
|
|
|
|
|
sql.append(valueSql);
|
|
|
|
|
sql.append(")");
|
|
|
|
|
System.out.println("SQL ==> " + sql.toString());
|
|
|
|
|
executeUpdate(sql.toString());
|
|
|
|
|
return executeUpdate(sql.toString());
|
|
|
|
|
}
|
|
|
|
|
} catch (IllegalAccessException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
} finally {
|
|
|
|
|
destroyed();
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public <T> int delete(Class<T> poClass, String... wheres) throws SQLException, ClassNotFoundException {
|
|
|
|
|