Refactored DatabaseFactory.
This commit is contained in:
@@ -25,7 +25,7 @@ import java.util.Map.Entry;
|
||||
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.model.variables.AbstractVariables;
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ public final class GlobalVariablesManager extends AbstractVariables
|
||||
public boolean restoreMe()
|
||||
{
|
||||
// Restore previous variables.
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
Statement st = con.createStatement();
|
||||
ResultSet rset = st.executeQuery(SELECT_QUERY))
|
||||
{
|
||||
@@ -81,7 +81,7 @@ public final class GlobalVariablesManager extends AbstractVariables
|
||||
return false;
|
||||
}
|
||||
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
Statement del = con.createStatement();
|
||||
PreparedStatement st = con.prepareStatement(INSERT_QUERY))
|
||||
{
|
||||
@@ -113,7 +113,7 @@ public final class GlobalVariablesManager extends AbstractVariables
|
||||
@Override
|
||||
public boolean deleteMe()
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
Statement del = con.createStatement())
|
||||
{
|
||||
del.execute(DELETE_QUERY);
|
||||
|
Reference in New Issue
Block a user