Examples of Galpao


Examples of br.com.granja.dominio.Galpao

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

Examples of br.com.granja.dominio.Galpao

        ServiceUniqueEntityValidator<Galpao, GalpaoDao> uniqueEntityValidator = ServiceUniqueEntityValidator.create(dao);
        uniqueEntityValidator.validate(entityToValidate, String.format("O galpão com a descrição informada (%s) já está cadastrado", entityToValidate.getDescricao()));
    }
   
    public List<Galpao> findByAtivos(){
    Galpao g = new Galpao();
    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.