public Long insert(Complaint complaint) throws ObjectNotValidException,//change return int to Long
ObjectAlreadyInsertedException, ObjectNotValidException, RepositoryException {
this.validate(complaint);
if (complaintRep.exists(complaint.getCodigo())) {
throw new ObjectAlreadyInsertedException("Complaint code already registered");
}
return complaintRep.insert(complaint);
}