Annotation Interface ColumnProperties


@Retention(CLASS) @Target({}) @Documented public @interface ColumnProperties
Describes the database properties for the column corresponding to the GeneratedProperty this annotation describes.

Supported API: true

  • Element Details

    • persistent

      boolean persistent
      If true, persist the property.

      Note: when assigning this to false, be aware that unpersisted properties are not considered by the algorithm responsible for determining the externalization version UID. Put another way, if a file is compiled and then subsequently altered to add or remove unpersisted properties, the generated EXTERNALIZATION_VERSION_UID will not change, but the Externalizable.writeExternal(java.io.ObjectOutput) and corresponding readVersionXXX() implementations will. This is expected and, normally, transparent behavior. However, if the readVersionXXX() was preserved (overridden) in the business class, it will need to be altered to account for the new/removed, unpersisted property or simple externalization will fail.

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

      Supported API: true

      Default:
      true
    • columnName

      String columnName
      The name of the column. The default value ("USE PROPERTY NAME") indicates that the column name will be generated based on the name of the property and (possibly) the order the property is listed in the "cookie".

      Note: The default value for most string properties is "", a value that is typically "safe" because either it would never be used as a "real" value or, if set, the meaning does not deviate from its meaning as a default value. In this case, "" is both a legitimate value and, when explicitly assigned, the result has different meaning than when left as a default. Consequently, "USE PROPERTY NAME" is used over "".

      If you've read this for, you're probably dying to know what setting this to "" actually does. It does what you'd expect: it sets the property's column name to nothing. This makes sense once you realize that the final column name for nested object-mappable classes is a cumulation of the "column" names at each level. Let's say you set this to "" for a property named "bar" in your cookie and your cookie is aggregated into a persistable as a property named "foo". Your column for the unnamed column will be "foo". Had you retained the default value, your property would have been named "barfoo". This is a lot of work just to get a "pretty" column name.

      Implementation Note: this default value, unlike others, can not be used as -- purposefully -- it's illegal to use spaces in a column name.

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

      Supported API: true

      See Also:
      Default:
      "USE PROPERTY NAME"
    • columnType

      ColumnType columnType
      The column type to generate. Defaults to the primitive type of the property.

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

      Supported API: true

      Default:
      USE_DEFAULT_MAPPING
    • defaultValue

      String defaultValue
      The default value to use for this column when upgrade alters the table to include this column or modify this existing column. This property works similarly to GeneratedProperty's initialValue() in that the literal content of the string is exactly duplicated into the "alter table table add column columnName columnType" statement as "default defaultValue".

      Note: This property only applies during upgrade, and impacts the "alter table" statement generated by upgrade to add the new column to an existing table or modify an existing column. If modifying an existing column, any existing null rows in this column are set to the default value specified. It does not affect how the schema generates a new table, as default values are not applicable within Windchill (a value is always passed for every column when a row is created, so even were the "create table" schema to specify a default value, it would never actually be used).

      Default:
      ""
    • index

      boolean index
      If true, index this column.

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

      Supported API: true

      Default:
      false
    • unique

      boolean unique
      If true, require this column to be unique.

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

      Supported API: true

      Default:
      false
    • tableSpaceName

      String tableSpaceName
      The table space to create this table in. The default value indicates that the table should be created in whatever table space tables would be created in by default in the database.

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

      Supported API: true

      Default:
      ""
    • oracleTableSize

      OracleTableSize oracleTableSize
      Indicates the default size of the table. Relevant only for Oracle.

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

      Supported API: true

      Default:
      SMALL