protected void printOutput(Object results, Collection expected) {
if (!debug)
return;
Iterator iter = null;
PCPoint pcp = null;
if (results == null) {
logger.debug("Query returns null");
}
if (!(results instanceof Collection)) {
logger.debug("Query result is not a collection: " +
results.getClass().getName());
}
logger.debug("Retrived Objects are:");
iter = ((Collection)results).iterator();
while (iter.hasNext()) {
pcp = (PCPoint)iter.next();
logger.debug("X = " + pcp.getX() + "\tY = " + pcp.getY());
}
logger.debug("Expected Objects are:");
iter = ((Collection)expected).iterator();
while (iter.hasNext()) {
pcp = (PCPoint)iter.next();
logger.debug("X = " + pcp.getX() + "\tY = " + pcp.getY());
}
}