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 |
| VARCHAR |
big string |
| LONG VARCHAR or CLOB |
date |
| DATETIME (Sybase or MS) |
timestamp |
| DATETIME (Sybase or MS) |
enumerated |
| INTEGER |
boolean |
| NUMERIC(1) |
int |
| INTEGER |
byte |
| INTEGER |
binary |
| BINARY, VARBINARY or IMAGE |
short |
| INTEGER |
float |
| FLOAT (DB2, Sybase or MS) |
double |
| DOUBLE (DB2, Sybase or MS) |
long |
| NUMERIC(19) |
array |
| none |
set |
| none |
list |
| none |
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.