int numberOfResults,
boolean singleRecord,
Connection con)
throws TorqueException
{
QueryDataSet qds = null;
List results = Collections.EMPTY_LIST;
try
{
// execute the query
long startTime = System.currentTimeMillis();
qds = new QueryDataSet(con, queryString);
if (log.isDebugEnabled())
{
log.debug("Elapsed time="
+ (System.currentTimeMillis() - startTime) + " ms");
}
results = getSelectResults(
qds, start, numberOfResults, singleRecord);
}
catch (Exception e)
{
throwTorqueException(e);
}
finally
{
if (qds != null)
{
try
{
qds.close();
}
catch (Exception ignored)
{
}
}