Refactored DatabaseFactory.
This commit is contained in:
@@ -21,7 +21,7 @@ import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.instancemanager.ClanHallAuctionManager;
|
||||
@@ -215,7 +215,7 @@ public final class AuctionableHall extends ClanHall
|
||||
@Override
|
||||
public final void updateDb()
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE clanhall SET ownerId=?, paidUntil=?, paid=? WHERE id=?"))
|
||||
{
|
||||
ps.setInt(1, getOwnerId());
|
||||
|
@@ -28,7 +28,7 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
@@ -91,7 +91,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
public void loadAttackers()
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(SQL_LOAD_ATTACKERS))
|
||||
{
|
||||
ps.setInt(1, _hall.getId());
|
||||
@@ -113,7 +113,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
public final void saveAttackers()
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("DELETE FROM clanhall_siege_attackers WHERE clanhall_id = ?"))
|
||||
{
|
||||
ps.setInt(1, _hall.getId());
|
||||
@@ -145,7 +145,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
if (_guards == null)
|
||||
{
|
||||
_guards = new ArrayList<>();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(SQL_LOAD_GUARDS))
|
||||
{
|
||||
ps.setInt(1, _hall.getId());
|
||||
|
@@ -21,7 +21,7 @@ import java.sql.PreparedStatement;
|
||||
import java.util.Calendar;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.enums.SiegeClanType;
|
||||
import com.l2jmobius.gameserver.model.L2Clan;
|
||||
import com.l2jmobius.gameserver.model.L2SiegeClan;
|
||||
@@ -130,7 +130,7 @@ public final class SiegableHall extends ClanHall
|
||||
@Override
|
||||
public final void updateDb()
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(SQL_SAVE))
|
||||
{
|
||||
ps.setInt(1, getOwnerId());
|
||||
|
Reference in New Issue
Block a user