Code example for ResultSet

Methods: getIntgetRowgetStringnext

0
        int countResult = 0;
        ResultSet rs = this.databaseHandler.executeQuery(
                "BET_SPOT_SELECT_BY_ID", 
                new String[]{"spotId"},
                new Object[]{spotId});
        rs.next();
        countResult = rs.getRow();
        if (countResult == 1) {
            result = new Spots();
            result.setSpotId(rs.getInt("bet_spot_id"));
            result.setSpotName(rs.getString("name"));
            result.setPatternId(rs.getInt("bet_pattern_id"));
        } 
        return result;
    }             
     
     
    //<editor-fold defaultstate="collapsed" desc="Encapsulate fields"> 
    /** 
     * @return the spotId 
Experience pair programming with AI  Get Codota for Java