zoukankan      html  css  js  c++  java
  • Teamcenter SOA开发源码: 打印对象信息

    import com.teamcenter.clientx.AppXSession;
    import com.teamcenter.services.strong.core.DataManagementService;
    import com.teamcenter.soa.client.model.ServiceData;
    import com.teamcenter.soa.client.model.ModelObject;
    import com.teamcenter.soa.exceptions.NotLoadedException;
     
     
        public void printObject_strings(ModelObject[] objects)
        {
            DataManagementService  dmService = DataManagementService.getService(AppXSession.getConnection());
            if (objects.length == 0) return;
            String[] attributes = {"object_string"};
            dmService.getProperties(objects, attributes);
            for (int i = 0; i < objects.length; i++)
            {
                String type = objects[i].getTypeObject().getName();
                String objectString = "";
                if (objects[i].getTypeObject().isInstanceOf("POM_object"))
                {
                    try
                    {
                        objectString = wo.getPropertyObject("object_string").getStringValue();
                    }
                    catch (NotLoadedException e) {} // just ignore
                }
                System.out.println("    " + objectString + "(" + type + ")" );
            }
        }
    ————————————————
    版权声明:本文为CSDN博主「沃隆先生」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/u014457991/article/details/104740081
    

      

  • 相关阅读:
    权限管理系统准备
    java启动线程时 extends与implements的一个差异
    spring中使用quartz时注入时出现的错误
    bat执行java程序 good
    bat下执行java程序报错处理
    SQLite.dll在xp中部署时的报错处理
    hdu 4277 USACO ORZ (dfs暴搜+hash)
    Java实现 蓝桥杯 算法训练 动态数组使用
    Java实现 蓝桥杯 算法训练 动态数组使用
    Java实现 蓝桥杯 算法训练 动态数组使用
  • 原文地址:https://www.cnblogs.com/wwssgg/p/14670882.html
Copyright © 2011-2022 走看看