Data types

The input meta-model supports a number of data types that provide abstraction for the developer from the different underlying data types used by the database, middleware and Java layers. These data types can be used to define attributes, arguments and return values in a platform and database neutral way, and the SDEJ will take care of mapping them to the appropriate data type in each layer of the application.

Table 1. Cúram Data Types

Type

Description

SVR_BLOB

Used for holding binary data.

Corresponds to class curam.util.type.Blob.

Requires a size qualifier although this is only actually used if the field is used on a database table.

Fields of type SVR_BLOB may be null on the database.

SVR_BOOLEAN

Used for holding binary values.

Corresponds to the primitive Java type boolean.

Is stored as a single character field on the database where 0 = false and 1 = true.

Fields of type SVR_BOOLEAN cannot be null on the database.

SVR_CHAR

Used for holding single character values. Note that this data type cannot be used to hold strings or arrays of characters and therefore does not take a size qualifier.

Corresponds to the primitive Java type char.

Fields of type SVR_CHAR cannot be null on the database.

SVR_DATE

Used for holding date values with a resolution of one day.

Corresponds to class curam.util.type.Date.

Fields of type SVR_DATE can be stored as null on the database.

SVR_DATETIME

Used for holding date and time values with a resolution of one second.

Corresponds to class curam.util.type.Date.

Fields of type SVR_DATETIME can be stored as null on the database.

SVR_DOUBLE

Used for holding floating point numbers.

Corresponds to the primitive Java type double.

Fields of type SVR_DOUBLE cannot be null on the database.

SVR_FLOAT

Used for holding floating point numbers.

Used for holding floating point numbers.

Corresponds to the primitive Java type float.

Fields of type SVR_FLOAT cannot be null on the database.

SVR_INT8

An eight bit integer.

Corresponds to the primitive Java type byte.

Fields of type SVR_INT8 cannot be null on the database.

SVR_INT16

A sixteen bit integer.

Corresponds to the primitive Java type short.

Fields of type SVR_INT16 cannot be null on the database.

SVR_INT32

A thirty-two bit integer.

Corresponds to the primitive Java type int.

Fields of type SVR_INT32 cannot be null on the database.

SVR_INT64

A sixty-four bit integer.

Corresponds to the primitive Java type long.

Fields of type SVR_INT64 may be null on the database.

SVR_MONEY

A fixed point numeric value with two decimal places used for holding currency values.

Corresponds to the primitive Java type curam.util.type.Money.

Fields of type SVR_MONEY cannot be null on the database.

SVR_STRING

Used for holding string values.

Corresponds to the Java class java.lang.String.

A SVR_STRING may optionally have a length qualifier. A SVR_STRING without a length qualifier is a SVR_UNBOUNDED_STRING. Strings stored on the database must have a length qualifier to enable a maximum size to be specified for the database column.

A SVR_STRING can be stored on the database as either CHAR, VARCHAR or CLOB depending on its size and the type of database. For more information about storage options for strings, see Storage Options for String Domains.

Fields of type SVR_STRING may be null on the database.

SVR_UNBOUNDED_STRING

Used for holding string values for which a maximum length need not be specified.

Corresponds to the Java class java.lang.String.

SVR_UNBOUNDED_STRING is the only Cúram data type which cannot be used by an attribute of an entity class. This is because this data type does not allow the developer to specify its maximum size and therefore cannot be used to define a database column. To define a string field on an entity you must use SVR_STRING with a length qualifier.