Package org.jresearch.flexess.client.mappers

Examples of org.jresearch.flexess.client.mappers.IInstanceMapper


    assert po != null;
    String mapperId = EcoreUtil.getAnnotation(po, UamPackage.eNS_URI, IPObjectConstant.MAPPER_CLASS_NAME_ATTR);
    if (mapperId == null) {
      throw new UamClientException("Mapper is not specified");
    }
    IInstanceMapper mapper = mappers.get(mapperId);
    if (mapper == null) {
      throw new UamClientException(MessageFormat.format("Unable to create EObject: can''t find {0} mapper ", mapperId));
    }
    try {
      return mapper.createPObjectInstance(object, po);
    } catch (Exception e) {
      throw new UamClientException("Unable to create EObject", e);
    }
  }
View Full Code Here


  @Override
  public EObject getPOInstance(PObject po) {
    EObject eObject = null;
    try {
      IInstanceMapper mapper = new DefaultMapper();
      eObject = mapper.createPObjectInstance(null, po);
    } catch (Exception e) {
      throw new UamClientException("Unable to create EObject", e);
    }
    return eObject;
  }
View Full Code Here

  @Override
  public EObject getPOInstance(PObject po) {
    EObject eObject = null;
    try {
      IInstanceMapper mapper = new GenericMapper();
      eObject = mapper.createPObjectInstance(attributes, po);
    } catch (Exception e) {
      throw new UamClientException("Unable to create EObject", e);
    }
    return eObject;
  }
View Full Code Here

TOP

Related Classes of org.jresearch.flexess.client.mappers.IInstanceMapper

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.