Package br.com.granja.arq.validation

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


   
    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

    }
   
    @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

        for (ConstraintViolation<P> constraintViolation : constraintViolations) {
            errors.add(constraintViolation.getMessage());
        }
       
        if (!errors.isEmpty()) {
            throw new DomainConstraintException(errors);
        }
    }
View Full Code Here

TOP

Related Classes of br.com.granja.arq.validation.DomainConstraintException

Copyright © 2018 www.massapicom. 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.