Skip to content
Snippets Groups Projects

ENH: apply paging such that no unwanted jobs are being triggered

Merged Henrik tom Wörden requested to merge f-enh-paging into dev
4 files
+ 25
23
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -59,18 +59,18 @@ public class ExecuteQuery extends FlagJob {
}
getContainer().addMessage(queryInstance);
int index = 0;
int length = getContainer().size();
int startIndex = 0;
int endIndex = getContainer().size();
if (((Retrieve) getTransaction()).hasPaging()) {
Retrieve.Paging paging = ((Retrieve) getTransaction()).getPaging();
index = Math.min(getContainer().size(), paging.index);
length = Math.min(getContainer().size(), paging.length);
startIndex = Math.min(getContainer().size(), paging.startIndex);
endIndex = Math.min(getContainer().size(), paging.endIndex);
}
int ii = 0;
for (final EntityInterface entity : getContainer()) {
if (ii >= index && ii < length) {
if (ii >= startIndex && ii < endIndex) {
getTransaction().getSchedule().addAll(loadJobs(entity, getTransaction()));
} else {
entity.setEntityStatus(EntityStatus.IGNORE);
Loading