The only way I know is to iterate over the object storage property templates and find the one I need by comparing the symbolic name with some string:
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 } }
But if there are many property templates in the object store, this can be quite slow. Any ideas? I am using CE API 5.1
source share