The data-type attribute in a <property> tag defines the data type of a repository item property. A data type can either be a primitive type or refer to an item descriptor type. If you want to define a property that refers to another item, use the item-type attribute to refer to that item’s item descriptor.

For multi-valued types, set the data-type to one of array, list, set, or map. If the members of the collection are primitives or user defined property types, use the component-data-type attribute to set the data type of the collection members. Note that the SQL repository does not support multi-valued collections of binary type members. If the members of the collection are repository items, use the component-item-type attribute to specify the item descriptor name of the elements of the collection. For user-defined properties, use the property-type attribute to specify the Java class of the property’s type.

The following table shows how the data-type attribute names for the primitive types correspond to Java object types and SQL data types. Note that some SQL data types may vary, depending on the specific SQL implementation you are using. You can specify a different SQL data type correspondence by using the sql-type attribute of the <property> tag.

data-type Attribute Value

Java Object Type

Recommended SQL Data Type

string

String

VARCHAR
VARCHAR or CLOB (Oracle)

big string

String

LONG VARCHAR or CLOB
TEXT (Sybase or MS)

date

java.util.Date

DATETIME (Sybase or MS)
DATE (DB2 or Oracle)

timestamp

java.sql.Timestamp

DATETIME (Sybase or MS)
DATE (Oracle 8i)
TIMESTAMP (DB2 or Oracle 9i)

enumerated

String

INTEGER

boolean

Boolean

NUMERIC(1)
TINYINT (Sybase or MS)

int

Integer

INTEGER

byte

Byte

INTEGER

binary

byte[]

BINARY, VARBINARY or IMAGE
(Sybase or MS)
LONG RAW or BLOB (Oracle)
BLOB (DB2)

short

Short

INTEGER
SMALLINT (DB2, Sybase or MS)

float

Float

FLOAT (DB2, Sybase or MS)
NUMBER (Oracle)

double

Double

DOUBLE (DB2, Sybase or MS)
NUMBER (Oracle)

long

Long

NUMERIC(19)
BIGINT (DB2 or MS)

array

xxx[]

none

set

java.util.Set

none

list

java.util.List

none

map

java.util.Map

none

Clob and Blob Limitations

If you plan to use BLOBs (Binary Large Objects) or CLOBs (Character Large Objects), be sure that your database and JDBC driver work with the data and queries you plan to use. Comparison queries (=, !=, <, <=, >, >=) do not work with BLOBs or CLOBs. In addition, Oracle versions before 9.2 do not support pattern-match queries (CONTAINS, STARTS_WITH, ENDS_WITH) against CLOBs. BLOBs and CLOBs are not supported if your Oracle JDBC driver is a Thin driver (any version) or an OCI driver version before 8.1.7.

 
loading table of contents...