public Client select(Long id) throws SQLException { PreparedStatement ps = OracleConnection.getConnection().prepareStatement("SELECT * from Client WHERE id = ?"); ps.setLong(1, id); ResultSet rs = ps.executeQuery(); Client resClient = new Client(); resClient.setId(id); resClient.setFirstName(rs.getString(1)); resClient.setSecondName(rs.getString(2)); resClient.setEmail(rs.getString(3)); return resClient; }