Annotation Interface ForeignKeyRole
name() and type() (the name is needed
to determine what's being constrained, and the type indicates the new, constrained class).
Supported API: true
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionControls the accessibility and exceptions for generated accessor methods.booleanWhether or not to auto-navigate this role.booleanIndicates whether deletes should cascade.Specifies the database properties for the columns of this role.Assigns the cardinality (viaPropertyConstraints.required()) and changeability (viaPropertyConstraints.changeable()) of this foreign key role.A string representing theJavaDocto generate for this property.booleanIndicates whether this role is an "owner" role.The reference type to store this role as, defaulting to either the parent's referenceType orObjectReference.The supported nature of this property to be generated into your marvelousJavaDoc.
-
Element Details
-
name
String nameThe name of this role. To constrain an existing (inherited) association (by specifying a subclass/interface of the inherited association'stype()), assign the name to the same name provided by the association being constrained.Rose conversion note: Corresponds to Association Specification -> General -> Role A/B.
Supported API: true
-
type
Class typeThe type/class of this property. Must be aPersistable.Rose conversion note: Corresponds to Association Specification -> General -> Element A/B.
Supported API: true
- See Also:
-
javaDoc
String javaDocA string representing theJavaDocto generate for this property. Leave blank only if you want to reuse the parent role'sJavaDoc.Rose conversion note: Corresponds to Association Specification -> Role A/B General -> Documentation.
Supported API: true
- See Also:
- Default:
""
-
supportedAPI
SupportedAPI supportedAPIThe supported nature of this property to be generated into your marvelousJavaDoc.Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> SupportedAPI.
Supported API: true
- Default:
PRIVATE
-
referenceType
Class referenceTypeThe reference type to store this role as, defaulting to either the parent's referenceType orObjectReference. Note that if you are implementing an interface that models a foreign key with areferenceTypeofWTReference, it is your responsibility to identify the implementing reference type.Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> ReferenceType.
Supported API: true
- Default:
java.lang.Object.class
-
owner
boolean ownerIndicates whether this role is an "owner" role. Ownership is checked when an object of this role's type is deleted: if the object is being referred to (in a foreign key reference held by an object on the other side of this foreign key association), the delete will fail if this is set tofalse. Assign this totrueif you would like the delete to succeed regardless of existing foreign key associations to it of this type, noting that the foreign key reference(s) will be nulled out as part of the deletion.If unspecified, will use the first specified value for any parent associations, ultimately defaulting to
true.Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> Owner.
Supported API: true
- Default:
true
-
cascade
boolean cascadeIndicates whether deletes should cascade. If set totrue, the persistence layer will attempt to delete this object when an object referring to it (in its foreign key reference for the other side of this foreign key association) is deleted.If unspecified, uses the parent's value or
falseif no parent.Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> Cascade.
Supported API: true
- Default:
false
-
accessors
PropertyAccessors accessorsControls the accessibility and exceptions for generated accessor methods. If unspecified, uses parent's role or @PropertyAccessorsif no parent. This property corresponds to the accessors generated for the foreign key link class (resembling a binary link) that's automatically generated when a foreign key is generated; it does not correspond to the accessors generated on the persistable itself (seeForeignKeyRole).Rose conversion note: Corresponds to various properties found in Association Specification -> Windchill A/B.
Supported API: true
- Default:
@com.ptc.windchill.annotations.metadata.PropertyAccessors
-
constraints
PropertyConstraints constraintsAssigns the cardinality (viaPropertyConstraints.required()) and changeability (viaPropertyConstraints.changeable()) of this foreign key role.Rose conversion note: Corresponds to various properties found in Class Attribute Specification -> Windchill as well as Association Specification -> Role A/B Detail -> Multiplicity.
Supported API: true
- Default:
@com.ptc.windchill.annotations.metadata.PropertyConstraints
-
columnProperties
ColumnProperties columnPropertiesSpecifies the database properties for the columns of this role. Defaults to the parent's role or @ColumnPropertiesif unspecified.Rose conversion note: Corresponds to various properties found in Association Specification -> Windchill A/B.
Supported API: true
- Default:
@com.ptc.windchill.annotations.metadata.ColumnProperties
-