Annotation Interface GeneratedForeignKey
- the zero/zero-to-one role can be accessed in the same way as any other property of the object
(
part.getMaster()will return the master for themaster/iterationassociation) - the zero/zero-to-one role can be autonavigated, saving a database hit when the role is
accessed as a property (as in
part.getMaster()); enabling autonavigation will cause queries to automatically include the role when returning the persistables that store their references.
myRole(); the
aggregated role is foreignKeyRole().
Supported API: true
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe properties of the "aggregated" (one/zero-to-one cardinality) role. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionRepresents the properties of "this" role as it would be navigated from the foreign key role.booleanSpecifies which role serves as the "A" role for the association.The (stored) name of the foreign key link.The parent class for this foreign key link class.
-
Element Details
-
name
String nameThe (stored) name of the foreign key link. Typically left blank, resulting in an association named by concatenating the roleA and roleB names (for example, themaster/iterationforeign key association is namedMasterIterationby default.Rose conversion note: Corresponds to Association Specification -> General -> Name.
Supported API: true
- Default:
""
-
superClassName
String superClassNameThe parent class for this foreign key link class. This class would normally be the class designated by theextendsstatement and is needed because the annotated class must extend "_"+classname" (for examplepublic MyClass extends _MyClass).Note: the parent must be an abstract/concrete class that extends on of the foreign key link classes, like
ForeignKeyLink.Note also: this property should rarely be used and exists solely for backwards compatibility.
Rose conversion note: Corresponds to Class Specification -> Relations -> Specialize Class (where the specialized class is the single (non-interface) parent class).
Supported API: true
- Default:
"wt.fc.ForeignKeyLink"
-
myRole
MyRole myRoleRepresents the properties of "this" role as it would be navigated from the foreign key role. While foreign key links are generally not navigated as associations, this role is the role that would be specified to navigate from the aggregated (foreign key) object to the object(s) that are aggregating it. For themaster/iterationforeign key association, this role is the "iteration" side.Rose conversion note: Corresponds to Association Specification -> Role A/B General as well as Association Specification -> Windchill A/B.
Supported API: true
- Default:
@com.ptc.windchill.annotations.metadata.MyRole
-
foreignKeyRole
ForeignKeyRole foreignKeyRoleThe properties of the "aggregated" (one/zero-to-one cardinality) role. This is the role that results in the generation of accessor methods for the stored reference as well as the persistable itself. This role is stored as a reference in the table represented by the object on themyRole()role and can be indicated to be autonavigated. For themaster/iterationforeign key association, this role is the "master" side.Rose conversion note: Corresponds to Association Specification -> Role B General as well as Association Specification -> Windchill B.
Supported API: true
-
myRoleIsRoleA
boolean myRoleIsRoleASpecifies which role serves as the "A" role for the association. Leave blank to reuse the parent's designation for this property. Foreign key associations have two roles (as they are links), an "A" role (which usually represents the "strong" or "owning" side of the association) and a "B" role. Themaster/iterationassociation would specify "false" for this property because while the iteration aggregates the master, the master owns the association.Rose conversion note: Corresponds to Association Specification -> Role A/B General.
Supported API: true
- Default:
true
-