}
public PreparedStatement prepareStatement(ResultSet rs,
PreparedStatement statement, List<String> messages)
throws Exception {
Presenca p = (Presenca) getObject(rs);
statement.setLong(1, p.getId());
statement.setDate(2, new java.sql.Date(p.getTimestamp().getTime()));
statement.setBoolean(3, p.getPresente());
statement.setNull(4, Types.NULL);
if (!(p.getEncontro() == null)) {
statement.setLong(5, p.getEncontro().getId());
} else {
statement.setNull(5, Types.NULL);
messages.add("Registro de PRESENCA (id: " + p.getId()
+ ") com chave estrangeira de Encontro = NULL");
}
if (!(p.getInscricao() == null)) {
statement.setLong(6, p.getInscricao().getId());
} else {
statement.setNull(6, Types.NULL);
messages.add("Registro de PRESENCA (id: " + p.getId()
+ ") com chave estrangeira de Inscri��o = NULL");
}
return statement;
}