@Nullable private <T> T get(ResultSet rs, Expression<?> expr, int i, Class<T> type) throws SQLException { return configuration.get(rs, expr instanceof Path ? (Path<?>)expr : null, i, type); }
private <T> T executeWithKey(Class<T> type, @Nullable Path<T> path) { ResultSet rs = executeWithKeys(); try{ if (rs.next()) { return configuration.get(rs, path, 1, type); } else { return null; } } catch (SQLException e) { throw configuration.translate(e); }finally{ close(rs); } }
private <T> List<T> executeWithKeys(Class<T> type, @Nullable Path<T> path) { ResultSet rs = null; try { rs = executeWithKeys(); List<T> rv = new ArrayList<T>(); while (rs.next()) { rv.add(configuration.get(rs, path, 1, type)); } return rv; } catch (SQLException e) { throw configuration.translate(e); } finally { if (rs != null) { close(rs); } reset(); } }
private <T> List<T> executeWithKeys(Class<T> type, @Nullable Path<T> path) { ResultSet rs = null; try{ rs = executeWithKeys(); List<T> rv = new ArrayList<T>(); while (rs.next()) { rv.add(configuration.get(rs, path, 1, type)); } return rv; } catch (SQLException e) { throw configuration.translate(e); }finally { if (rs != null) { close(rs); } reset(); } }
private <T> T executeWithKey(Class<T> type, @Nullable Path<T> path) { ResultSet rs = null; try { rs = executeWithKeys(); if (rs.next()) { return configuration.get(rs, path, 1, type); } else { return null; } } catch (SQLException e) { throw configuration.translate(e); } finally { if (rs != null) { close(rs); } reset(); } }