<columnParam> subelement

You use the <columnParam> element to set parameters that a column type requires. The type attribute of a column determines which parameters you can set or modify by using the <columnParam> subelement. You can determine the list of parameters that a column type supports by looking up the type definition in its .dti file.

For example, if you have a mediumtext column, you can determine the valid parameters for that column by examining file mediumtext.dti. This file indicates that you can modify the following attributes of a mediumtext column:

  • encryption
  • logicalSize
  • trimwhitespace
  • validator

Because you cannot modify the base configuration data type declaration files, you cannot see these files in Guidewire Studio. To view these files, navigate to the directory modules/configuration/config/datatypes.

The following example, from Account.eti in PolicyCenter, illustrates how to use this subelement to define certain column parameters.

<?xml version="1.0"?>
<entity xmlns="http://guidewire.com/datamodel"
        desc="An account is ..."
        entity="Account"
        ...
        table="account"
        type="retireable">
  ...
  <column desc="Business and Operations Description."
          name="BusOpsDesc"
          type="varchar">
    <columnParam name="size" value="240"/>
  </column>
  ...
</extension>

Parameters that you can define by using <columnParam>

The following list describes the parameters that you can define by using <columnParam>, depending on which parameters are listed as valid in the .dti file of the data type.

Parameter                  

Description

countryProperty

Name of a property on the owning entity that returns the country to use for localizing the data format for this column.

createSpatialIndex

Applies to columns with a spatial point data field. If the createSpatialIndex parameter has the default value of true in a column of an extension or custom entity, PolicyCenter creates an index for spatial point data. If the parameter has a value of false, PolicyCenter does not create such an index. In this case, PolicyCenter avoids creating an index regardless of whether the parameter is in a <columnParam> subelement of a <column> element or a <column-override> element.

currencyProperty

Name of a property on the owning entity that returns the currency for this column.

encryption

Whether PolicyCenter stores this column in encrypted format. This only applies to text-based columns.

Guidewire allows indexes on encrypted columns, or fields. However, because Guidewire stores encrypted fields as encrypted in the database, you must encrypt the input string and search for an exact match to it.

exchangeRateProperty

Name of a property on the owning entity that returns the exchange rate to use during currency conversions.

extensionProperty

The name of a property on the owning entity whose value contains the phone extension.

logicalSize

The size of this field in the PolicyCenter interface. You can use this value for String columns that do not have a maximum size in the database, such as CLOB objects. If you specify a value for the size parameter, then the logicalSize value must be less than or equal to the value of that parameter.

phonecountrycodeProperty

The name of a property on the owning entity whose value contains the country with which to validate and format values.

precision

The precision of the field. Precision is the total number of digits in the number. The precision parameter applies only if the data type of the field allows a precision attribute.

scale

The scale of the field. Scale is the number of digits to the right of the decimal point. The scale parameter applies only if the data type of the field allows a scale attribute.

secondaryAmountProperty

Name of a property on the owning entity that returns the secondary amount related to this currency amount column.

size

Integer size value for columns of type TEXT and VARCHAR. This parameter specifies the maximum number of characters, not bytes, that the column can hold.

WARNING The database upgrade utility automatically detects definitions that lengthen or shorten a column. For shortened columns, the utility assumes that you wrote a version check or otherwise verified that the change does not truncate existing column data. For both Oracle and SQL Server, if shortening a column causes the truncation of data, the ALTER TABLE statement in the database fails and the upgrade utility fails.

trimwhitespace

Applies to text-based data types. If true, then PolicyCenter automatically removes leading and trailing white space from the data value.

validator

The name of a ValidatorDef in fieldvalidators.xml. See <ValidatorDef>.

Note: See Overriding data type attributes for an example of using a nested <columnParam> subelement within a <column-override> element to set the encryption attribute on a column.