* caso n�o seja encontrada uma queixa com o c�digo
* especificado.
*/
private SpecialComplaint accessSpecial(Long code) throws RepositoryException,
ObjectNotFoundException {
SpecialComplaint complaint;
String sql = null;
try {
complaint = new SpecialComplaint();
// fazer join para acessar as duas tabelas
sql = "select * from scbs_queixa q, scbs_queixadiversa qd where q.codigo=qd.codigo and q."
+ "codigo = '" + code + "'";
Statement stmt = (Statement) this.mp.getCommunicationChannel();
resultSet = stmt.executeQuery(sql);
if (resultSet.next()) {
accessComplaint(resultSet, complaint);
complaint.setTimestamp((new Long(resultSet.getString("ts"))).longValue());
complaint.setIdade(resultSet.getShort("idade"));
complaint.setInstrucao(resultSet.getString("instrucao"));
complaint.setOcupacao(resultSet.getString("ocupacao"));
Address endO = addressRep.search((new Long(resultSet
.getString("enderecoocorrencia")).longValue()));
complaint.setEnderecoOcorrencia(endO);
} else {
throw new ObjectNotFoundException(ExceptionMessages.EXC_FALHA_PROCURA);
}
resultSet.close();
stmt.close();