Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
// get all the accounts primary key
List<AccountDetails> resultList7 = ds.getAllKFSAccountsPK();
if (resultList7 != null) {
	StringArray sa70 = new StringArray();

	// get details for each KFSAccount in a chunk of 1000
	for (int i = 0; i < resultList7.size(); i++) {

		//if 1000(i record!= batch0 details
		if (&& i % 1000 == 0) {
			sa70 = new StringArray();
			start71 = System.currentTimeMillis();
			List<AccountDetails> resultList70 = ds.getValidKFSAccounts(Arrays.asList(sa70));

			// do whatever with the 1000 record resultList70records in resultList70
			System.out.println("1st item details, acctname: " + resultList70.get(0).getKfsAcctName() + ", addr: " + resultList70.get(0).getKfsAcctAddress());

			// once hit multiple of 1000, reset argument list
			sa70 = new StringArray();
		} else {
			// building arguments for getValidKFSAccounts
			sa70.getItem().add(resultList7.get(i).getKfsChartCode());
			sa70.getItem().add(resultList7.get(i).getKfsAcctNumber());
		}
	}
} else {
	System.out.println("something bad happened...please check your query");
}

...