}
public PreparedStatement prepareStatement(ResultSet rs,
PreparedStatement statement, List<String> messages)
throws Exception {
Inscricao i = (Inscricao) getObject(rs);
statement.setLong(1, i.getId());
statement.setDate(2, new java.sql.Date(i.getTimestamp().getTime()));
statement.setNull(3, Types.NULL);
if (!(i.getTurma() == null)) {
statement.setLong(4, i.getTurma().getId());
} else {
statement.setNull(4, Types.NULL);
messages.add("Registro de INSCRICAO (id: " + i.getId()
+ ") com chave estrangeira de Turma = NULL");
}
if (!(i.getUsuario() == null)) {
statement.setLong(5, i.getUsuario().getId());
} else {
statement.setNull(5, Types.NULL);
messages.add("Registro de INSCRICAO (id: " + i.getId()
+ ") com chave estrangeira de Usuario = NULL");
}
return statement;
}