• [eVista]EntityHandle, ModelEntity, ModelEntityBean, MTIObject


    item_handle to EntityHandle

    import com.sdrc.metaphase.enterprise.es.base.Accessor;

    Accessor accessor = (Accessor)esManager.getProcessor("base.Accessor", esSession);

    EntityHandle entity_handle = accessor.reconstructEntityHandle(item_handle);

    EntityHandle to MTIObject

    import COM.metaphasetech.mot.MTIObject;

    MTIObject obj = ProcessorImpl. getMTIObject(entity_handle);

    item_handle to MTIObject

    MTIObject obj = ProcessorImpl.getMTIObject(item_handle);

    item_handle to ModelEntity

    import com.sdrc.metaphase.enterprise.es.base.ModelEntity;

    ModelEntity

       Accessible

    Accessor accessor = (Accessor)esManager.getProcessor(“base.Accessor”, esSession);

    EntityHandle entity_handle = accessor.reconstructEntityHandle(item_handle);

    Accessible model_entity = accessor.get(entity_handle);

    MTIObject to ModelEntity

    import COM.metaphasetech.mot.MTIObject;

    import com.sdrc._metaphase.enterprise.es_evista.base.ModelEntity;

    MTIObject obj = …;

    ModelEntity me = new ModelEntity(obj);

    How to get Attribute from MTIObject

    MTIObject obj;

    Object partNumber = obj.getInternalObject().getAttribute("PartNumber");

    How to get Attribute from EntityHandle

    Frist, convert EntityHandle to ModelEntity:

    ModelEntity model_entity = accessor.get(entity_handle);

    Second, convert ModelEntity to ModelEntityBean:

    ModelEntityBean bean = ModelEntityBeanFactory.createModelEntityBean(action_context, arguments, model_entity);

    At last, get Attribute from bean:

    Object partNumber = bean.getItemAttributeValue("PartNumber");

     

    ObjectSet from cs to bs

    MTIObjectVector is returned while call cs;

    ArrayList list = new ArrayList();

    For each MTIObject item in MTIObjectVector

    {

    convert item to ModelEntity(way is involved before);

    add the ModelEntity to list;

    }

     

    Use system action chain to convert list to ModelEntityContainerBean;

    // chain id is “eds_mwau_act_chain_prepare_collection_for_display”

  • 相关阅读:
    unicode编码表
    范仁义js课程---17、赋值运算符
    如何从Apache官网下载windows版apache服务器
    php开发工具zendstudio13破解补丁
    如何彻底删除SVN中的文件和文件夹(附恢复方法)
    proguard.cfg 配置文件
    VMware-workstation-full-12.0.1-3160714
    《吉他自学三月通》学习指导
    [Windows] Adobe Photoshop CC 2015官方原版下载 附破解补丁&破解教程
    【求神——唐伯虎点秋香】
  • 原文地址:https://www.cnblogs.com/hcfalan/p/590664.html
Copyright © 2020-2023  润新知