Customizing base configuration data types
You can customize the behavior of the data types listed in datatypes.xml. To see exactly what you can customize for each data type, see List of customizable data types. In general, though, you can customize some or all of the following attributes on a listed data type (depending on the data type):
lengthprecisionscalevalidator
The Length attribute
Data types based on the VARCHAR data type have a length attribute that you can
customize. This attribute sets the maximum allowable character length
for the field (column).
The Precision and Scale attributes
Data types based on the DECIMAL data type have precision and scale attributes that you can
customize. These attributes determine the size of the decimal. The precision value sets the total
number of digits in the number and the scale
value is the number of digits to the right of the decimal point.
In some cases, there are special requirements for these attributes in working with monetary amounts. For more information, see the Globalization Guide.
The Validator attribute
Most data types have a validator attribute that you can
customize. This attribute binds the data type to a given validator definition.
For example, PhoneDataType
(defined in datatypes.xml)
binds to the Phone validator
by its validator attribute.
This matches the name
attribute of a <ValidatorDef>
definition in file fieldvalidators.xml.
//File datatypes.xml
<DataTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../platform/pl/xsd/datatypes.xsd">
...
<PhoneDataType length="30" validator="Phone"/>
...
</DataTypes>
//File fieldvalidators.xml
<FieldValidators>
...
<ValidatorDef description="Validator.Phone" input-mask="###-###-#### x####" name="Phone"
value="[0-9]{3}-[0-9]{3}-[0-9]{4}( x[0-9]{0,4})?"/>
...
</FieldValidators>
List of customizable data types
The following table summarizes the list of the data types that you can customize. PolicyCenter defines these data types in datatypes.xml. If a data type does not exist in datatypes.xml, then you cannot customize its attributes.
PolicyCenter builds all of its data types on top of the base
database data types of CLOB, TIMESTAMP,
DECIMAL, INTEGER, VARCHAR,
BIT, and BLOB.
precision and scale
attributes. The precision attribute defines the total number of
digits in the number. The scale attribute defines the number of
digits to the right of the decimal separator. Therefore, precision
must be greater than or equal to scale.Guidewire data type |
Built on |
Customizable attributes |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The percentage decimal data type
Guidewire builds the PercentageDec data type on top of the DECIMAL (3,0) data type. Only use decimal values from 0 to 100 inclusive.
The Money data type
Guidewire provides the Money data type as the basis for the <monetaryamount> subelement in metadata definition files. The <monetaryamount> subelement is a compound field type, with a Money data type as one component and a typekey to the Currency typelist as the other component.
