xxx11

System Generation Properties
Basic properties
wt.generation.bin.dir, Specifies where .ClassInfo.ser files (serialized info objects) will be generated, following the package structure
wt.generation.source.dir, Specifies where mData files are expected to be found and where Java source files will be generated, following the package structure
wt.generation.sql.dir, Specifies where SQL scripts will be generated
wt.classRegistry.search.path, Specifies the path to search for files representing classes to be registered
wt.classRegistry.search.pattern ,Specifies the file pattern to consider as representing classes to be registered
Advanced properties:
• wt.generation.enforceExtendable true
• wt.generation.genJavaSource
• wt.generation.genIntrospect true
• wt.generation.genDatabase true
• wt.generation.genDisplayNames true
• wt.generation.reportDisplayNames true
• wt.tools.modelCheck true
• wt.generation.custom ${gen.custom}
• wt.home D:\ptc\Windchill
• wt.installroot D:\ptc\Windchill
• wt.buildroot D:\ptc\Windchill
• wt.sourceroot D:\ptc\Windchill
• wt.generation.sql.useDatastore false
---------------
Exercise 6-4: Add Initialization Methods
Objectives
● Add initialization methods to generated Java source..
Scenario
In this exercise, you will edit the Java source to implement appropriate initialization for modeled classes.
Step 1. Add initialization methods to modeled classes.
a. Open CustomerOrder.java.
b. Find all initialization methods. Here is one example:
c. For each initialization method, add a call to the super class initialization method. Use the same arguments passed in. Here is an example:
d. Save the file.
e. Compile.
Step 2. Check other generated code for initialization methods.
Step 3. Restart Tomcat and the Method Server.
----
Modeling Attributes
For Persistable classes, such as custom extensions extending a Persistable class, modeled attributes are columns in a database table. The column type depends on the attribute type.
• Therefore, changes such as adding or modifying attributes will affect the tables in the database.
• If a previous customization involved creating database tables, these tables need to be dropped.
Generally speaking, these tables should never contain critical data — dropping the tables should be done in a development environment. In production, the model should be set before being implemented in production.
If there were important data in the tables, the data can’t be dropped — it would need to be migrated to the new table structure.
Windchill has many tables, and there are relationships between rows in a table. If a table contains data, dropping it will not also drop related data in other tables.
It’s often possible in a development environment to just drop one custom table, leaving the extra rows in other tables, and not easily seeing a side effect in the development system. The best practice would be to delete the custom data, using the UI so that all related data is removed correctly, prior to implementing any other modeled changes.
---
Accessor Methods
When an attribute is modeled in Rational Rose, “accessor” methods will be automatically added by default to the resulting Java code for the containing class. An example of an attribute named “cost”:
1. private void costValidate( String a_Cost ) throws WTPropertyVetoException
2. public void setCost( String a_Cost ) throws WTPropertyVetoException
• Calls the validate method before setting the attribute
3. public String getCost()
The setCost() and getCost() methods are also known as setters and getters.
In Rational Rose, attributes are summarized in the Attributes tab of the Class Specification window:
Required Attribute
An attribute can be made a required attribute in the Windchill tab of the Attribute Specification window:
--
LowerLimit, UpperLimit
Figure 6-13: Windchill Attribute Specification Property LowerLimit
Attribute Specification
Attributes also have an Attributes Specification window to set detailed properties
Attributes need:
• name
• type
– The type could be a Windchill class or a Java class, it depends on the purpose of the attribute.
– For a cost attribute, java.lang.Float is a logical choice.
Note: Understanding Export Control will be an element of the exercise.
<think>好的,用户的问题是关于“xxx”,但用户意图显示为“无法判断意图”。首先需要明确用户的具体需求是什么。可能的情况包括信息查询、技术问题、学习资源请求等。由于信息不足,无法直接进行有效搜索,因此需要进一步分析可能的意图方向。 尝试解析“xxx”可能的含义,可能涉及多个领域。比如,如果是技术相关的,可能涉及某个错误代码;如果是学术性的,可能涉及某个术语或概念;如果是日常问题,可能涉及生活技巧或产品推荐。需要确定最常见或最相关的解释。 接下来,调用网络搜索工具,使用关键词“xxx 含义”、“xxx 问题解决”、“xxx 用途”等进行检索。查看搜索结果中的高频解释或常见问题,以确定用户可能的真实需求。例如,假设搜索结果显示“xxx”是一个常见的编程错误代码,那么回答应围绕该错误的原因和解决方法展开。 整合搜索结果时,需要确保信息准确且来源可靠。例如,如果发现多个技术论坛讨论“xxx”错误,需总结常见解决方案,如检查语法、更新依赖库等。同时,按照用户的要求,将步骤分点列出,避免使用第一人称和步骤词汇,并确保引用内容分散在回答中,而非集中在末尾。 最后,生成相关问题部分,需基于可能的意图和回答内容。例如,如果回答涉及错误解决,相关问题可包括如何预防该错误、相关工具推荐、更深层次的原因分析等。确保问题相关且有实际帮助,符合用户后续可能的需求。</think>由于“xxx”缺乏具体上下文信息,无法确定其指向的领域或具体问题。以下是可能存在的解释方向及对应的处理方法: **技术领域可能性** 若涉及编程错误代码,常见处理方式包括: - 检查代码语法是否符合规范,使用IDE自带的语法检查工具进行验证 - 确保所有变量在使用前已完成初始化 ```python # 示例:变量初始化验证 def main(): try: print(undefined_variable) except NameError: print("变量未定义错误") ``` **学术概念可能性** 若涉及数学公式,可能对应以下表达式: $$E=mc^2$$ 该公式表示质能等价关系,其中$E$代表能量,$m$代表质量,$c$代表光速常量 **日常应用可能性** 若涉及生活场景,建议通过具体设备型号+问题描述进行搜索。例如: - 家用电器故障代码查询需提供品牌型号 - 电子产品异常需明确具体症状表现 相关问题
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值