using: SNAPSHOT_v9.0d_2013-04-30/PowerEdition Deployment (built 2013-04-30)
I have this partially working function - please see my question in the "result.add" line:
.... or suggest any other approach to populate my result List.
I have this partially working function - please see my question in the "result.add" line:
Code:
private List<Integer> getAssetIdListForContainer(Integer containerId) {
// this interacts with a table having 2 fields:
// containerId
// assetId
// assetId values will be added to this list in the for each loop below
List<Integer> result = new ArrayList<Integer>();
// fetch all records for the given containerId
DSRequest container = new DSRequest("ContainersToAssets", "fetch");
container.setCriteria("containerId", containerId);
try {
List<Object> resp = container.execute().getDataList();
for (Object o : resp) {
// the fetch operation above finds 3 records, so this prints 3 times to my log
logIt("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
// here's where I'm stuck:
result.add( what goes in here to get the assetId value from the current record ??? )
}
return result;
} catch (Exception somethingBad) {
return null;
}
}
Comment