mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-08-31 08:59:50 +02:00
GeoInfoTable now static info class:
- Made constructor private - Removed getter from SQLDB
This commit is contained in:
parent
0799674de3
commit
b0170b76af
|
@ -75,7 +75,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||||
private final KillsTable killsTable;
|
private final KillsTable killsTable;
|
||||||
private final NicknamesTable nicknamesTable;
|
private final NicknamesTable nicknamesTable;
|
||||||
private final SessionsTable sessionsTable;
|
private final SessionsTable sessionsTable;
|
||||||
private final GeoInfoTable geoInfoTable;
|
|
||||||
private final TPSTable tpsTable;
|
private final TPSTable tpsTable;
|
||||||
private final SecurityTable securityTable;
|
private final SecurityTable securityTable;
|
||||||
private final WorldTimesTable worldTimesTable;
|
private final WorldTimesTable worldTimesTable;
|
||||||
|
@ -116,7 +115,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||||
|
|
||||||
usersTable = new UsersTable(this);
|
usersTable = new UsersTable(this);
|
||||||
userInfoTable = new UserInfoTable(this);
|
userInfoTable = new UserInfoTable(this);
|
||||||
geoInfoTable = new GeoInfoTable(this);
|
|
||||||
nicknamesTable = new NicknamesTable(this);
|
nicknamesTable = new NicknamesTable(this);
|
||||||
sessionsTable = new SessionsTable(this);
|
sessionsTable = new SessionsTable(this);
|
||||||
killsTable = new KillsTable(this);
|
killsTable = new KillsTable(this);
|
||||||
|
@ -363,11 +361,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||||
return killsTable;
|
return killsTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public GeoInfoTable getGeoInfoTable() {
|
|
||||||
return geoInfoTable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public NicknamesTable getNicknamesTable() {
|
public NicknamesTable getNicknamesTable() {
|
||||||
return nicknamesTable;
|
return nicknamesTable;
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
package com.djrapitops.plan.db.sql.tables;
|
package com.djrapitops.plan.db.sql.tables;
|
||||||
|
|
||||||
import com.djrapitops.plan.db.DBType;
|
import com.djrapitops.plan.db.DBType;
|
||||||
import com.djrapitops.plan.db.SQLDB;
|
|
||||||
import com.djrapitops.plan.db.patches.*;
|
import com.djrapitops.plan.db.patches.*;
|
||||||
import com.djrapitops.plan.db.sql.parsing.CreateTableParser;
|
import com.djrapitops.plan.db.sql.parsing.CreateTableParser;
|
||||||
import com.djrapitops.plan.db.sql.parsing.Sql;
|
import com.djrapitops.plan.db.sql.parsing.Sql;
|
||||||
|
@ -36,7 +35,7 @@ import com.djrapitops.plan.db.sql.parsing.Sql;
|
||||||
*
|
*
|
||||||
* @author Rsl1122
|
* @author Rsl1122
|
||||||
*/
|
*/
|
||||||
public class GeoInfoTable extends Table {
|
public class GeoInfoTable {
|
||||||
|
|
||||||
public static final String TABLE_NAME = "plan_ips";
|
public static final String TABLE_NAME = "plan_ips";
|
||||||
|
|
||||||
|
@ -61,8 +60,8 @@ public class GeoInfoTable extends Table {
|
||||||
" AND " + IP_HASH + "=?" +
|
" AND " + IP_HASH + "=?" +
|
||||||
" AND " + GEOLOCATION + "=?";
|
" AND " + GEOLOCATION + "=?";
|
||||||
|
|
||||||
public GeoInfoTable(SQLDB db) {
|
private GeoInfoTable() {
|
||||||
super(TABLE_NAME, db);
|
/* Static information class */
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String createTableSQL(DBType dbType) {
|
public static String createTableSQL(DBType dbType) {
|
||||||
|
|
|
@ -29,7 +29,6 @@ public class SQLOps {
|
||||||
protected final KillsTable killsTable;
|
protected final KillsTable killsTable;
|
||||||
protected final NicknamesTable nicknamesTable;
|
protected final NicknamesTable nicknamesTable;
|
||||||
protected final SessionsTable sessionsTable;
|
protected final SessionsTable sessionsTable;
|
||||||
protected final GeoInfoTable geoInfoTable;
|
|
||||||
protected final TPSTable tpsTable;
|
protected final TPSTable tpsTable;
|
||||||
protected final SecurityTable securityTable;
|
protected final SecurityTable securityTable;
|
||||||
protected final WorldTimesTable worldTimesTable;
|
protected final WorldTimesTable worldTimesTable;
|
||||||
|
@ -45,7 +44,6 @@ public class SQLOps {
|
||||||
killsTable = db.getKillsTable();
|
killsTable = db.getKillsTable();
|
||||||
nicknamesTable = db.getNicknamesTable();
|
nicknamesTable = db.getNicknamesTable();
|
||||||
sessionsTable = db.getSessionsTable();
|
sessionsTable = db.getSessionsTable();
|
||||||
geoInfoTable = db.getGeoInfoTable();
|
|
||||||
tpsTable = db.getTpsTable();
|
tpsTable = db.getTpsTable();
|
||||||
securityTable = db.getSecurityTable();
|
securityTable = db.getSecurityTable();
|
||||||
worldTimesTable = db.getWorldTimesTable();
|
worldTimesTable = db.getWorldTimesTable();
|
||||||
|
|
|
@ -498,7 +498,6 @@ public abstract class CommonDBTest {
|
||||||
UsersTable usersTable = db.getUsersTable();
|
UsersTable usersTable = db.getUsersTable();
|
||||||
SessionsTable sessionsTable = db.getSessionsTable();
|
SessionsTable sessionsTable = db.getSessionsTable();
|
||||||
NicknamesTable nicknamesTable = db.getNicknamesTable();
|
NicknamesTable nicknamesTable = db.getNicknamesTable();
|
||||||
GeoInfoTable geoInfoTable = db.getGeoInfoTable();
|
|
||||||
|
|
||||||
usersTable.registerUser(playerUUID, 223456789L, "Test_name");
|
usersTable.registerUser(playerUUID, 223456789L, "Test_name");
|
||||||
userInfoTable.registerUserInfo(playerUUID, 223456789L);
|
userInfoTable.registerUserInfo(playerUUID, 223456789L);
|
||||||
|
@ -551,7 +550,6 @@ public abstract class CommonDBTest {
|
||||||
UserInfoTable userInfoTable = db.getUserInfoTable();
|
UserInfoTable userInfoTable = db.getUserInfoTable();
|
||||||
UsersTable usersTable = db.getUsersTable();
|
UsersTable usersTable = db.getUsersTable();
|
||||||
NicknamesTable nicknamesTable = db.getNicknamesTable();
|
NicknamesTable nicknamesTable = db.getNicknamesTable();
|
||||||
GeoInfoTable geoInfoTable = db.getGeoInfoTable();
|
|
||||||
TPSTable tpsTable = db.getTpsTable();
|
TPSTable tpsTable = db.getTpsTable();
|
||||||
SecurityTable securityTable = db.getSecurityTable();
|
SecurityTable securityTable = db.getSecurityTable();
|
||||||
PingTable pingTable = db.getPingTable();
|
PingTable pingTable = db.getPingTable();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user