Refactored out duplicate db interface.

This commit is contained in:
2024-03-14 15:22:38 -04:00
parent 4646d03bdd
commit f2d28fd7af
13 changed files with 86 additions and 1576 deletions
@@ -84,22 +84,6 @@ public abstract class AbstractGameObject {
return GameObjectType.values()[ordinal];
}
/**
* Generates a {@link PreparedStatementShared} based on the specified query.
* <p>
* If {@link AbstractGameObject} Database functions will properly release
* the PreparedStatementShared upon completion. If these functions are not
* used, then {@link PreparedStatementShared#release release()} must be
* called when finished with this object.
*
* @param sql The SQL string used to generate the PreparedStatementShared
* @return {@link PreparedStatementShared}
* @throws {@link SQLException}
**/
protected static PreparedStatementShared prepareStatement(String sql) throws SQLException {
return new PreparedStatementShared(sql);
}
public static AbstractGameObject getFromTypeAndID(long compositeID) {
int objectTypeID = extractTypeOrdinal(compositeID);
int tableID = extractTableID(objectTypeID, compositeID);