}
Object connection = ((TransactionItf) pm.currentTransaction())
.getConnectionHolder();
//fetch the result as TupleCollection
TupleCollection queryResult = null;
if (qecs.length == 1) {
//optimization: avoid to use an intermediate class
queryResult = qecs[0].eval(pm, pos, connection, userqd);
if (queryResult == null || queryResult.isEmpty()) {
logger.log(BasicLevel.INFO,
"Be careful, the result is empty");
if (queryResult != null) {
queryResult.close();
}
JDOQueryResultCommon.closeConnection(connection);
if (qd.unique) {
return null;
} else {