{
if(root.getResultType() instanceof SingleType)
{
SingleType type = (SingleType) root.getResultType();
MappedClassInfo mci = type.getMappedClassInfo();
System.out.println("##\nRoot-Result consists of only one mapped class: " + mci.getClassName() + "\n##");
for (SingleResult result : type.getResults())
{
Object firstObject = result.getObject();
displayMappedObject(mappedClassInfos, mci, firstObject, persistenCollectionClass);
}
}
else
{
System.out.println("##\nRoot-Result consists more than one mapped class\n##");
System.out.println("##Displaying result ordered by type:");
for (IType kidType : root.getResultType().getKidTypes())
{
SingleType type = (SingleType) kidType;
System.out.println("*Results for class: " + type.getMappedClassInfo().getClassName());
for (SingleResult queryResult : type.getResults())
{
MappedClassInfo mci = queryResult.getMappedClassInfo();
Object obj = queryResult.getObject();
displayMappedObject(mappedClassInfos, mci, obj, persistenCollectionClass);
}
}
System.out.println("##Displaying result ordered as read:\n");
ArrayList<? extends IResult> results = root.getResultType().getResults();
for (IResult result : results)
{
ArrayList<SingleResult> singleResults = ((TupelResult) result).getSingleResults();
System.out.println("##Displaying result block:");
for (SingleResult singleResult : singleResults)
{
MappedClassInfo mci = singleResult.getMappedClassInfo();
Object obj = singleResult.getObject();
displayMappedObject(mappedClassInfos, mci, obj, persistenCollectionClass);
}
}