Code example for BeanPropertyRowMapper

0
    } 
     
    @Override 
    public List<Concept> listarTodos() { 
        try{ 
            return getJdbcTemplate().query("select * from sunat_concept ",  
                    new BeanPropertyRowMapper<Concept>(Concept.class)); 
        }catch (EmptyResultDataAccessException e){ 
            return null; 
        } 
    } 
 
    @Override 
    public Integer insertar(Concept object) { 
        getJdbcTemplate().update( 
                "insert into sunat_concept(name) values(?)", 
                object.getName()); 
        Integer id = getJdbcTemplate().queryForInt("Select last_insert_id()"); 
        object.setId(id); 
        return id;