@QueryParam("position") String position,
@QueryParam("returns") String returns) {
if (LOG.isDebugEnabled()) {
LOG.debug("TRACK\t" + "\t/query/" + queryName + "/drillthrough\tGET");
}
QueryResult rsc;
ResultSet rs = null;
try {
Long start = (new Date()).getTime();
if (position == null) {
rs = thinQueryService.drillthrough(queryName, maxrows, returns);
} else {
String[] positions = position.split(":");
List<Integer> cellPosition = new ArrayList<Integer>();
for (String p : positions) {
Integer pInt = Integer.parseInt(p);
cellPosition.add(pInt);
}
rs = thinQueryService.drillthrough(queryName, cellPosition, maxrows, returns);
}
rsc = RestUtil.convert(rs);
Long runtime = (new Date()).getTime() - start;
rsc.setRuntime(runtime.intValue());
} catch (Exception e) {
LOG.error("Cannot execute query (" + queryName + ")", e);
String error = ExceptionUtils.getRootCauseMessage(e);
rsc = new QueryResult(error);
} finally {
if (rs != null) {
Statement statement = null;
Connection con = null;