super(dao);
}
@Override
public void validate(Noticia entity) throws ServiceBusinessException {
Noticia entityToValidate = new Noticia();
entityToValidate.setTitulo(entity.getTitulo());
entityToValidate.setId(entity.getId());
entityToValidate.setAtivo(true);
ServiceUniqueEntityValidator<Noticia, NoticiaDao> uniqueEntityValidator = ServiceUniqueEntityValidator.create(dao);
uniqueEntityValidator.validate(entityToValidate, String.format("A Noticia com o título informado (%s) já está cadastrado", entityToValidate.getTitulo()));
}