Annotation Interface GeneratedProperty


@Retention(CLASS) @Target({}) @Documented public @interface GeneratedProperty
Represents a typical field/getter/setter for a class. Properties are aggregated by ObjectMappables (via GenAsObjectMappable), Persistable (via GenAsPersistable), and BinaryLink (via GenAsBinaryLink) and can be either Java primitives (strings, ints, longs, timestamps, etc.) or ObjectMappables.

Supported API: true

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of this property.
    The type/class of this property.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Controls the accessibility and exceptions for generated accessor methods.
    Specifies the database properties of the column generated for this property.
    boolean
    Controls whether a field will be generated or not.
    Controls the upper/lower bounds of numbers and strings, the string case, and the ability to set the property once the associated Persistable has been stored.
    The initial value of the property in the Java source to be used when new instances of the class are created (for example, name="foo", type=String.class, initialValue="\"bar\"" will generate the field in the source as String foo = "bar";.
    A string representing the JavaDoc to generate for this property.
    The supported nature of this property to be generated into your marvelous JavaDoc .
    The <...> portion of the generic type().
  • Element Details

    • name

      String name
      The name of this property.

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

      Supported API: true

    • type

      Class type
      The type/class of this property. Can be a Java "primitive" (such as a String, int, long, Integer, Long, Timestamp, etc.) or ObjectMappable, but can not be a Persistable (use GenAsBinaryLink to create associations to persistables).

      Note: to specify a primitive like int, simply append .class (resulting in int.class).

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

      Supported API: true

    • typeParameter

      String typeParameter
      The <...> portion of the generic type(). Java does not allow generics to be expressed as a class, so it's not possible to specify the type as "type=List<MyClass>". In the rare case where you wish to specify a generic, list the generic classes here; "List<MyClass>" would become "type=List.class, genericType="<somepackage.MyClass>".

      When specifying a genericType, you must include the "<>"s and you must spell out the fully-qualified class (package name+class name). For example, "MyKey, List<MyObjects>" is invalid (the correct representation would be "<my.pkg.MyKey, java.util.List<my.other.pkg.MyObjects>>".

      Supported API: true

      Default:
      ""
    • concrete

      boolean concrete
      Controls whether a field will be generated or not. The default (true) will result in the generation of a field and accessors (assuming they've not been disabled). If set to false:
      • no field will be generated
      • the accessors, if any, will be generated as abstract
      • you will need to remodel the field in implementing classes to implement

      Note: this property should be used sparingly and in abstract classes where you want to defer the type of the property but need methods generated (to the base type).

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

      Supported API: true

      Default:
      true
    • initialValue

      String initialValue
      The initial value of the property in the Java source to be used when new instances of the class are created (for example, name="foo", type=String.class, initialValue="\"bar\"" will generate the field in the source as String foo = "bar";.

      Note: it is discouraged to use a value of "null", since all fields not assigned when defined will be assigned a null value; assigning this value to "null" is redundant.

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

      Supported API: true

      Default:
      ""
    • javaDoc

      String javaDoc
      A string representing the JavaDoc to generate for this property. Your opportunity to impress your peers and customers!

      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
    • constraints

      PropertyConstraints constraints
      Controls the upper/lower bounds of numbers and strings, the string case, and the ability to set the property once the associated Persistable has been stored.

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

      Supported API: true

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

      ColumnProperties columnProperties
      Specifies the database properties of the column generated for this property.

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

      Supported API: true

      Default:
      @com.ptc.windchill.annotations.metadata.ColumnProperties