Annotation Interface DerivedProperty


@Retention(CLASS) @Target({}) @Documented public @interface DerivedProperty
Represents a derived field/getter/setter for a class. Derived fields are "pointers" to real properties (GeneratedProperty) or other derived properties and are generated to call the real accessor methods for the actual properties they derive from. The derivedFrom() string is used to indicate the path to the real property. For example, WTPart's "name" is derivedFrom "master>name".

Supported API: true

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The property this property derives from.
    The name of this property.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Controls the accessibility and exceptions for generated accessor methods.
    The method body to generate for the getter method.
    A string representing the JavaDoc to generate for this property.
    The method body to generate for the setter method.
    The supported nature of this property to be generated into your marvelous JavaDoc
    If specified, uses this class as the return/set type for the property, bypassing the normal algorithm used to chase down the real type for the derived property.
  • Element Details

    • name

      String name
      The name of this property.

      Rose conversion note: Corresponds to Class Attribute Specification -> General -> Name.

      Supported API: true

    • derivedFrom

      String derivedFrom
      The property this property derives from. Specified via the same "dot" ("." or ">") notation used by queries as described by the following examples:
      • WTPart's "name" derives from "master>name". The ">" is used for foreign key associations (the "master" is a foreign key link to a WTPartMaster)
      • Iterated's "modifierName" derives from "iterationInfo.modifier.name". Here, "."s are used because "iterationInfo" is a cookie, "modifier" an ObjectMappable, and "name" is a property of "modifier".

      Rose conversion note: Corresponds to Class Attribute Specification -> Windchill -> DerivedFrom.

      Supported API: true

    • javaDoc

      String javaDoc
      A string representing the JavaDoc to generate for this property. Your opportunity to impress your peers and customers! Note that the default value ("") indicates that the JavaDoc should generate a link to the actual property's JavaDoc.

      Rose conversion note: Corresponds to Class Attribute Specification -> 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 Class Attribute Specification -> Windchill -> SupportedAPI.

      Supported API: true

      Default:
      PRIVATE
    • accessors

      Controls the accessibility and exceptions for generated accessor methods.

      Rose conversion note: Corresponds to various properties found in Class Attribute Specification -> Windchill.

      Supported API: true

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

      Class type
      If specified, uses this class as the return/set type for the property, bypassing the normal algorithm used to chase down the real type for the derived property. This is useful when it's not possible for the normal algorithm to follow the ">"s and "."s to find the real property (and its type).

      NOTE!!! If this property is specified, you are on the hook to provide implementations for the getter/setter (using getBody() and setBody()) as well completely specifying javaDoc() and accessors().

      Supported API: true

      Default:
      java.lang.Object.class
    • getBody

      String getBody
      The method body to generate for the getter method. When specified, the contents of this property will be pasted, verbatim, into the body of the getter method.

      Supported API: true

      Default:
      ""
    • setBody

      String setBody
      The method body to generate for the setter method. When specified, the contents of this property will be pasted, verbatim, into the body of the setter method.

      Supported API: true

      Default:
      ""