Package com.redwood.scheduler.api.model
Class UniqueIdListAPIResultSetCallback
- java.lang.Object
-
- com.redwood.scheduler.api.model.UniqueIdListAPIResultSetCallback
-
- All Implemented Interfaces:
APIResultSetCallback
- Direct Known Subclasses:
LimitedUniqueIdListAPIResultSetCallback
public class UniqueIdListAPIResultSetCallback extends Object implements APIResultSetCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected long
count
protected long
skip
-
Fields inherited from interface com.redwood.scheduler.api.model.APIResultSetCallback
NULL
-
-
Constructor Summary
Constructors Constructor Description UniqueIdListAPIResultSetCallback(com.redwood.scheduler.infrastructure.collections.LongList newList)
UniqueIdListAPIResultSetCallback(com.redwood.scheduler.infrastructure.collections.LongList newList, long skipNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
callback(ResultSet rs, ObjectGetter objectGetter)
Invoked for each result, provided that the previous invocation returnedtrue
.void
start()
Invoked before processing any results.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.redwood.scheduler.api.model.APIResultSetCallback
finish
-
-
-
-
Constructor Detail
-
UniqueIdListAPIResultSetCallback
public UniqueIdListAPIResultSetCallback(com.redwood.scheduler.infrastructure.collections.LongList newList)
-
UniqueIdListAPIResultSetCallback
public UniqueIdListAPIResultSetCallback(com.redwood.scheduler.infrastructure.collections.LongList newList, long skipNumber)
-
-
Method Detail
-
start
public void start()
Description copied from interface:APIResultSetCallback
Invoked before processing any results.This is before any calls to
APIResultSetCallback.callback(ResultSet, ObjectGetter)
are made.Note that this may be invoked more than once under some circumstances. (Such circumstances include when the query is restarted due to underlying database errors.)
- Specified by:
start
in interfaceAPIResultSetCallback
-
callback
public boolean callback(ResultSet rs, ObjectGetter objectGetter) throws SQLException
Description copied from interface:APIResultSetCallback
Invoked for each result, provided that the previous invocation returnedtrue
.- Specified by:
callback
in interfaceAPIResultSetCallback
- Parameters:
rs
- the result-set to processobjectGetter
- an object-getter with can be used to convert the result-set into one (or more) objects.- Returns:
true
if this method should be invoked for the next result,false
if subsequent results are to be discarded.- Throws:
SQLException
- Exception thrown when a database-related error occurs
-
-