Windchill Foundation Classes
Windchill provides three base classes with some basic functionality for business information objects: WTObject, Item, and ObjectToObjectLink. Many business information objects provided by Windchill, and probably many that you create yourself, extend these foundation classes and, therefore, inherit attributes and methods from these classes.
It is recommended that if you extend Windchill-supplied classes, you use those described in the The Enterprise Layer, which were designed to be used for customization.
WTObject : Represents the base class for all Windchill business information classes. Item and ObjectToObjectLink are subclasses of WTObject.
Item
: Represents a discrete business item.
ObjectToObjectLink
: Represents a concrete binary association between two Persistable objects; that is, you can define a link between two items, between an item and a link, and between two links. Each link has a roleA side and a roleB side therefore, if you have a link, you can use it to navigate to all other objects associated with it. The ObjectToObjectLink class can be extended and therefore can have additional attributes and methods. As shown in the following figure, the ObjectToObjectLink aggregates ObjectReference for both role A and B. The ObjectReference in turn aggregates the primary key ObjectIdentifier as an overridden key to reference its object for both roles. The ObjectIdentifier extends QueryKey and adds the id as an additional attribute.
Figure 3. Object to Object Link
WTObject contains a few general-purpose methods that are inherited by every business object and provide a low level of functionality. For example, the checkAttributes method is called when the object is saved to perform elementary validity checking. If you have not supplied information for required attributes, an exception is thrown and the object is not made persistent.
도움이 되셨나요?