}
public PreparedStatement prepareStatement(ResultSet rs,
PreparedStatement statement, List<String> messages) throws Exception {
Conteudo con = (Conteudo) getObject(rs);
statement.setLong(1, con.getId());
statement.setDate(2, new java.sql.Date(con.getTimestamp().getTime()));
statement.setString(3, con.getDescricao());
statement.setInt(4, con.getHorasAula());
statement.setString(5, con.getNome());
statement.setNull(6, Types.NULL);
if (!(con.getCurso() == null)){
statement.setLong(7, con.getCurso().getId());
} else {
statement.setNull(7, Types.NULL);
messages.add("Registro de CONTEUDO (id: " + con.getId()
+ ") com chave estrangeira de Curso = NULL");
}
return statement;
}