throws TorqueException
{
org.apache.torque.criteria.Criteria c = buildCriteria(crit);
// TODO use BasePeerImpl.doSelect instead of parsing the result manually
String query = SqlBuilder.buildQuery(c).toString();
RecordMapper<List<Object>> mapper = new ObjectListMapper(resultTypes);
Statement statement = null;
ResultSet resultSet = null;
List<List<Object>> rows = new ArrayList<List<Object>>();
try
{
statement = conn.createStatement();
long startTime = System.currentTimeMillis();
logger.debug("Executing query " + query);
resultSet = statement.executeQuery(query.toString());
long queryEndTime = System.currentTimeMillis();
logger.trace("query took " + (queryEndTime - startTime)
+ " milliseconds");
while (resultSet.next())
{
List<Object> rowResult = mapper.processRow(resultSet, 0, null);
rows.add(rowResult);
}
long mappingEndTime = System.currentTimeMillis();
logger.trace("mapping took " + (mappingEndTime - queryEndTime)
+ " milliseconds");