use of com.djrapitops.plan.extension.implementation.storage.transactions.providers.StoreProviderTransaction in project Plan by plan-player-analytics.
the class DataValueGatherer method storeBoolean.
private void storeBoolean(Parameters parameters, Conditions conditions, BooleanDataValue data) {
ProviderInformation information = data.getInformation();
Boolean value = getValue(conditions, data, information);
if (value == null)
return;
if (value) {
conditions.conditionFulfilled(information.getProvidedCondition());
} else {
conditions.conditionFulfilled("not_" + information.getProvidedCondition());
}
Database db = dbSystem.getDatabase();
db.executeTransaction(new StoreIconTransaction(information.getIcon()));
db.executeTransaction(new StoreProviderTransaction(information, parameters));
db.executeTransaction(new StoreServerBooleanResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.extension.implementation.storage.transactions.providers.StoreProviderTransaction in project Plan by plan-player-analytics.
the class DataValueGatherer method storePlayerGroups.
private void storePlayerGroups(Parameters parameters, Conditions conditions, GroupsDataValue 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 StorePlayerGroupsResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.extension.implementation.storage.transactions.providers.StoreProviderTransaction in project Plan by plan-player-analytics.
the class DataValueGatherer method storePlayerBoolean.
private void storePlayerBoolean(Parameters parameters, Conditions conditions, BooleanDataValue data) {
ProviderInformation information = data.getInformation();
Boolean value = getValue(conditions, data, information);
if (value == null)
return;
if (value) {
conditions.conditionFulfilled(information.getProvidedCondition());
} else {
conditions.conditionFulfilled("not_" + information.getProvidedCondition());
}
Database db = dbSystem.getDatabase();
db.executeTransaction(new StoreIconTransaction(information.getIcon()));
db.executeTransaction(new StoreProviderTransaction(information, parameters));
db.executeTransaction(new StorePlayerBooleanResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.extension.implementation.storage.transactions.providers.StoreProviderTransaction in project Plan by plan-player-analytics.
the class DataValueGatherer method storeNumber.
private void storeNumber(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 StoreServerNumberResultTransaction(information, parameters, value));
}
use of com.djrapitops.plan.extension.implementation.storage.transactions.providers.StoreProviderTransaction in project Plan by plan-player-analytics.
the class DataValueGatherer method storeDouble.
private void storeDouble(Parameters parameters, Conditions conditions, DoubleDataValue data) {
ProviderInformation information = data.getInformation();
Double 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 StoreServerDoubleResultTransaction(information, parameters, value));
}
Aggregations