Package ecar.pojo

Examples of ecar.pojo.SegmentoAgendaBean


  public List getItensDestaqueSubArea(DestaqueSubAreaDtqsa subArea) throws ECARException{
    List retorno = new ArrayList();
    Iterator it = subArea.getDestaqueItemRelDtqirs().iterator();
    while(it.hasNext()){
      DestaqueItemRelDtqir destaqueItem = (DestaqueItemRelDtqir) it.next();
      SegmentoAgendaBean segAgd = new SegmentoAgendaBean();
      segAgd.setCodigo(destaqueItem.getCodDtqir());
      if(destaqueItem.getAgendaOcorrenciaAgeo() != null){       
        segAgd.setDescricao(new AgendaOcorrenciaDao(request).getLabelExibicao(destaqueItem.getAgendaOcorrenciaAgeo()));
        segAgd.setData(destaqueItem.getAgendaOcorrenciaAgeo().getDataEventoAgeo());
      }     
      if(destaqueItem.getSegmentoItemSgti() != null){
        segAgd.setDescricao(destaqueItem.getSegmentoItemSgti().getTituloSgti());
        segAgd.setData(destaqueItem.getSegmentoItemSgti().getDataItemSgti());
      }
      retorno.add(segAgd);
          Collections.sort(retorno,
                new Comparator() {
                public int compare(Object o1, Object o2) {
                  SegmentoAgendaBean sa1 = (SegmentoAgendaBean) o1;
                  SegmentoAgendaBean sa2 = (SegmentoAgendaBean) o2;
                    return sa1.getData().compareTo(sa2.getData());
                }
       } );         
    }
    return retorno;
  }
View Full Code Here


    List retorno = new ArrayList();

    Iterator itS = segmentos.iterator();
    while(itS.hasNext()){
      SegmentoSgt segmento = (SegmentoSgt) itS.next();
      SegmentoAgendaBean segAgd = new SegmentoAgendaBean();
      segAgd.setAgenda(false);
      segAgd.setSegmento(true);
      segAgd.setDescricao(segmento.getTituloSgt());
      segAgd.setCodigo(segmento.getCodSgt());
      retorno.add(segAgd);
    }
    List agendas = new AgendaDao(request).getAtivos();
    Iterator itA = agendas.iterator();
    while(itA.hasNext()){
      AgendaAge agenda = (AgendaAge) itA.next();
      SegmentoAgendaBean segAgd = new SegmentoAgendaBean();
      segAgd.setAgenda(true);
      segAgd.setSegmento(false);
      segAgd.setDescricao(agenda.getEventoAge());
      segAgd.setCodigo(agenda.getCodAge());
      retorno.add(segAgd);
    }
     
        Collections.sort(retorno,
              new Comparator() {
              public int compare(Object o1, Object o2) {
                SegmentoAgendaBean sa1 = (SegmentoAgendaBean) o1;
                SegmentoAgendaBean sa2 = (SegmentoAgendaBean) o2;
                  return sa1.getDescricao().compareToIgnoreCase(sa2.getDescricao());
              }
     } );   
    return retorno;
  }
View Full Code Here

TOP

Related Classes of ecar.pojo.SegmentoAgendaBean

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.