1.继承WTObject
@GenAsPersistable(
superClass = WTObject.class,
properties = {
@GeneratedProperty(name = "note", type = String.class, constraints = @PropertyConstraints(upperLimit = 500)),
superClass = WTObject.class,
properties = {
@GeneratedProperty(name = "note", type = String.class, constraints = @PropertyConstraints(upperLimit = 500)),
......
@GeneratedProperty(name = "str1", type = String.class)
},
foreignKeys = {
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "itemId", type = WTPartMaster.class, supportedAPI = SupportedAPI.PUBLIC, cascade = false,constraints = @PropertyConstraints(required = true))),
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "pscItemId", type = StandardProduct.class, supportedAPI = SupportedAPI.PUBLIC, cascade = false))
})
@GeneratedProperty(name = "str1", type = String.class)
},
foreignKeys = {
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "itemId", type = WTPartMaster.class, supportedAPI = SupportedAPI.PUBLIC, cascade = false,constraints = @PropertyConstraints(required = true))),
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "pscItemId", type = StandardProduct.class, supportedAPI = SupportedAPI.PUBLIC, cascade = false))
})
public class ClassName extends _ClassName {
static final long serialVersionUID = 1;
static final long serialVersionUID = 1;
public static ClassName newClassName () throws WTException {
ClassName instance = new ClassName();
instance.initialize();
return instance;
}
ClassName instance = new ClassName();
instance.initialize();
return instance;
}
}
2.带大小版本,带生命周期
@GenAsPersistable (
superClass=RevisionControlled.class, interfaces = { WTContained.class, Typed.class, TypeManaged.class, LifeCycleManaged.class,IBAHolder.class },
properties={
@GeneratedProperty(name = "orderId", type = Integer.class,constraints = @PropertyConstraints(required=true)),
......
@GeneratedProperty(name = "str1", type = String.class)
superClass=RevisionControlled.class, interfaces = { WTContained.class, Typed.class, TypeManaged.class, LifeCycleManaged.class,IBAHolder.class },
properties={
@GeneratedProperty(name = "orderId", type = Integer.class,constraints = @PropertyConstraints(required=true)),
......
@GeneratedProperty(name = "str1", type = String.class)
},
foreignKeys = {
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "master", type = WeaveOrderMaster.class, supportedAPI = SupportedAPI.PUBLIC,
cascade = false, constraints = @PropertyConstraints(required = true)),
myRole = @MyRole(name = "iteration", supportedAPI = SupportedAPI.PUBLIC, cascade = false)),
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "typeId", type = ProductCategory.class, supportedAPI = SupportedAPI.PUBLIC, cascade = false))
},
derivedProperties = {
@DerivedProperty(name = "number", derivedFrom = "master>number", supportedAPI = SupportedAPI.PUBLIC),
@DerivedProperty(name = "name", derivedFrom = "master>name", supportedAPI = SupportedAPI.PUBLIC) }
foreignKeys = {
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "master", type = WeaveOrderMaster.class, supportedAPI = SupportedAPI.PUBLIC,
cascade = false, constraints = @PropertyConstraints(required = true)),
myRole = @MyRole(name = "iteration", supportedAPI = SupportedAPI.PUBLIC, cascade = false)),
@GeneratedForeignKey(foreignKeyRole = @ForeignKeyRole(name = "typeId", type = ProductCategory.class, supportedAPI = SupportedAPI.PUBLIC, cascade = false))
},
derivedProperties = {
@DerivedProperty(name = "number", derivedFrom = "master>number", supportedAPI = SupportedAPI.PUBLIC),
@DerivedProperty(name = "name", derivedFrom = "master>name", supportedAPI = SupportedAPI.PUBLIC) }
)
public class ClassName extends _ClassName {
static final long serialVersionUID = 1;
public static ClassName newClassName () throws Exception{
ClassName instance = new ClassName();
instance.initialize();
return instance;
}
public TypeDefinitionInfo getTypeDefinitionInfo()
{
return null;
}
public class ClassName extends _ClassName {
static final long serialVersionUID = 1;
public static ClassName newClassName () throws Exception{
ClassName instance = new ClassName();
instance.initialize();
return instance;
}
public TypeDefinitionInfo getTypeDefinitionInfo()
{
return null;
}
public Object getValue()
{
return null;
}
{
return null;
}
public void setValue(String s, String s1)
{
}
{
}
public String getFlexTypeIdPath()
{
return null;
}
}
{
return null;
}
}
------------------------------------------
@GenAsPersistable(superClass=Master.class, interfaces={UniquelyIdentified.class},
properties={
@GeneratedProperty(name="number", type=String.class, supportedAPI=SupportedAPI.PUBLIC,
constraints=@PropertyConstraints(stringCase=StringCase.UPPER_CASE, changeable=Changeable.VIA_OTHER_MEANS, required=true),
columnProperties=@ColumnProperties(index=true, columnName="WaveOrderNumber")),
@GeneratedProperty(name="name", type=String.class, supportedAPI=SupportedAPI.PUBLIC,
constraints=@PropertyConstraints(changeable=Changeable.VIA_OTHER_MEANS, upperLimit=4000,required=true))
},
tableProperties = @TableProperties(tableName = "ClassNameMaster")
)
public class ClassNameMaster extends _ClassNameMaster{
static final long serialVersionUID = 1;
protected void setIdentificationObject( SuperObjectMasterIdentity identity ) {
number = identity.getNumber();
name = identity.getName();
}
properties={
@GeneratedProperty(name="number", type=String.class, supportedAPI=SupportedAPI.PUBLIC,
constraints=@PropertyConstraints(stringCase=StringCase.UPPER_CASE, changeable=Changeable.VIA_OTHER_MEANS, required=true),
columnProperties=@ColumnProperties(index=true, columnName="WaveOrderNumber")),
@GeneratedProperty(name="name", type=String.class, supportedAPI=SupportedAPI.PUBLIC,
constraints=@PropertyConstraints(changeable=Changeable.VIA_OTHER_MEANS, upperLimit=4000,required=true))
},
tableProperties = @TableProperties(tableName = "ClassNameMaster")
)
public class ClassNameMaster extends _ClassNameMaster{
static final long serialVersionUID = 1;
protected void setIdentificationObject( SuperObjectMasterIdentity identity ) {
number = identity.getNumber();
name = identity.getName();
}
public IdentificationObject getIdentificationObject() throws WTException {
return SuperObjectMasterIdentity.newSuperObjectMasterIdentity(getNumber(), getName());
}
return SuperObjectMasterIdentity.newSuperObjectMasterIdentity(getNumber(), getName());
}
@Override
public String getIdentity() {
return getNumber() + " - " + getName();
}
public static WeaveOrderMaster newWeaveOrderMaster() throws WTException {
WeaveOrderMaster instance = new WeaveOrderMaster();
instance.initialize();
return instance;
}
}
public String getIdentity() {
return getNumber() + " - " + getName();
}
public static WeaveOrderMaster newWeaveOrderMaster() throws WTException {
WeaveOrderMaster instance = new WeaveOrderMaster();
instance.initialize();
return instance;
}
}
3.执行命令
ant -f bin/tools.xml model_uninstall -Dmodel_uninstall.filter="\Acom\.xxx\.cto|=com\.xxx\.cto"
ant -f bin/tools.xml class -Dclass.includes=com/xxx/cto/model/**
ant -f bin\tools.xml sql_script -Dgen.input=com.xxx.cto.model.**
ant -f bin/tools.xml class -Dclass.includes=com/xxx/cto/model/**
ant -f bin\tools.xml sql_script -Dgen.input=com.xxx.cto.model.**
相关推荐
建模一系列的操作和注意事项,学习后的总结,实现windchill建模的曾改查操作,至于删除随意,我本想免费,不知道csdn搞什么,不能设置积分,它自己更改的积分,我觉得最多3积分就好啦
Windchill 10.0 开发建模文档
详细讲解了Windchill中用Rose建模的过程,包括Rose的安装步骤
在windchill10.x中建模 ,一个类似于HelloWord!的模型, 测试的话,按照windchill 最新开发文档的第64页的介绍利用jython进行验证(python和java的嵌套)
Windchill10.0建模文档:详细的介绍怎么样写,怎么配置.
Windchill10.x建模.pdf
windchill资料windchill资料windchill资料windchill资料
windchill12.1.0.0 安装
windchill 远程调试详细介绍 windchill开发环境搭建 windchill服务端调试模式设置 windchill eclipse开发环境搭建详细介绍
WINDCHILL项目管理模块使用教程 WINDCHILL项目管理模块使用教程
JAVAECLIPSE下配置WINDCHILL远程调试WINDCHILL学习笔记.pdf
windchill学习windchill学习windchill学习windchill学习windchill学习windchill学习windchill学习windchill学习windchill学习windchill学习
windchill客制化开发很好的资源,适用于windchill 10.0 的开发
导出命令需要在windchill shell中执行: windchill wt.load.LoadFromFile -d loadFiles/ext2/ExportType.xml -u wcadmin -p wcadmin
NULL 博文链接:https://windchill9.iteye.com/blog/670301
creo集成windchill工作区应用剖析。
ptc公司windchill11开发API,帮助查看,便于二次开发,随时查看方法,这个是英文版的api
windchill系统调优文档windchill
windchill的二次开发资料,主要介绍来了如何用java来进行windchill的客户化定制
Creo用户使用windchill手册,Creo用户使用windchill手册,Creo用户使用windchill手册,Creo用户使用windchill手册,Creo用户使用windchill手册