use of com.djrapitops.plan.storage.database.Database in project Plan by plan-player-analytics.
the class DataValueGatherer method storeString.
private void storeString(Parameters parameters, Conditions conditions, StringDataValue data) {
ProviderInformation information = data.getInformation();
String value = getValue(conditions, data, information);
if (value == null)
return;
Database db = dbSystem.getDatabase();
db.executeTransaction(new StoreIconTransaction(information.getIcon()));
db.executeTransaction(new StoreProviderTransaction(information, parameters));
db.executeTransaction(new StoreServerStringResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.storage.database.Database in project Plan by plan-player-analytics.
the class DataValueGatherer method storeTable.
private void storeTable(Parameters parameters, Conditions conditions, TableDataValue data) {
ProviderInformation information = data.getInformation();
Table value = getValue(conditions, data, information);
if (value == null)
return;
Database db = dbSystem.getDatabase();
for (Icon icon : value.getIcons()) {
if (icon != null)
db.executeTransaction(new StoreIconTransaction(icon));
}
db.executeTransaction(new StoreTableProviderTransaction(information, parameters, value));
db.executeTransaction(new StoreServerTableResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.storage.database.Database in project Plan by plan-player-analytics.
the class DataValueGatherer method storeExtensionInformation.
public void storeExtensionInformation() {
String pluginName = extension.getPluginName();
Icon pluginIcon = extension.getPluginIcon();
long time = System.currentTimeMillis();
ServerUUID serverUUID = serverInfo.getServerUUID();
Database database = dbSystem.getDatabase();
database.executeTransaction(new StoreIconTransaction(pluginIcon));
database.executeTransaction(new StorePluginTransaction(pluginName, time, serverUUID, pluginIcon));
for (TabInformation tab : extension.getPluginTabs()) {
database.executeTransaction(new StoreIconTransaction(tab.getTabIcon()));
database.executeTransaction(new StoreTabInformationTransaction(pluginName, serverUUID, tab));
}
database.executeTransaction(new RemoveInvalidResultsTransaction(pluginName, serverUUID, extension.getInvalidatedMethods()));
}
use of com.djrapitops.plan.storage.database.Database in project Plan by plan-player-analytics.
the class DataValueGatherer method storePlayerNumber.
private void storePlayerNumber(Parameters parameters, Conditions conditions, NumberDataValue data) {
ProviderInformation information = data.getInformation();
Long value = getValue(conditions, data, information);
if (value == null)
return;
Database db = dbSystem.getDatabase();
db.executeTransaction(new StoreIconTransaction(information.getIcon()));
db.executeTransaction(new StoreProviderTransaction(information, parameters));
db.executeTransaction(new StorePlayerNumberResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.storage.database.Database in project Plan by plan-player-analytics.
the class DataValueGatherer method storePlayerString.
private void storePlayerString(Parameters parameters, Conditions conditions, StringDataValue data) {
ProviderInformation information = data.getInformation();
String value = getValue(conditions, data, information);
if (value == null)
return;
Database db = dbSystem.getDatabase();
db.executeTransaction(new StoreIconTransaction(information.getIcon()));
db.executeTransaction(new StoreProviderTransaction(information, parameters));
db.executeTransaction(new StorePlayerStringResultTransaction(information, parameters, value));
}
Aggregations