Verified Commit 468262f0 authored by Lukas Wiest's avatar Lukas Wiest 🚂
Browse files

feat(core/filter): add field and getter for last received item count

parent 6cb88a00
......@@ -21,6 +21,7 @@ public abstract class Filter<T extends Ticket, F extends Filter<?,?>>
{
private static Logger logger = Logging.getLogger(Filter.class.getName());
protected int lastReceivedItemCount;
protected Map<String, Object> setFilters;// = new HashMap<>();
protected enum FilterNames
......@@ -45,6 +46,22 @@ public abstract class Filter<T extends Ticket, F extends Filter<?,?>>
this.getClass().getSimpleName()
));
setFilters = new HashMap<>();
lastReceivedItemCount = -1;
}
/**
* Counter how many items received on last {@link #get()} call.
*
* As local filtering can lower the items delivered from {@link #get()},
* you can't check that no more pages are available comparing the delivered item
* count with your set page size.<br>
*
* @return item count received from external Ticketsystem on last call of {@link #get()}
*/
public int getLastReceivedItemCount()
{
return lastReceivedItemCount;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment