com.ibm.websphere.batch.devframework.datastreams.patternadapter

Interface JPAReaderPattern


  1. public interface JPAReaderPattern

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
fetchRecord(java.util.Iterator listIt)
This method should retrieve values for the various columns for the current row from the given resultset object.
  1. java.lang.String
getInitialLookupQuery()
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
  1. java.lang.String
getRestartQuery(java.lang.String restartToken)
This method gets called during Job Restart.
  1. java.lang.String
getRestartTokens()
This method gets called just before a checkpoint is taken.
  1. void
initialize(java.util.Properties props)
This method is invoked during the job setup phase.

Method Detail

initialize

  1. void initialize(java.util.Properties props)
This method is invoked during the job setup phase.
Parameters:
props - properties provided in the xJCL

fetchRecord

  1. java.lang.Object fetchRecord(java.util.Iterator listIt)
This method should retrieve values for the various columns for the current row from the given resultset object. Typically this data would be used to populate an intermediate object which would be returned
Parameters:
listIt -
Returns:

getInitialLookupQuery

  1. java.lang.String getInitialLookupQuery( )
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
Returns:
object to be used during process step.

getRestartQuery

  1. java.lang.String getRestartQuery( java.lang.String restartToken)
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
Parameters:
restartToken -
Returns:
The restart query

getRestartTokens

  1. java.lang.String getRestartTokens( )
This method gets called just before a checkpoint is taken.
Returns:
The method should return a string value identifying the last record read by the stream.