bulk-operations

Business logic on multiple objects - where to put the loop?

...and how best to handle success/failure feedback to a view layer. Assuming that the business objects will be iterated over in the business logic method if the loop is put there (i.e. not a bulk update operation), code options in the view logic are: doBusinessLogic( Set businessObjects ) or for (businessObject : businessObjects) { ...

Handling errors and feedback when performing bulk operations in a multi-tiered architecture

Let's say you have a business logic method that can perform some operation across a number of objects. Maybe you want to call a lottery number picking web service, once for each person selected from a list. In Java, the code might look something like this: Set<Person> selectedPeople = ... // fetch list of people for ( Person person : se...