Package tilda.db.processors
Interface ObjectProcessor<T>
-
- All Known Implementing Classes:
ExporterObjectProcessor
,ExporterObjectProcessorCSV
,ExporterObjectProcessorJSON
public interface ObjectProcessor<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
end(boolean hasMore, int maxCount)
Called after the last record has been processed successfullyboolean
process(int count, T obj)
Called for each recorddefault void
start()
Called before the first record is processed
-
-
-
Method Detail
-
start
default void start() throws java.lang.Exception
Called before the first record is processed- Throws:
java.lang.Exception
-
process
boolean process(int count, T obj) throws java.lang.Exception
Called for each record- Parameters:
count
- the count of the object processed, starting at 0 for the first object processed.obj
- the object processed.- Returns:
- true if processing was successful and should continue, or false if processing was unsuccessful and should be aborted.
- Throws:
java.lang.Exception
-
end
default void end(boolean hasMore, int maxCount) throws java.lang.Exception
Called after the last record has been processed successfully- Parameters:
hasMore
- whether there are more records to be processedmaxCount
- the max count originally supplied to the query handler- Throws:
java.lang.Exception
-
-