Package jifx.commons.mapper.domain

Examples of jifx.commons.mapper.domain.MapElement


     * @see jifx.connection.mapper.Mapper#getMap(java.lang.String)
     */
    public MapElement getMapElement(String context, String key) {
        try {
          Query query = manager.createQuery("from MapElement m where m.context='"+context+"' and m.key='"+key+"'");
          MapElement mapElement = (MapElement) query.getSingleResult();
          return mapElement;
        } catch(NoResultException e) {
          return null;
        }
    }
View Full Code Here


      env.put("java.naming.factory.initial",
        "org.jboss.naming.NamingContextFactory");
      env.put("java.naming.provider.url", "localhost:1099");
      context = new InitialContext(env);
      IMapper remote = (IMapper) context.lookup("MapperImp/remote");
      MapElement element = new MapElement();
      element.setKey("858");
      element.setValue("UY");
      element.setDescription("C�digo de moneda en pesos");
      remote.addMapping(element);
      MapElement mm = remote.getMapElement("m","858");
      System.out.println("Moneda: " + mm.getValue());
  } catch (NamingException e) {
      e.printStackTrace();
  }
    }
View Full Code Here

          if (matcher.matches()) {
            String ctx = matcher.group(1);
            String valKey = matcher.group(2);
            if (matcher.groupCount() > 2) {    //Ejecuta com. de tipo $M{ctx, $valKey(idx)}
              int idx = Integer.valueOf(matcher.group(3));
              MapElement element = mapper.getMapElement(ctx, variables.get(valKey)[idx]);
              if (element != null)
                valorObtenido = element.getValue();
            } else {              //Ejecuta com. de tipo $M{ctx, valKey}
              MapElement element = mapper.getMapElement(ctx, valKey);
              if (element != null)
                valorObtenido = element.getValue();
            }
          }
        }
        else
        if (tipoKey.equals("F")) {          //Ejecuta com. de tipo $F{SYSDATE}
View Full Code Here

TOP

Related Classes of jifx.commons.mapper.domain.MapElement

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.