Under classic Cúram, you would have created a call to the generated "entity" method as follows:
// ...
public SomeEntitySummaryDetailsList listSomeEntityDetails()
throws AppException, InformationalException {
// create an instance of the return struct
final SomeEntitySummaryDetailsList list =
new SomeEntitySummaryDetailsList();
// objects for reading the database
final SomeEntity someEntityObj =
SomeEntityFactory.newInstance();
final SomeEntityDtlsList someEntityDtlsList;
// do the read
someEntityDtlsList = someEntityObj.readAll();
// map the details returned
for (int i = 0; i < someEntityDtlsList.dtls.size(); i++) {
final SomeEntitySummaryDetails someEntitySummaryDetails =
new SomeEntitySummaryDetails();
someEntitySummaryDetails.assign(
someEntityDtlsList.dtls.item(i));
list.details.addRef(someEntitySummaryDetails);
}
// return to the client
return list;
}
// ...
How do you list all rows from a database table using a service-layer API (developed using the Persistence Infrastructure)?