Examples of Tiporacao


Examples of br.com.granja.dominio.Tiporacao

    }

    @Override
    public void validate(Tiporacao entity) throws ServiceBusinessException {
        // carrega o objeto para validação da descrição do tipo de ração
      Tiporacao entityToValidate = new Tiporacao();
        entityToValidate.setDescricao(entity.getDescricao());
        entityToValidate.setId(entity.getId());
        entityToValidate.setAtivo(true);
       
        // valida descrição
        ServiceUniqueEntityValidator<Tiporacao, TiporacaoDao> uniqueEntityValidator = ServiceUniqueEntityValidator.create(dao);
        uniqueEntityValidator.validate(entityToValidate, String.format("O tipo de ração com a descrição informada (%s) já está cadastrado", entityToValidate.getDescricao()));
       
        // valida itens
        if(entity.getItens() == null || entity.getItens().size() == 0)
          throw new ServiceBusinessException("Nenhum item foi adicionado.");
        else{
View Full Code Here

Examples of br.com.granja.dominio.Tiporacao

      }
      return false;
    }
   
    public List<Tiporacao> findByAtivos(){
      Tiporacao g = new Tiporacao();
    g.setAtivo(true);
   
    return dao.findByAttributes(g,0,0,"descricao",true);
  }
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.