public class CommandUseTable extends Table
db, tableName, usingMySQL
Constructor and Description |
---|
CommandUseTable(SQLDB db,
boolean usingMySQL) |
Modifier and Type | Method and Description |
---|---|
void |
commandUsed(String command) |
void |
createTable() |
Map<UUID,Map<String,Integer>> |
getAllCommandUsages() |
Optional<String> |
getCommandByID(int id) |
Optional<Integer> |
getCommandID(String command) |
Map<String,Integer> |
getCommandUse()
Used to get all commands used in this server.
|
Map<String,Integer> |
getCommandUse(UUID serverUUID)
Used to get all commands used in a server.
|
void |
insertCommandUsage(Map<UUID,Map<String,Integer>> allCommandUsages) |
addColumns, close, commit, createTable, equals, execute, executeUnsafe, getConnection, getDb, getTableName, getVersion, hashCode, removeAllData, removeColumns, toString
public CommandUseTable(SQLDB db, boolean usingMySQL)
public void createTable() throws DBCreateTableException
createTable
in class Table
DBCreateTableException
public Map<String,Integer> getCommandUse() throws SQLException
SQLException
- DB Errorpublic Map<String,Integer> getCommandUse(UUID serverUUID) throws SQLException
serverUUID
- UUID of the server.SQLException
- DB Errorpublic void commandUsed(String command) throws SQLException
SQLException
public Optional<String> getCommandByID(int id) throws SQLException
SQLException
public Optional<Integer> getCommandID(String command) throws SQLException
SQLException
public Map<UUID,Map<String,Integer>> getAllCommandUsages() throws SQLException
SQLException
public void insertCommandUsage(Map<UUID,Map<String,Integer>> allCommandUsages) throws SQLException
SQLException
Copyright © 2017. All rights reserved.