Editing Entity Attribute Settings

While you are editing entity attributes in the Attribute Editor or editing a view attribute in the Attribute Editor, use, you can use the Attribute Settings panel to define attribute settings for all attributes of an entity object.

Attribute

Name

A valid Java identifier name which is also unique within this entity object. The accessor methods for the attribute will be known by this name.

Type

Enter one of the given types, domains, or any Java value-holder class name, such as java.math.BigDecimal. If a domain object is selected as the Java datatype for an attribute, then the attribute should respect the domain settings; it can only restrict the settings further.

Default

Provide a default value for this attribute. When a new row is created, this attribute will initially get this default value at runtime.

Primary Key

Select this option if this attribute is a part of or is a primary key for the entity. At least one attribute in an entity must be defined as a primary key attribute.

Mandatory

Select this option if this attribute cannot have a null value at runtime. The mandatory check is done by the framework during entity-level validation and not during the entity-attribute level.

Persistent

Select this option if this attribute is mapped to a column in a database table. This option enables the Database Column group box to allow column settings to forward generate tables from an entity object definition.

Updateable

Always

When this option is selected, the selected attribute may be updated.

While New

When this option is selected, the attribute can be updated only when it is part of a new, uncommitted row: the attribute can only be updated before it is written to a database object.

Never

When this option is selected, the selected attribute may not be updated.

Refresh After

Update

Select this checkbox if all attributes should have their values refreshed after the row containing that attribute is posted to the database. This property is typically selected for those attributes whose values are modified inside the database via some database procedures or triggers and the framework needs to reload the data for that attribute when the relative row is posted to the database.

Insert

Refresh after insert is typically selected for those attributes whose value is generated by the database when a new row is posted into it, for example, sequence numbers. You can use this feature to assign primary key values from a sequence in a database trigger.

Database Column

These settings are used for forward generation of new tables from an entity object and for hints to a UI client regarding the attributes' database properties.

Name

The name of the database column this attribute is mapped to.

Type

The column type in the database that this attribute is mapped to. The column type information also shows precision and scale information for numeric types and length for String types. This precision and scale is enforced by the framework at runtime.

Queriable

When this checkbox is selected, the selected attribute can participate in a query condition. If the columns (to which attributes of this domain type are mapped) can be part of a query filter (a WHERE clause), then this property should be selected. For example, this property should be selected for NUMBER column types, but not set for BLOB types.

Unique

When this checkbox is selected, there can be at most one row where the selected attribute has any given value. If this property is added to an attribute, the appropriate database constraint will be created along with the database object in the Create Database Objects operation from the package context menu (right-click on the package in the Navigation pane).

Change Indicator

When this checkbox is selected, the selected attribute becomes a timestamp field that contains the date that row was last updated. Only one attribute in an entity object may have this property.