Exemple #1
0
  @Override
  public Insert getInsert() {
    return Insert.into("BANCO.ALUNO")
        .value("NOME", nome)
        .value("MATRICULA", matricula)
        .value("CURSO_ID", curso.getId())
        .value("DATA_CRIACAO", dataDeCriacao)
        .onGeneratedKey(
            new GeneratedKeyCallback() {

              @Override
              public void set(ResultSet rs) throws SQLException {
                id = rs.next() ? rs.getInt(1) : 0;
              }
            });
  }
 @Override
 Insert setValue(Insert insert) {
   return insert.value("VALUE", value);
 }