Begin refactor to remove abstraction.

This commit is contained in:
2023-05-20 17:35:44 -04:00
parent 563b54de14
commit c86ad3f2f6
2 changed files with 178 additions and 101 deletions
+18 -1
View File
@@ -286,7 +286,24 @@ public abstract class dbHandlerBase {
String errorMsg = rs.getString("errormsg");
Logger.error("SQLError: errorNum: " + errorNum + ", errorMsg: " + errorMsg);
logSQLCommand();
} catch (SQLException e) {}
} catch (SQLException e) {
}
}
protected <T extends AbstractGameObject> AbstractGameObject getObjectFromRs(ResultSet rs) {
AbstractGameObject abstractGameObject = null;
try {
if (rs.next()) {
abstractGameObject = localClass.getConstructor(ResultSet.class).newInstance(rs);
DbManager.addToCache(abstractGameObject);
}
} catch (Exception e) {
Logger.error(e);
}
return abstractGameObject;
}
protected <T extends AbstractGameObject> AbstractGameObject getObjectSingle(int id) {