mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-12 19:30:44 +01:00
Made SettingsTable into a static information class:
- Made constructor private - Removed getter in SQLDB
This commit is contained in:
parent
59040df981
commit
b9164d7eff
@ -79,7 +79,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||
private final SessionsTable sessionsTable;
|
||||
private final TPSTable tpsTable;
|
||||
private final ServerTable serverTable;
|
||||
private final SettingsTable settingsTable;
|
||||
|
||||
private final SQLFetchOps fetchOps;
|
||||
private final SQLSearchOps searchOps;
|
||||
@ -112,7 +111,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||
usersTable = new UsersTable(this);
|
||||
userInfoTable = new UserInfoTable(this);
|
||||
sessionsTable = new SessionsTable(this);
|
||||
settingsTable = new SettingsTable(this);
|
||||
|
||||
fetchOps = new SQLFetchOps(this);
|
||||
searchOps = new SQLSearchOps(this);
|
||||
@ -361,11 +359,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||
return userInfoTable;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public SettingsTable getSettingsTable() {
|
||||
return settingsTable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public FetchOperations fetch() {
|
||||
|
@ -17,16 +17,15 @@
|
||||
package com.djrapitops.plan.db.sql.tables;
|
||||
|
||||
import com.djrapitops.plan.db.DBType;
|
||||
import com.djrapitops.plan.db.SQLDB;
|
||||
import com.djrapitops.plan.db.sql.parsing.CreateTableParser;
|
||||
import com.djrapitops.plan.db.sql.parsing.Sql;
|
||||
|
||||
/**
|
||||
* Table that represents plan_settings.
|
||||
* Table information about 'plan_settings'.
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public class SettingsTable extends Table {
|
||||
public class SettingsTable {
|
||||
|
||||
public static final String TABLE_NAME = "plan_settings";
|
||||
|
||||
@ -45,8 +44,8 @@ public class SettingsTable extends Table {
|
||||
SERVER_UUID + "=? AND " +
|
||||
CONFIG_CONTENT + "!=?";
|
||||
|
||||
public SettingsTable(SQLDB db) {
|
||||
super(TABLE_NAME, db);
|
||||
private SettingsTable() {
|
||||
/* Static information class */
|
||||
}
|
||||
|
||||
public static String createTableSQL(DBType dbType) {
|
||||
|
@ -29,7 +29,6 @@ public class SQLOps {
|
||||
protected final SessionsTable sessionsTable;
|
||||
protected final TPSTable tpsTable;
|
||||
protected final ServerTable serverTable;
|
||||
protected final SettingsTable settingsTable;
|
||||
|
||||
public SQLOps(SQLDB db) {
|
||||
this.db = db;
|
||||
@ -39,6 +38,5 @@ public class SQLOps {
|
||||
sessionsTable = db.getSessionsTable();
|
||||
tpsTable = db.getTpsTable();
|
||||
serverTable = db.getServerTable();
|
||||
settingsTable = db.getSettingsTable();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user