Examples of DomainConstraintException


Examples of br.com.granja.arq.validation.DomainConstraintException

          erros.add(String.format("O campo Tipo de Pessoa não pode ser vazio."));
       
        validateCPRF(erros);

        if (!erros.isEmpty()) {
            throw new ServiceBusinessException(new DomainConstraintException(erros));
        }
    }
View Full Code Here

Examples of br.com.granja.arq.validation.DomainConstraintException

   
    if(getNovaSenha() == null || getNovaSenha().isEmpty())
      erros.add("O campo Nova Senha não pode ser vazio");
   
        if (!erros.isEmpty()) {
            throw new ServiceBusinessException(new DomainConstraintException(erros));
        }else{
          getEntity().setSenha(novaSenha);
        }
   
  }
View Full Code Here

Examples of br.com.granja.arq.validation.DomainConstraintException

    }
   
    @Override
    public void addError(Throwable throwable) {
        if (throwable.getCause() instanceof DomainConstraintException) {
            DomainConstraintException cause = (DomainConstraintException) throwable.getCause();
            Collection<String> messages = cause.getMessages();
           
            if (Collections.isNotEmpty(messages)) {
                for (String message : messages) {
                    addError(message);
                }
View Full Code Here

Examples of br.com.granja.arq.validation.DomainConstraintException

        for (ConstraintViolation<P> constraintViolation : constraintViolations) {
            errors.add(constraintViolation.getMessage());
        }
       
        if (!errors.isEmpty()) {
            throw new DomainConstraintException(errors);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.