Turned PingTable static info class:

- Made PingTable constructor private
- Removed getter from SQLDB
This commit is contained in:
Rsl1122 2019-02-01 18:46:56 +02:00
parent 5b3d687a60
commit fc07cb0227
4 changed files with 3 additions and 14 deletions

View File

@ -79,7 +79,6 @@ public abstract class SQLDB extends AbstractDatabase {
private final SecurityTable securityTable;
private final WorldTimesTable worldTimesTable;
private final ServerTable serverTable;
private final PingTable pingTable;
private final SettingsTable settingsTable;
private final SQLCheckOps checkOps;
@ -119,7 +118,6 @@ public abstract class SQLDB extends AbstractDatabase {
sessionsTable = new SessionsTable(this);
killsTable = new KillsTable(this);
worldTimesTable = new WorldTimesTable(this);
pingTable = new PingTable(this);
settingsTable = new SettingsTable(this);
checkOps = new SQLCheckOps(this);
@ -391,11 +389,6 @@ public abstract class SQLDB extends AbstractDatabase {
return userInfoTable;
}
@Deprecated
public PingTable getPingTable() {
return pingTable;
}
@Deprecated
public SettingsTable getSettingsTable() {
return settingsTable;

View File

@ -17,7 +17,6 @@
package com.djrapitops.plan.db.sql.tables;
import com.djrapitops.plan.db.DBType;
import com.djrapitops.plan.db.SQLDB;
import com.djrapitops.plan.db.patches.PingOptimizationPatch;
import com.djrapitops.plan.db.sql.parsing.CreateTableParser;
import com.djrapitops.plan.db.sql.parsing.Sql;
@ -30,7 +29,7 @@ import com.djrapitops.plan.db.sql.parsing.Sql;
*
* @author Rsl1122
*/
public class PingTable extends Table {
public class PingTable {
public static final String TABLE_NAME = "plan_ping";
@ -51,8 +50,8 @@ public class PingTable extends Table {
AVG_PING +
") VALUES (?, ?, ?, ?, ?, ?)";
public PingTable(SQLDB db) {
super(TABLE_NAME, db);
private PingTable() {
/* Static information class */
}
public static String createTableSQL(DBType dbType) {

View File

@ -33,7 +33,6 @@ public class SQLOps {
protected final SecurityTable securityTable;
protected final WorldTimesTable worldTimesTable;
protected final ServerTable serverTable;
protected final PingTable pingTable;
protected final SettingsTable settingsTable;
public SQLOps(SQLDB db) {
@ -48,7 +47,6 @@ public class SQLOps {
securityTable = db.getSecurityTable();
worldTimesTable = db.getWorldTimesTable();
serverTable = db.getServerTable();
pingTable = db.getPingTable();
settingsTable = db.getSettingsTable();
}
}

View File

@ -520,7 +520,6 @@ public abstract class CommonDBTest {
NicknamesTable nicknamesTable = db.getNicknamesTable();
TPSTable tpsTable = db.getTpsTable();
SecurityTable securityTable = db.getSecurityTable();
PingTable pingTable = db.getPingTable();
saveUserOne();
saveUserTwo();