posted 13 years ago
Hi
In our project I have situation where one method takes some parameters,
based on parameters(list of x kind of objects) in loop method calls database for each x object and validate details
if validation for all objects are thru method should return list of y objects,
if validation fails for one of the x object it should return validation error object( project specific object to details issue to end-user)
so here by same method in one situation we want to return list whereas in another condition we want to return single Validation object.
Important point to note here is there no common super class between List and validation object except "Object" class , which I don't should be good to return as generic return object.
please suggest how should I design method in this situation?
Mohit