public interface JPAReaderPattern {
/**
* This method is invoked during the job setup phase.
*
* @param props properties provided in the xJCL
*/
public void initialize(Properties props);
/**
* This method should retrieve values for the various columns for the current
* row from the given Iterator object. Typically this data would be used
* to populate an intermediate object which would be returned
* @param listIt
* @return
*/
public Object fetchRecord(Iterator listIt);
/**
* This method should return a JPQL query that will be used during setup of the
* stream to retrieve all relevant data that would be processed part of the job
* steps @return object to be used during process step.
*/
public String getInitialLookupQuery();
/**
* This method gets called during Job Restart. The restart token should be used
* to create an JPQL query that will retrieve previously unprocessed records.
* Typically the restart token would be the primary key in the table and the
* query would get all rows with primary key value > restarttoken
* @param restartToken
* @return The restart query
*/
public String getRestartQuery(String restartToken);
/**
* This method gets called just before a checkpoint is taken.
* @return The method should return a string value identifying the last record
* read by the stream.
*/
public String getRestartTokens();
}