public void validate(Galpao entity) throws ServiceBusinessException {
if(entity.getCapacidade() == null || new BigDecimal(entity.getCapacidade()).equals(BigDecimal.ZERO))
throw new ServiceBusinessException("O campo capacidade não pode ser vazio");
Galpao entityToValidate = new Galpao();
entityToValidate.setDescricao(entity.getDescricao());
entityToValidate.setAtivo(true);
entityToValidate.setId(entity.getId());
ServiceUniqueEntityValidator<Galpao, GalpaoDao> uniqueEntityValidator = ServiceUniqueEntityValidator.create(dao);
uniqueEntityValidator.validate(entityToValidate, String.format("O galpão com a descrição informada (%s) já está cadastrado", entityToValidate.getDescricao()));
}