fLogger.finest("Parent constructor arg values, minus children : " + ctorArgsMinusChildren);
//build a child for each collection of rows that belongs to the given parent
//identify new parents using changes in FIRST col only
Constructor<?> childCtor = ModelCtorUtil.getConstructor(fChildClass, fNumColsForChildList);
Id parentId = new Id(aRow.getString(FIRST_COLUMN));
fLogger.finest("Building Child List for Parent Id: " + parentId);
Id currentId = null;
List<Object> childList = new ArrayList<Object>();
do {
addChildToList(childCtor, childList, aRow);
aRow.next();
if ( ! aRow.isAfterLast() ){
currentId = new Id(aRow.getString(FIRST_COLUMN));
fLogger.finest("Updated current id: " + currentId);
}
}
while( !aRow.isAfterLast() && currentId.equals(parentId) );
//back up to PREVIOUS row, in preparation for next section/full model object, if any.
aRow.previous();
return buildFinalModelObjectWithChildList(parentCtor, ctorArgsMinusChildren, childList);
}