The steps that you follow to define your own specialized readmulti operations are as follows:
static class MyReadmultiOperation extends curam.util.dataaccess.ReadmultiOperation { public boolean operation(Object objDtls) throws AppException, InformationalException { // No implementation for the moment return true; } }
If your readmulti operation processes large numbers of records then this could cause an excessive memory usage overhead; so caution is advised if using specialized readmulti operations in conjunction withPost Data Access orOn-fail operations.
In general, always return true from readmulti operations. In unusual cases, where you want to stop processing before you hit the end of the record set, return false. This means the operation method will not be called again.
// instance of specialized operation class MyReadMultiOperation op = new MyReadMultiOperation(); // instance of readmulti key structure EReadmultiKey key; // set key fields for search key.id = 99; // construct helper and call operation E.newInstance().readmultiHelper(key, op);
Each generated readmulti function is associated with a generated "helper" class which exists solely for use in code like that above. The helper class is scoped inside the entity class and has an execute method that begins a readmulti.