Examples of SegmentoItemSgti


Examples of ecar.pojo.SegmentoItemSgti

     * @since N/C
     * @version N/C
     * @throws ECARException
     */
  private void carregarSuperDestaqueArtigos() throws ECARException {
    SegmentoItemSgti seg = this.getSegmentoItemDao().getSegmentoItemSuperDestaque(
        this.getRequest().getSession().getServletContext());
   
    if(seg != null) {
      SecaoBean secaoBean = new SecaoBean();
     
      secaoBean.setId(ID_SECAO_SUPER_DESTAQUE);
      secaoBean.setTitulo(seg.getTituloSgti());
     
      ArrayList list = new ArrayList();
     
      InformacaoBean info = new InformacaoBean();
      info.setDataHora(Data.parseDate(seg.getDataItemSgti()));
      info.setDescricao(seg.getLinhaApoioSgti());
      info.setImagem(new ecar.dao.ConfiguracaoDao(null).getConfiguracao().getRaizUpload() + seg.getImagemCapaSgti());
      info.setLink(seg.getSegmentoItemLeiauteSgtil().getLinkSgtil());
      info.setLinkMais("ctrl_artigos.jsp");
      info.setTitulo(seg.getLegendaImagCapaSgti());
      info.setCodSgti(seg.getCodSgti());
      info.setFonte(seg.getSegmentoItemFonteSgtif().getDescricaoSgtif());
     
      list.add(info);
     
      secaoBean.setInformacaoBean(list);

View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

    secaoBean.setId(ID_SECAO_MAIS_ARTIGOS);
   
    ArrayList aList = new ArrayList();
   
    while(it.hasNext()) {
      SegmentoItemSgti seg = (SegmentoItemSgti)it.next();
           
      InformacaoBean info = new InformacaoBean();
      info.setDataHora(Data.parseDate(seg.getDataItemSgti()));
     
      String linha = seg.getLinhaApoioSgti();
     
      if (linha.length() >= 50){
        for (int i = 50; i > 0; i--) {
          if (linha.charAt(i)==' ') {
            linha = Util.substring(linha, 0, i)+"...";
            break;
          }
        }       
      }           
      info.setDescricao(linha);     
      info.setTitulo(seg.getTituloSgti());
      info.setDataHora(Data.parseDate(seg.getDataItemSgti()));
      info.setCodSgti(seg.getCodSgti());
      info.setLink(seg.getSegmentoItemLeiauteSgtil().getLinkSgtil());
     
      aList.add(info);     
    }
    secaoBean.setInformacaoBean(aList);
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

      secaoBean.setId(ID_SECAO_TAXACAO_CLIP);
     
      ArrayList aList = new ArrayList();
     
      while(it.hasNext()) {
        SegmentoItemSgti seg = (SegmentoItemSgti)it.next();
             
        InformacaoBean info = new InformacaoBean();
        info.setDataHora(Data.parseDate(seg.getDataItemSgti()));
        info.setDescricao(seg.getSegmentoItemFonteSgtif().getDescricaoSgtif());
        info.setTitulo(seg.getTituloSgti());
        SegmentoItemLeiauteSgtil leiaute = seg.getSegmentoItemLeiauteSgtil();
        info.setLink(leiaute!=null?leiaute.getLinkSgtil():"ctrl_taxacao.jsp"); //TODO: retirar ctrl_taxacao.jsp
        info.setCodSgti(seg.getCodSgti());
       
        aList.add(info);     
      }     
      secaoBean.setInformacaoBean(aList);
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

       
       
        if(pesquisa.size() > 0){
             Iterator it = pesquisa.iterator();
             while(it.hasNext()){
                  SegmentoItemSgti sgti = (SegmentoItemSgti) it.next();
                  sgti.getSegmentoItemTpacesSgtitas().size();
                  sgti.getSegmentoSisAtribSgtsas().size();
                  sgti.getSegmentoSgt().getSegmentoCategoriaSgtcs().size();
                 
                  if(sgti.getSegmentoSgt().getSisGrupoAtributoSga() != null)
                    sgti.getSegmentoSgt().getSisGrupoAtributoSga().getSisAtributoSatbs().size();
             }          
        }
        return pesquisa;
      }catch(Exception e){
            this.logger.error(e);
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

           
            List lista = query.list();
            Iterator it = lista.iterator();
           
            if(it.hasNext()){
              SegmentoItemSgti segItem = (SegmentoItemSgti) it.next();
              return segItem;
            }
        //}
       
        return null;
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

      List lista = new ArrayList();
      try{
        Mensagem properties = new Mensagem(application);
       
        Date dataAtual = Data.getDataAtual();
        SegmentoItemSgti segItemSuper = getSegmentoItemSuperDestaque(application);

        String todos = null;
        try
          todos = Pagina.getParamStr(request, "todos")
        }catch(NullPointerException ne){
          //n�o � necess�rio logar exce��o aqui
        }
       
        StringBuilder select = new StringBuilder("select i from SegmentoItemSgti i where i.indAtivoSgti = 'S' ")
                  .append(" and ( i.dataIniValidadeSgti <= :dataAtual")
                  .append(" and i.dataFimValidadeSgti >= :dataAtual )")
                  .append(" and i.segmentoSgt.codSgt = :codSgt ")
                  .append("and ((i.indUtilizTpAcessoSgti = 'N') or ")
                  .append("(i.indUtilizTpAcessoSgti = 'S' and i.codSgti in (")
                  .append("select b.comp_id.codSgti from SegmentoItemTpAcesSgtITA b ")
                  .append("where b.comp_id.codSatb in (")
                  .append("select a.comp_id.codSatb from UsuarioAtributoUsua a ")
                  .append("where a.comp_id.codUsu = :codUsu))))");
       
       
      if ((segItemSuper != null)&&(todos == null)){
          select.append(" and i.codSgti != :codSgti");
          select.append(" and i.indSuperDestaqueSgti = 'S' ");
      }
             
      if (todos == ""){
        select.append(" and ((i.indDestaqueSgti = 'S') or (i.indDestaqueSgti = 'N' and i.indSuperDestaqueSgti = 'S')) ");
      }
     
      String order = " order by i.dataItemSgti desc";
               
        Query query = this.getSession().createQuery(select + order);
      query.setLong("codSgt", Long.valueOf(properties.getMensagem("admPortal.materias")).longValue());
          query.setDate("dataAtual", dataAtual);
          query.setLong("codUsu", usuario.getCodUsu().longValue());
                   
          if ((segItemSuper != null)&&(todos == null))
        query.setLong("codSgti", segItemSuper.getCodSgti().longValue());              
         
          String qtd = null, qtdPag = null, numPag = null;
         
          try {
            qtd = Pagina.getParamStr(request, "qtd");
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

    public List getTaxacaoClip(ServletContext application){
      List lista = new ArrayList();
      try{
       
        Date dataAtual = Data.getDataAtual();
        SegmentoItemSgti segItemSuper = getSegmentoItemSuperDestaque(application);

        StringBuilder select = new StringBuilder("select segItem from SegmentoItemSgti segItem")
                  .append(" where segItem.segmentoSgt.codSgt = :codSgt")
                  .append(" and ( segItem.dataIniValidadeSgti <= :dataAtual")
                  .append(" and segItem.dataFimValidadeSgti >= :dataAtual )");
      if (segItemSuper != null) {
        select.append(" and segItem.codSgti != :codSgti");
      }
     
      select.append(" order by segItem.dataItemSgti desc");
         
      Query query = this.getSession().createQuery(select.toString());
      query.setLong("codSgt", 2);
          query.setDate("dataAtual", dataAtual);
          if (segItemSuper != null)
        query.setLong("codSgti", segItemSuper.getCodSgti().longValue());
          query.setMaxResults(3);
         
          lista = query.list();
         
          return lista;
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

      List lista = new ArrayList();
      try{
        Mensagem properties = new Mensagem(application);
       
        Date dataAtual = Data.getDataAtual();
        SegmentoItemSgti segItemSuper = getSegmentoItemSuperDestaque(application);
        String todos = null;
        todos = Pagina.getParamStr(request, "todos");
       
        StringBuilder select = new StringBuilder("select i from SegmentoItemSgti i where i.indAtivoSgti = 'S' ")
                .append(" and ( i.dataIniValidadeSgti <= :dataAtual")
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

            lista = query.list()
           
            if (lista.size() > 0)  {
              Iterator it = lista.iterator();             
                while(it.hasNext()){
                SegmentoItemSgti sgti = (SegmentoItemSgti) it.next();
                  
                  Set atb = sgti.getSegmentoSisAtribSgtsas();
                  
                  if ((atb != null)&& !(atb.isEmpty())) {
                    Iterator itAtb = atb.iterator();             
                    while(itAtb.hasNext()){
                      SisAtributoSatb atributo = (SisAtributoSatb) itAtb.next();
View Full Code Here

Examples of ecar.pojo.SegmentoItemSgti

         
          List lista = query.list();
          Iterator it = lista.iterator();
         
          if(it.hasNext()){
            SegmentoItemSgti segItem = (SegmentoItemSgti) it.next();
            return segItem;
          }       
        return null;
      }catch(HibernateException e){
            this.logger.error(e);
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.