Package br.com.granja.dominio

Examples of br.com.granja.dominio.Compras


    }
   
    @Override
    public void validate(Vendas entity) throws ServiceBusinessException {
        super.validate(entity);
      Compras entityToValidate = new Compras();
        entityToValidate.setAtivo(true);
        entityToValidate.setId(entity.getId());
       
        if(entity.isParcelado() && (entity.getParcelas() == null || entity.getParcelas() == 0))
          throw new ServiceBusinessException("O campo parcelas não pode ser vazio.");
       
        if(entity.getItens() == null || entity.getItens().size() == 0)
View Full Code Here


    }
   
    @Override
    public void validate(Compras entity) throws ServiceBusinessException {
       
      Compras entityToValidate = new Compras();
        entityToValidate.setAtivo(true);
        entityToValidate.setId(entity.getId());
       
       
        if(entity.getItens() == null || entity.getItens().size() == 0)
          throw new ServiceBusinessException("Nenhum item foi adicionado.");
        else{
View Full Code Here

      }
      return false;
    }
   
    public List<Compras> findByAtivos(){
      Compras g = new Compras();
    g.setAtivo(true);
   
    return dao.findByAttributes(g);
  }
View Full Code Here

TOP

Related Classes of br.com.granja.dominio.Compras

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.