Package ecar.pojo

Examples of ecar.pojo.ObjetoDemanda


                  
           boolean filtrarAtributoLivre = true;
         Iterator itAtributos = atributosLivres.iterator();
         //Filtrar pelos atributos livres definidos como filtros
         while (itAtributos.hasNext() && filtrarAtributoLivre){
           ObjetoDemanda atributoDemanda = (ObjetoDemanda) itAtributos.next();
           SisGrupoAtributoSga grupoAtributo = atributoDemanda.iGetGrupoAtributosLivres();
                     
           String nomeCampo = "a" + (grupoAtributo!=null?grupoAtributo.getCodSga().toString():"");
             String tipoCampo = grupoAtributo!=null?grupoAtributo.getSisTipoExibicGrupoSteg().getCodSteg().toString():"";
            
             //Se for CheckBox ou RadioButton ou ListBox, nao procura em InformacaoIettSatb
View Full Code Here


   * @return
   * @throws ECARException
   */
  public List getAtributosLivresDemandaEhFiltro(Long codVisao) throws ECARException{       
    List retorno = new ArrayList();   
    ObjetoDemanda atributoDemanda = new AtributoDemandaAtbdem();

        try {                    
     
          String hql = MessageFormat.format(Util.getHql(ConstantesECAR.PESQUISA_ATRIBUTOS_DEMANDA_VISAO_ATIVOS_QUE_SAO_FILTROS, request.getSession().getServletContext()), codVisao.toString(),"\'S\'", "\'S\'");
   
View Full Code Here

   
    linhaRetorno += pRegDemanda.getCodRegd().toString() +  separadorCampos +  separadorCampos;
   
    if(pAtributosOrdenadosIt != null) {
      while(pAtributosOrdenadosIt.hasNext()) {
        ObjetoDemanda atributo = (ObjetoDemanda) pAtributosOrdenadosIt.next();
       
        try {
          // Se for atributo livre pega valor pelo DemAtributoDemas
          if( atributo.iGetGrupoAtributosLivres() != null
              && (atributo.iGetGrupoAtributosLivres().getIndAtivoSga()!=null
                &&  atributo.iGetGrupoAtributosLivres().getIndAtivoSga().equals("S"))) {
           
            if(pRegDemanda.getDemAtributoDemas() != null) {
                  String separadorParaCamposMulti = "";
                  String separadorParaCamposCheck = "";
              //Iterador com os atributos livres da demanda em questao
                  Iterator<DemAtributoDema> itAtribLivres = pRegDemanda.getDemAtributoDemas().iterator();
                 
                  //Para cada atributo livre da demanda, verifica-se se este corresponde
                  //ao atributo que esta sendo tratado
                  while(itAtribLivres.hasNext()){
                    DemAtributoDema atributoDema = (DemAtributoDema) itAtribLivres.next();
                    //Iterador com os atributos livres associados ao atributo em quest�o
                    Iterator<SisAtributoSatb> sisAtributosSatbIt = atributo.iGetGrupoAtributosLivres().getSisAtributoSatbs().iterator();
                   
                    while (sisAtributosSatbIt.hasNext()) {
                      SisAtributoSatb sisAtributo = (SisAtributoSatb) sisAtributosSatbIt.next();
                      if( (sisAtributo).equals(atributoDema.getSisAtributoSatb()) ) {
                        //Caso seja um atributo tipo texto
                        if(atributoDema.getInformacao() != null) {
                         
                          String conteudoAtributoDemanda = atributoDema.getInformacao().replaceAll("\n", " ").replaceAll("\r"," ");
                         
                          if (sisAtributo.getSisGrupoAtributoSga().getSisTipoExibicGrupoSteg().getCodSteg().intValue() == Input.IMAGEM){
                            if (conteudoAtributoDemanda.indexOf("/") != -1){
                              conteudoAtributoDemanda = conteudoAtributoDemanda.substring(conteudoAtributoDemanda.lastIndexOf("/")+1);
                              if (conteudoAtributoDemanda.indexOf("--") != -1){
                                conteudoAtributoDemanda = conteudoAtributoDemanda.substring(conteudoAtributoDemanda.lastIndexOf("--")+3);
                              }
                            }
                          }
                         
                          linhaRetorno += separadorParaCamposMulti + conteudoAtributoDemanda;
                          separadorParaCamposMulti = this.separadorMultivalor;
                         

                         
                        //Caso seja atributo tipo check, radio ou select
                        } else if(atributoDema.getSisAtributoSatb().getDescricaoSatb() != null) {
                          linhaRetorno += separadorParaCamposCheck + (atributoDema.getSisAtributoSatb().getDescricaoSatb()).replaceAll("\n", " ").replaceAll("\r"," ");
                          separadorParaCamposCheck = this.separadorMultivalor;
                        //Caso n�o tenha valor associado ao atributo
                        } else {
                          linhaRetorno += "";
                        }
                      }
                    }
                  }
                  separadorParaCamposMulti = "";
                  separadorParaCamposCheck = "";
                }
          } else {
          // Se for campo fixo pega valor direto do atributo
            linhaRetorno +=  atributo.iGetValor(pRegDemanda).replaceAll("\n", " ").replaceAll("\r"," ");
          }
          // escreve o separador entre cada campo
          linhaRetorno += this.separadorCampos;
        } catch(ECARException e) {
        }   
View Full Code Here

    linhaRetorno += "ID_DEMANDA" + separadorCampos;
    linhaRetorno += "ID_ENCAMINHAMENTO" + separadorCampos;
   
    if(pAtributosOrdenadosIt != null) {
      while(pAtributosOrdenadosIt.hasNext()) {
        ObjetoDemanda atributo = (ObjetoDemanda) pAtributosOrdenadosIt.next();
       
          // Se for campo fixo pega valor direto do atributo
            linhaRetorno +=  atributo.iGetLabel().replaceAll("\n", " ").replaceAll("\r"," ");
            // escreve o separador entre cada campo
            linhaRetorno += this.separadorCampos;
          }
      }
View Full Code Here

     */
    public List getAtributosDemandaVisaoAtivosOrdenadosPorSequenciaTelaCampo( Long codVisao )
        throws ECARException
    {
        List retorno = new ArrayList(  );
        ObjetoDemanda atributoDemanda = new AtributoDemandaAtbdem(  );

        try
        {
            String hql =
                MessageFormat.format( Util.getHql( ConstantesECAR.PESQUISA_ATRIBUTOS_DEMANDA_VISAO_ATIVOS_POR_SEQLISTCADASTRO,
View Full Code Here

     */
    public List getAtributosDemandaVisaoAtivosOrdenadosPorSequenciaTelaListaDemandas( Long codVisao )
        throws ECARException
    {
        List retorno = new ArrayList(  );
        ObjetoDemanda atributoDemanda = new AtributoDemandaAtbdem(  );

        try
        {
            Long codigoUsuarioLogado =
                ( (ecar.login.SegurancaECAR) request.getSession(  ).getAttribute( "seguranca" ) ).getUsuario(  )
View Full Code Here

     */
    public List getAtributosDemandaVisaoAtivosOrdenadosPorSequenciaTelaListaDemandasIncluidasUsuarioLogado( Long codVisao )
        throws ECARException
    {
        List retorno = new ArrayList(  );
        ObjetoDemanda atributoDemanda = new AtributoDemandaAtbdem(  );

        try
        {
            Long codigoUsuarioLogado =
                ( (ecar.login.SegurancaECAR) request.getSession(  ).getAttribute( "seguranca" ) ).getUsuario(  )
View Full Code Here

     */
    public List getAtributosDemandaVisaoAtivosQueSaoFiltro( Long codVisao )
                                                    throws ECARException
    {
        List retorno = new ArrayList(  );
        ObjetoDemanda atributoDemanda = new AtributoDemandaAtbdem(  );

        try
        {
            String hql =
                MessageFormat.format( Util.getHql( ConstantesECAR.PESQUISA_ATRIBUTOS_DEMANDA_VISAO_ATIVOS_QUE_SAO_FILTROS,
View Full Code Here

     */
    public List getAtributosDemandaAtivosPorGrupo( SisGrupoAtributoSga sisGrupoAtributoSga )
                                           throws ECARException
    {
        List retorno = new ArrayList(  );
        ObjetoDemanda atributoDemanda = new AtributoDemandaAtbdem(  );

        try
        {
            StringBuilder query =
                new StringBuilder( "select atributoDemanda from AtributoDemandaAtbdem as atributoDemanda" ).append( " where atributoDemanda.indAtivoAtbdem = 'S'" )
View Full Code Here

           
                    
            if(atributos != null){
                Iterator it = atributos.iterator();
                while(it.hasNext()){
                    ObjetoDemanda objetoDemanda = (ObjetoDemanda) it.next();
                    if(objetoDemanda.iGetGrupoAtributosLivres() != null){
                      geraValidacaoAtributoLivre(objetoDemanda);
                  }
                    else {
                      try {
                          this.getClass().
                            getMethod("geraValidacao" + Util.primeiraLetraToUpperCase(objetoDemanda.iGetNome()), new Class[] { ObjetoDemanda.class }).
                              invoke(this, new Object[] { objetoDemanda });                                                   
                      }
                      catch(Exception e) {
                          Logger logger = Logger.getLogger(this.getClass());
                          logger.error(e);
View Full Code Here

TOP

Related Classes of ecar.pojo.ObjetoDemanda

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.