Garbage cleanup in SetZone().

Package reformat.
This commit is contained in:
2023-05-23 10:27:03 -04:00
parent a2d62ec221
commit 6dd7315786
29 changed files with 2901 additions and 2937 deletions
@@ -21,30 +21,30 @@ import java.sql.SQLException;
public class dbVendorDialogHandler extends dbHandlerBase {
public dbVendorDialogHandler() {
this.localClass = VendorDialog.class;
this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName());
}
public dbVendorDialogHandler() {
this.localClass = VendorDialog.class;
this.localObjectType = Enum.GameObjectType.valueOf(this.localClass.getSimpleName());
}
public VendorDialog GET_VENDORDIALOG(final int objectUUID) {
public VendorDialog GET_VENDORDIALOG(final int objectUUID) {
VendorDialog vendorDialog = (VendorDialog) DbManager.getFromCache(Enum.GameObjectType.VendorDialog, objectUUID);
VendorDialog vendorDialog = (VendorDialog) DbManager.getFromCache(Enum.GameObjectType.VendorDialog, objectUUID);
if (vendorDialog != null)
return vendorDialog;
if (vendorDialog != null)
return vendorDialog;
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_vendordialog` WHERE `ID`=?")) {
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_vendordialog` WHERE `ID`=?")) {
preparedStatement.setInt(1, objectUUID);
preparedStatement.setInt(1, objectUUID);
ResultSet rs = preparedStatement.executeQuery();
vendorDialog = (VendorDialog) getObjectFromRs(rs);
ResultSet rs = preparedStatement.executeQuery();
vendorDialog = (VendorDialog) getObjectFromRs(rs);
} catch (SQLException e) {
Logger.error(e);
}
} catch (SQLException e) {
Logger.error(e);
}
return vendorDialog;
}
return vendorDialog;
}
}