use of org.olat.upgrade.model.BusinessGroupUpgrade in project OpenOLAT by OpenOLAT.
the class OLATUpgrade_10_0_3 method upgradeBusinessGroups.
private boolean upgradeBusinessGroups(UpgradeManager upgradeManager, UpgradeHistoryData uhd) {
if (!uhd.getBooleanDataValue(TASK_BUSINESS_GROUPS)) {
int counter = 0;
List<BusinessGroupUpgrade> businessGroups;
do {
businessGroups = findBusinessGroups(counter, BATCH_SIZE);
for (BusinessGroupUpgrade businessGroup : businessGroups) {
processRightGroup(businessGroup);
}
counter += businessGroups.size();
log.audit("Rights groups processed: " + businessGroups.size() + ", total processed (" + counter + ")");
dbInstance.commitAndCloseSession();
} while (businessGroups.size() == BATCH_SIZE);
uhd.setBooleanDataValue(TASK_BUSINESS_GROUPS, true);
upgradeManager.setUpgradesHistory(uhd, VERSION);
}
return true;
}
use of org.olat.upgrade.model.BusinessGroupUpgrade in project openolat by klemens.
the class OLATUpgrade_10_0_0 method upgradeBusinessGroups.
private boolean upgradeBusinessGroups(UpgradeManager upgradeManager, UpgradeHistoryData uhd) {
if (!uhd.getBooleanDataValue(TASK_BUSINESS_GROUPS)) {
int counter = 0;
List<BusinessGroupUpgrade> businessGroups;
do {
businessGroups = findBusinessGroups(counter, BATCH_SIZE);
for (BusinessGroupUpgrade businessGroup : businessGroups) {
processBusinessGroup(businessGroup);
}
counter += businessGroups.size();
log.audit("Business groups processed: " + businessGroups.size() + ", total processed (" + counter + ")");
dbInstance.commitAndCloseSession();
} while (businessGroups.size() == BATCH_SIZE);
uhd.setBooleanDataValue(TASK_BUSINESS_GROUPS, true);
upgradeManager.setUpgradesHistory(uhd, VERSION);
}
return true;
}
Aggregations