Windchill 高级查询 获取分类节点可实例化设置
开发环境:windchill 11.0 M030
如题,目标是查询partsLink模块中,分类节点的可实例化设置。
执行sql如下:
select a2.value
from LWCPropertyDefinition a1, LWCPropertyValue a2, LWCStructEnumAttTemplate a3
where a1.ida2a2=a2.ida3a4 and a2.ida3b4=a3.ida2a2 and
a3.deletedid is null and a1.name='instantiable' and a3.name='分类节点内部名称'
需要注意:
如果可实例化的值,不是手动设置的,而是继承得到的,则上面的sql查不出来。
使用高级查询,代码实现如下
import com.ptc.core.lwc.server.LWCPropertyDefinition;
import com.ptc.core.lwc.server.LWCPropertyValue;
import com.ptc.core.lwc.server.LWCStructEnumAttTemplate;
import wt.fc.PersistenceHelper;
import wt.fc.QueryResult;
import wt.query.ClassAttribute;
import wt.query.QuerySpec;
import wt.query.SearchCondition;
import wt.query.TableColumn;
/**
* @author 彭秉浪 PengBingLang@dingtalk.com
*/
public class TestUtil {
public