【问题标题】:The fastest way to fetch PropertyTemplate by symbolic name ising IBM FileNet CE API通过符号名称获取 PropertyTemplate 的最快方法是 IBM FileNet CE API
【发布时间】:2013-09-12 05:16:43
【问题描述】:

我知道的唯一方法是遍历对象存储的属性模板并通过将符号名称与一些字符串进行比较来找到我需要的模板:

String propertySymName = "someName";
ObjectStore os = Factory.ObjectStore.fetchInstance(...); //assume object store is fetched correctly

String[] properties = {PropertyNames.PROPERTY_TEMPLATES};
os.fetchProperties(properties);
PropertyTemplateSet propertyTemplates = os.get_PropertyTemplates();
Iterator<?> iterator = propertyTemplates.iterator();
while (iterator.hasNext()) {
    PropertyTemplate propertyTemplate = (PropertyTemplate) iterator.next();
    String[] arg = {PropertyNames.SYMBOLIC_NAME};
    propertyTemplate.refresh(arg);
    if (propertyTemplate.get_SymbolicName().equals(propertySymName)) {
       //do some stuff
    }

}

但是如果对象存储有大量的属性模板,它可能会相当慢。有任何想法吗? 我正在使用 CE API 5.1

【问题讨论】:

    标签: filenet-p8 filenet-content-engine


    【解决方案1】:

    您可以通过符号名称搜索它:

    SELECT This FROM PropertyTemplate WHERE (SymbolicName = 'DocumentTitle')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-03-26
      • 2011-11-23
      • 2019-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-03
      相关资源
      最近更新 更多