<!ELEMENT property (<derivation>?, (<option> | <attribute>)*)>

Parent: <item-descriptor>, <<table>>

A <property> tag can be a child of the <item-descriptor> tag or a <table> tag:

  • If a child of an <item-descriptor> tag, <property> defines a transient property of the repository item. Because such a transient property is not associated with any database table, it is not stored when the repository item is updated in the database. Transient properties are readable and writable, but are not queryable. See the Transient Properties section of this chapter.

  • If a child of a <table> tag, <property> defines a persistent property in a repository item. A <property> tag that is a direct child of an <item-descriptor> tag defines a transient characteristic of a repository item. Because such a transient property is not associated with any database table, it is not stored when the repository item is updated in the database.

Attributes

Attribute

Description

name

The property name (required)

cache-mode

The caching mode for this property, one of the following:

disabled
inherit

A property’s caching mode supersedes the item descriptor’s caching mode. To restore the default caching mode, set cache-mode to inherit. See SQL Repository Caching.

cascade

One or more of the following, separated by commas:

insert
update
delete

See Cascading Data Relationships.

category

Specifies a category that this property shares with other item properties. Item properties that belong to the same category can be grouped together in a user interface, rather than in alphabetical order according to their display-name attributes. See Grouping and Sorting Properties in the SQL Repository Item Properties chapter.

category-resource

If a resource bundle is specified for this property with the tag <attribute name=resourceBundle>, this attribute specifies the resource bundle key to the property’s category. See Localizing SQL Repository Definitions.

column-names

The column name or names in the SQL database

Default: value of name

component-data type

If data-type is set to an array, list, set or map of primitive values, this attribute specifies the primitive data type. The data-type can be any valid value other than array, list, set or map. Every element that the property references must be of this data type.

component-item-type

The name of another item descriptor referenced by this property. If data-type is set to array, list, set, or map, this attribute specifies the type of items that are referenced. All referenced items must be of the same base type.

data-type

Required unless item-type or property-type is set, one of the following:

string        int       byte         array
big string    short     binary       set
enumerated    long      date         list
boolean       float     timestamp    map
              double

See Data Type Mappings: Java and SQL in this section for information about how these values map to Java and SQL data types.

default

A default value for the property if none is supplied when the repository item is created. A default value cannot be set for multi-valued properties.

description

Optionally describes this property.

Default: value of name

description-resource

If a resource bundle is specified for this property with the tag <attribute name=resourceBundle>, this attribute specifies the resource bundle key to the property’s description. See Localizing SQL Repository Definitions.

display-name

Optional, used to identify the property in the user interface.

Default: value of name

display-name-resource

If a resource bundle is specified for this property with the tag <attribute name=resourceBundle>, this attribute specifies the resource bundle key to the property’s display name. See Localizing SQL Repository Definitions.

editor-class

The Java class name of a PropertyEditor to use for this property. See the JavaBeans specification for a description of PropertyEditors.

expert

Boolean

Default: false

group

Specifies a group shared with other properties so they can be loaded in the same SELECT statement. The default group name is the table name.

You can set the group for a property to add or remove properties from these default groups. This gives you a simple way to optimize the SQL generated by the repository.

hidden

Boolean, if true, suppresses display in the ATG Control Center.

Default: false

item-type

The name of another <item-descriptor>.

If the value of this property is another repository item, specifies the item descriptor type of that repository item. Required if the data-type or property-type attribute is not specified.

property-type

The Java class of a user-defined property. See User-Defined Property Types.

Do not use this attribute for id properties.

queryable

Boolean, can be true for transient properties only if the entire item descriptor is also transient. See Transient Properties in this chapter.

Default: true

readable

Boolean

Default: true

repository

The Nucleus address of another repository, specifies that this property’s value refers to one or more repository items in the specified repository. If you specify a relative path, it is relative to this repository. See Linking between Repositories.

required

Boolean, must be set to true if the corresponding database column is defined as NOT NULL.

Default: false

sql-type

The SQL type of the corresponding column if it is different from the default type for the data-type, as specified under Data Type Mappings: Java and SQL.

writable

Boolean

Default: true

Xml:id

Typically used for XML file combination, where elements with the same ID are regarded as the same element.

Data Type Settings

The data-type attribute in a <property> tag defines the data type of a repository item property. A data type can 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 data-type to array, list, set, or map. If the elements referenced by this property are primitives or user-defined property types, set their data type with the component-data-type attribute. Note that the SQL repository does not support multi-valued properties that reference binary type elements. If a multi-valued property references repository items, specify their item type with the property’s component-item-type attribute. For user-defined properties, use the property-type attribute to specify the Java class of the property’s type.

Data Type Mappings: Java and SQL

The following table shows how the data-type attribute names for the primitive types correspond to Java object types and SQL data types. Some SQL data types vary according to your SQL implementation. You can explicitly specify a SQL data type mapping by setting the sql-type attribute.

data-type value

Java object type

Recommended SQL data type

array

xxx[]

none

big string

String

LONG VARCHAR, CLOB
TEXT (MS)

binary

byte[]

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

boolean

Boolean

NUMERIC(1)
TINYINT (MS)

byte

Byte

INTEGER

date

java.util.Date

DATETIME (MS)
DATE (DB2, Oracle)

double

Double

DOUBLE (DB2, MS)
NUMBER (Oracle)

enumerated

String

INTEGER

float

Float

FLOAT (DB2, MS)
NUMBER (Oracle)

int

Integer

INTEGER

list

java.util.List

none

long

Long

NUMERIC(19)
BIGINT (DB2, MS)

map

java.util.Map

none

set

java.util.Set

none

short

Short

INTEGER
SMALLINT (DB2, MS)

string

String

VARCHAR
VARCHAR, CLOB (Oracle)

timestamp

java.sql.Timestamp

DATETIME (MS)
DATE (Oracle 8i)
TIMESTAMP (DB2, Oracle 9i)

CLOB and BLOB constraints

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. Also, Oracle versions before 9.2 do not support pattern-match queries (CONTAINS, STARTS_WITH, ENDS_WITH) against CLOBs.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices