Annotation Interface GeneratedRole


@Retention(CLASS) @Target({}) @Documented public @interface GeneratedRole
A role descriptor for the associated link. Note that if you're constraining an existing link, you can pretty much reuse the parent's values for the role by retaining the defaults.

Supported API: true

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of this role.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Controls the accessibility and exceptions for generated accessor methods.
    boolean
    Whether or not to auto-navigate this role.
    The cardinality of this particular role.
    boolean
    Indicates whether link deletes should cascade to role members.
    Specifies the database properties for the columns of this role.
    A string representing the JavaDoc to generate for this property.
    boolean
    Indicates whether this role is an "owner" role.
    The reference type to store this role as.
    The supported nature of this property to be generated into your marvelous JavaDoc .
    The type/class of this property.
  • Element Details

    • name

      String name
      The name of this role.

      Rose conversion note: Corresponds to Association Specification -> General -> Role A/B.

      NOTE: if modeling a new type of association, such as ObjectToObjectLink or VersionToVersionLink, use ("roleAObject"/"roleBObject") as the value for this property.

      Supported API: true

    • type

      Class type
      The type/class of this property. Must be a Persistable. Use the default value if this role is part of an association that constrains its parent but does not actually wish to constrain this particular role.

      Rose conversion note: Corresponds to Association Specification -> General -> Element A/B.

      Supported API: true

      See Also:
      Default:
      java.lang.Object.class
    • javaDoc

      String javaDoc
      A string representing the JavaDoc to generate for this property. Leave blank only if you want to reuse the parent role's JavaDoc.

      Rose conversion note: Corresponds to Association Specification -> Role A/B General -> Documentation.

      Supported API: true

      See Also:
      Default:
      ""
    • supportedAPI

      SupportedAPI supportedAPI
      The supported nature of this property to be generated into your marvelous JavaDoc .

      Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> SupportedAPI.

      Supported API: true

      Default:
      PRIVATE
    • cardinality

      Cardinality cardinality
      The cardinality of this particular role. The default (Cardinality.DEFAULT) indicates that the parent role's multiplicity should be used (if no parent exists, defaults to Cardinality.MANY).

      Rose conversion note: Corresponds to Association Specification -> Role A/B Detail -> Multiplicity.

      Supported API: true

      Default:
      DEFAULT
    • referenceType

      Class referenceType
      The reference type to store this role as.

      Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> ReferenceType.

      NOTE: this property is for internal use only by GeneratedForeignKey.

      Supported API: true

      Default:
      java.lang.Object.class
    • autoNavigate

      boolean autoNavigate
      Whether or not to auto-navigate this role. If unspecified, reuses the parent role's value, finally defaulting to false if no parent exists.

      Rose conversion note: Corresponds to Association Specification -> Windchill A/B -> AutoNavigate.

      NOTE: this property is for internal use only by GeneratedForeignKey.

      Supported API: true

      Default:
      false
    • owner

      boolean owner
      Indicates whether this role is an "owner" role. Ownership is checked when a role is to be deleted; if the role has links and it is not an "owner" for the link type, the delete will fail with a referential integrity exception (note: this test does not apply when the link itself is deleted).

      Take, for example, ABLink which links instances of A (role A) and B (role B). For "a" (an instance of A) linked to "b" (an instance of B) linked via "ab" (an instance of ABLink). The following delete behavior will be observed:

      • Deleting "ab" directly will always succeed, regardless of either A or B's owner setting
      • An attempt to delete "a" will succeed only when ABLink designates the "a" role as an owner role
      • An attempt to delete "b" will succeed only when ABLink designates the "b" role as an owner role.

      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 cascade
      Indicates whether link deletes should cascade to role members. When set to true, the role member will be deleted along with the link (when the link is deleted). The role will be deleted regardless of whether the link was directly deleted or was deleted as a consequence of deleting the other side role (when the other side role's owner is set to true).

      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 -> Cascade.

      Supported API: true

      Default:
      false
    • accessors

      Controls the accessibility and exceptions for generated accessor methods. If unspecified, uses parent's role or @PropertyAccessors if 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 (see ForeignKeyRole).

      Rose conversion note: Corresponds to various properties found in Association Specification -> Windchill A/B.

      Supported API: true

      Default:
      @com.ptc.windchill.annotations.metadata.PropertyAccessors
    • columnProperties

      ColumnProperties columnProperties
      Specifies the database properties for the columns of this role. Defaults to the parent's role or @ColumnProperties if 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