mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
UserInfoTable is now static information class:
- Made constructor private - Removed getter in SQLDB
This commit is contained in:
parent
0c893ea59c
commit
fcdc281219
@ -28,7 +28,6 @@ import com.djrapitops.plan.db.access.transactions.init.CreateIndexTransaction;
|
||||
import com.djrapitops.plan.db.access.transactions.init.CreateTablesTransaction;
|
||||
import com.djrapitops.plan.db.patches.*;
|
||||
import com.djrapitops.plan.db.sql.tables.TPSTable;
|
||||
import com.djrapitops.plan.db.sql.tables.UserInfoTable;
|
||||
import com.djrapitops.plan.db.tasks.PatchTask;
|
||||
import com.djrapitops.plan.system.database.databases.operation.FetchOperations;
|
||||
import com.djrapitops.plan.system.database.databases.sql.operation.SQLFetchOps;
|
||||
@ -71,7 +70,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||
protected final Timings timings;
|
||||
protected final ErrorHandler errorHandler;
|
||||
|
||||
private final UserInfoTable userInfoTable;
|
||||
private final TPSTable tpsTable;
|
||||
|
||||
private final SQLFetchOps fetchOps;
|
||||
@ -98,8 +96,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||
|
||||
tpsTable = new TPSTable(this);
|
||||
|
||||
userInfoTable = new UserInfoTable(this);
|
||||
|
||||
fetchOps = new SQLFetchOps(this);
|
||||
}
|
||||
|
||||
@ -325,11 +321,6 @@ public abstract class SQLDB extends AbstractDatabase {
|
||||
return tpsTable;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public UserInfoTable getUserInfoTable() {
|
||||
return userInfoTable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public FetchOperations fetch() {
|
||||
|
@ -17,16 +17,13 @@
|
||||
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.UserInfoOptimizationPatch;
|
||||
import com.djrapitops.plan.db.patches.Version10Patch;
|
||||
import com.djrapitops.plan.db.sql.parsing.CreateTableParser;
|
||||
import com.djrapitops.plan.db.sql.parsing.Sql;
|
||||
|
||||
/**
|
||||
* Table that is in charge of storing server specific player data.
|
||||
* <p>
|
||||
* Table Name: plan_user_info
|
||||
* Table information about 'plan_user_info'.
|
||||
* <p>
|
||||
* Patches related to this table:
|
||||
* {@link Version10Patch}
|
||||
@ -34,7 +31,7 @@ import com.djrapitops.plan.db.sql.parsing.Sql;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public class UserInfoTable extends Table {
|
||||
public class UserInfoTable {
|
||||
|
||||
public static final String TABLE_NAME = "plan_user_info";
|
||||
|
||||
@ -53,8 +50,8 @@ public class UserInfoTable extends Table {
|
||||
OP +
|
||||
") VALUES (?, ?, ?, ?, ?)";
|
||||
|
||||
public UserInfoTable(SQLDB db) {
|
||||
super(TABLE_NAME, db);
|
||||
private UserInfoTable() {
|
||||
/* Static information class */
|
||||
}
|
||||
|
||||
public static String createTableSQL(DBType dbType) {
|
||||
|
@ -18,20 +18,17 @@ package com.djrapitops.plan.system.database.databases.sql.operation;
|
||||
|
||||
import com.djrapitops.plan.db.SQLDB;
|
||||
import com.djrapitops.plan.db.sql.tables.TPSTable;
|
||||
import com.djrapitops.plan.db.sql.tables.UserInfoTable;
|
||||
|
||||
@Deprecated
|
||||
public class SQLOps {
|
||||
|
||||
protected final SQLDB db;
|
||||
|
||||
protected final UserInfoTable userInfoTable;
|
||||
protected final TPSTable tpsTable;
|
||||
|
||||
public SQLOps(SQLDB db) {
|
||||
this.db = db;
|
||||
|
||||
userInfoTable = db.getUserInfoTable();
|
||||
tpsTable = db.getTpsTable();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user