Runtime components : Core components : Typed data : Reference : Default implementation
  
Default implementation
This topic provides a description of the typed data elements that are provided by default in UDTT.
UDTT provides the following typed data elements by default:
String
Date
Number (including byte, short, integer, bigInteger, long, double, float, and bigDecimal)
Currency
Boolean
ByteArray
Duration
XMLGregorianCalendar
The default typed data elements extend BasicType.
See
Byte
See also
Reference
BasicType
BasicType is the base type from which all other types extend. It is also the new recommended type to be used for extending custom, project-specific types.
Attributes
Descriptor
ImplClass : com.ibm.btt.base.types.impl.BasePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.BaseConverter
Validator
ImplClass : com.ibm.btt.base.types.impl.BaseValidator
isMandatory (boolean)
If true, the end user must provide a value to the data field managed by this type before submitting any request. All subclasses of this type support the isMandatory parameter.
See also
Default implementation
String
The String type extends BasicType and is used for general string-based input.
Attributes
Descriptor
ImplClass: com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass: com.ibm.btt.base.types.impl.StringConverter
Validator
ImplClass: com.ibm.btt.base.types.impl.StringValidator
minimumLength (int)
Is the minimum length of characters for an input of this type to be valid.
maximumLength (int)
Is the maximum length of characters for an input of this type to be valid.
regExp (string)
Is a regular expression string that is used to match the input string for validation. For example, the regExp="\d{10}" regular expression will validate whether the input string is 10 numbers.
See also
Default implementation
Date
The Date type extends BasicType and is used for date input.
Attributes
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.DateConverter
pattern (String)
Pattern is used when formatting and validating input. The default pattern is yyyy-MM-dd, and also support yyyy-M-dd.
Validator
ImplClass : com.ibm.btt.base.types.impl.DateValidator
minimumDate (String)
Is the lower limit of the date value input. Supported formats includes yyyy-MM-dd (2010-03-27), today +*y*m*d and today-*y*m*d.
Make sure yyyy-MM-dd is valid date. For example, 2010-02-30 is not supported.
* represents any number. Thus such formats are supported as today, today + 2y, today + 2m + 2d, today - 3y, today - 5d, etc.
maximumDate (String)
Is the upper limit of the date value input. The format is the same as the minimumDate parameter.
See also
Default implementation
Number (including byte, short, integer, bigInteger, long, double, float, and bigDecimal)
The Number type extends BasicType, and is used for input and output of numeric data.
Attributes
Descriptor
ImplClass: com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass: com.ibm.btt.base.types.impl.NumberConverter
numberType (fixed list of choices)
Is an enumerated value with one of the following types: byte, short, integer, bigInteger, long, double, float or bigDecimal. The default value is bigDecimal.
decimalPlaces (int, mandatory if numberType is not a scalar type)
Is the length of the decimal part of the number. For example, 4 represent there are 4 number after the decimal point.
pattern (String)
Is used to format the number. If no value is specified, the default behavior is to use the locale specific formatting. This pattern follow the syntax described in website http://www.unicode.org/reports/tr35/#Number_Format_Patterns, for example: #.00.
Literal characters in patterns are not supported.
If patten and decimalPlaces are both specified, pattern overrides the setting of decimalPlaces.
Validator
ImplClass: com.ibm.btt.base.types.impl.NumberValidator
minimumNumber (same type specified in numberType)
Is the lower limit for valid data of this type.
maximumNumber (same type specified in numberType)
Is the upper limit for valid data of this type.
See also
Default implementation
Currency
The Currency type extends Number and is used for input and output of money amounts.
Attributes
Descriptor
ImplClass: com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass: com.ibm.btt.base.types.impl.CurrencyConverter
numberType (fixed list of choices)
Is an enumerated value with one of the following types: byte, short, integer, long, double, float or bigDecimal. The default value is bigDecimal.
pattern (String)
Is used to format the number. If no value is specified, the default behavior is to use the locale specific formatting. This pattern follow the syntax described in website http://www.unicode.org/reports/tr35/#Number_Format_Patterns, for example: #.00.
Literal characters in patterns are not supported.
If patten and decimalPlaces are both specified, pattern overrides the setting of decimalPlaces.
decimalPlaces (int, mandatory if numberType is not a scalar type)
Is the length of the decimal part of the number. For example, 4 represent there are 4 number after the decimal point.
currency (String)
One currency setting to assign a type for the currency. For example: USD represents U.S. Dollars, CNY represents Chinese yuan
Validator
ImplClass: com.ibm.btt.base.types.impl.CurrencyValidator
See also
Default implementation
Boolean
The Boolean type extends BasicType and is used to represent a boolean type data. If input data is a string type value, the content of this value should be either "true" or "false", or "yes" or "no". The converter automatically converts "true" and "yes" to a true boolean value and "false" and "no" to false boolean value.
Attributes
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.BooleanConverter
Validator
ImplClass : com.ibm.btt.base.types.impl.BooleanValidator
validValue (boolean)
Enter the boolean value you expect. This parameter is optional.
See also
Default implementation
ByteArray
The ByteArray type extends BasicType and represent byte array data. The ByteArray type is mainly used to exchange data with a front or back end system. For example, you can send a byte array type format image attachment to a back end system with Web services. A ByteArray instance is created from a file, or it can be passed from other components or systems. Because it is rare to create byte array data from a string value that has been entered by a user, conversion of a string value to byte array data is currently not supported.
Attributes
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.ByteArrayConverter
Validator
ImplClass : com.ibm.btt.base.types.impl.ByteArrayValidator
minimumLength (int)
Is the lower limit for length of valid byte array data.
maximumLength (int)
Is the upper limit for length of valid byte array data.
Note The format/unformat methods are not implemented by default. If customers need to transform the ByteArray format data, they can override these two methods to provide their own logic.
See also
Default implementation
Duration
The Duration type extends BasicType and represents a javax.xml.datatype.Duration type data. A Duration instance can be created from two types of string formats: a long type millisecond value and a duration format string, for example P1DT9H55M31.233S. For more detailed information on the format, see the description of javax.xml.datatype.Duration.
Attributes
Descriptor
ImplClass: com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass: com.ibm.btt.base.types.impl.DurationConverter
Validator
ImplClass: com.ibm.btt.base.types.impl.DurationValidator
minimumDur (String)
Is the lower limit for valid data of this type.
maximumDur (String)
Is the upper limit for valid data of this type.
See also
Default implementation
XMLGregorianCalendar
The XMLGregorianCalendar type extends BasicType, and is used to represent date type data.
Attributes
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.XMLGregorianCalendarConverter
pattern (String)
Pattern is used when formatting and validating input. The default pattern is yyyy-MM-dd, and also support yyyy-M-dd.
Validator
ImplClass : com.ibm.btt.base.types.impl.XMLGregorianCalendarValidator
minimumDate (String)
Is the lower limit of the date value input. Supported formats includes yyyy-MM-dd (2010-03-27), today +*y*m*d and today-*y*m*d.
Make sure yyyy-MM-dd is valid date. For example, 2010-02-30 is not supported.
* represents any number. Thus such formats are supported as today, today + 2y, today + 2m + 2d, today - 3y, today - 5d, etc.
maximumDate (String)
Is the upper limit of the date value input. The format is the same as the minimumDate parameter.
See also
Default implementation
Byte
The Byte type extends, and is used to represent byte data.
Attributes
Descriptor
ImplClass : com.ibm.btt.base.types.impl.SimplePropertyDescriptor
Converter
ImplClass : com.ibm.btt.base.types.impl.XMLGregorianCalendarConverter
pattern (String)
Pattern is used when formatting and validating input. The default pattern is yyyy-MM-dd, and also support yyyy-M-dd.
Validator
ImplClass : com.ibm.btt.base.types.impl.XMLGregorianCalendarValidator
minimumDate (String)
Is the lower limit of the date value input. Supported formats includes yyyy-MM-dd (2010-03-27), today +*y*m*d and today-*y*m*d.
Make sure yyyy-MM-dd is valid date. For example, 2010-02-30 is not supported.
* represents any number. Thus such formats are supported as today, today + 2y, today + 2m + 2d, today - 3y, today - 5d, etc.
maximumDate (String)
Is the upper limit of the date value input. The format is the same as the minimumDate parameter.
See also
Default implementation