<typekey>

The <typekey> element defines a field for which a typelist defines the values. Guidewire defines this element in the data model metadata files as the <typekey> XML subelement.

Note: For information on typelists, typekeys, and keyfilters, see Working with typelists.

Attributes of <typekey>

The <typekey> element contains the following attributes.

<typekey>  attribute               

Description

Default

columnName

Optional. If specified, PolicyCenter uses this value as the column name of the corresponding database column. If you do not specify a columnName value, then PolicyCenter uses the value of the name attribute for the database column name.

The columnName attribute must be no more than 30 characters in length. It allows only unaccented Roman letters, numbers, and the underscore character. The first character of the columnName attribute must be a letter. Although the underscore character is allowable here, Guidewire discourages its use.

IMPORTANT All column names on a table must be unique within that table. Otherwise, Guidewire Studio™ displays an error if you verify the resource and the application server fails to start.

None

createhistogram

Whether to create a histogram on the column during an update to the database statistics.

Note: It is possible to override this attribute on an existing column in an extension (*.etx) file using the <column-override> element. You can use the override to turn off an existing histogram or to create one that did not previously exist.

This change does not take effect during an upgrade. The change occurs only if you regenerate statistics for the affected table by using the Guidewire maintenance_tools command.

See also

false

default

The default value given to the field during new entity creation.

None

deprecated

If true, then PolicyCenter marks the typekey as deprecated in the Data Dictionary and places a Deprecated annotation on it in the Guidewire Studio API Reference.

If you deprecate a typekey, use the description attribute (desc) to explain why.

For more information, see Data entity subelements.

false

desc

A description of the purpose and use of the field.

None

exportable

Unused.

getterScriptability

See Data objects and scriptability for information.

None

loadable

If true, then you can load the field through staging tables. A staging table can contain a column, as a String, for the code of the typekey.

true

loadedByCallback

Internal. If true, then the loading code does not use a default value or report a warning if the column is nullable without a default.

false

name

Required. Specifies the name of the property on the entity

None

nullok

Whether the field can contain null values.

true

overwrittenInStagingTable

Internal. If true and the typekey is loadable, the loader process auto-populates the typekey in the staging table during import.

IMPORTANT If set to true, do not attempt to populate the typekey yourself because the loader import process overwrites this typekey.

false

required

Whether the typekey is required to be non-null upon initial construction of instances of the entity. See Special behaviors for entity types during instantiation.

false

setterScriptability

See Data objects and scriptability for information.

None

soapnullok

Unused.

typefilter

The name of a filter associated with the typelist. See Static filters for additional information.

None

typelist

Required. The name of the typelist from which this field gets its value.

See also

None

Subelements of <typekey>

The <typekey> element contains the following subelements.

<typekey>  subelement         

Description

Default

keyfilters

Defines one or more <keyfilter> elements. There can be at most one <keyfilters> element in an entity. See Dynamic filters for additional information.

None

fulldescription

See <fulldescription>.

None

tag

See <tag>.

None

Subelements of <keyfilters>

The <keyfilters> element contains the following subelements.

<keyfilters>  subelement      

Description

Default

<keyfilter>

Specifies a keyfilter to use to filter the typelist. This element requires the <name> attribute. This attribute defines a relative path, navigable through Gosu dot notation, to a physical data field. Each element in the path must be a data model field.

Note: You can include multiple <keyfilter> elements to specify multiple keyfilters.

None