Package br.com.granja.dominio

Examples of br.com.granja.dominio.Tipobandeja


    @Override
    public void validate(Tipobandeja entity) throws ServiceBusinessException {
      if(entity.getQuantidade() == null || entity.getQuantidade().equals(BigDecimal.ZERO))
          throw new ServiceBusinessException("O campo quantidade não pode ser vazio");
     
      Tipobandeja entityToValidate = new Tipobandeja();
        entityToValidate.setDescricao(entity.getDescricao());
        entityToValidate.setId(entity.getId());
        entityToValidate.setAtivo(true);
       
        ServiceUniqueEntityValidator<Tipobandeja, TipobandejaDao> uniqueEntityValidator = ServiceUniqueEntityValidator.create(dao);
        uniqueEntityValidator.validate(entityToValidate, String.format("O tipo de bandeja com a descrição informada (%s) já está cadastrado", entityToValidate.getDescricao()));
    }
View Full Code Here


      e.printStackTrace();
    }
    }
   
    public List<Tipobandeja> findByAtivos(){
      Tipobandeja t = new Tipobandeja();
      t.setAtivo(true);
     
      return findByAttributes(t);
    }
View Full Code Here

TOP

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

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.