/** * Determines whether the specified connection is good to use. * @param con {@link Connection} instance to check for validity * @return true if the specified connection is good to use, false otherwise * @throws SQLException if the connection is invalid */ @Override public final boolean isValid(Connection con) throws SQLException { try(Statement st = con.createStatement(); ResultSet res = st.executeQuery(getQueryString())) { return checkResults(res); } }