@Override public void close() { try { result.close(); } catch (QueryEvaluationException e) { throw new RuntimeException(e); } }
@Override public void handleClose() throws QueryEvaluationException { try { super.handleClose(); } finally { queryResult.close(); } } }
@Override public void close() throws QueryEvaluationException { try { result.close(); } finally { try { connection.close(); } catch (RepositoryException e) { throw new QueryEvaluationException("Exception closing connection.", e); } } }
/** * Returns a single element from the query result. The QueryResult is automatically closed by this method. * * @return a single query result element. * @throws QueryEvaluationException */ public static Statement singleResult(GraphQueryResult result) throws QueryEvaluationException { Statement singleResult = null; try { if (result.hasNext()) { singleResult = result.next(); } } finally { result.close(); } return singleResult; }
/** * Returns a single element from the query result. The QueryResult is automatically closed by this method. * * @return a single query result element. * @throws QueryEvaluationException */ public static Statement singleResult(GraphQueryResult result) throws QueryEvaluationException { Statement singleResult = null; try { if (result.hasNext()) { singleResult = result.next(); } } finally { result.close(); } return singleResult; }
/** * Returns a single element from the query result. The QueryResult is automatically closed by this method. * * @return a single query result element. * @throws QueryEvaluationException */ public static Statement singleResult(GraphQueryResult result) throws QueryEvaluationException { Statement singleResult = null; try { if (result.hasNext()) { singleResult = result.next(); } } finally { result.close(); } return singleResult; }
gqr.close();
gRes.close();
result.close();
result.close();
result.close();
result.close();
result.close();
result.close();