Previous Next

Attribute Characteristics

EOModeler provides three mechanisms for viewing and modifying an entity’s attributes: the table mode of the model editor, the diagram view of the model editor, and the Attribute Inspector. You can use any of the mechanisms to examine the characteristics of your model’s attributes and to make refinements. Each has advantages over the other and is useful in different circumstances.

To display an entity’s attributes in table mode, select an entity in the tree view. Figure 4-1 shows the attributes of an entity called Rating.

Figure 4-1 An entity’s attributes

[image: ../Art/attribute_more_columns.gif]

Each table column corresponds to a single characteristic of the attribute, such as its name, external type, or precision. By default, the columns included in this view represent only a subset of possible characteristics you can set for a given attribute. To add columns for additional characteristics, you use the Add Column pop-up menu in the lower-left corner of the table, as shown in Figure 4-1. You can also resize and rearrange columns in the table.

Table 4-1 describes the characteristics you can set for an attribute. Unless otherwise specified, the instructions are for editing the characteristic in the model editor’s table mode. Some of the characteristics are described in more detail in the cross-referenced sections.


Table 4-1 Attribute characteristic definitions

CharacteristicWhat it isHow you modify it
Allows NullIndicates whether the attribute can have a null value. See “Allows Null”.Click in the column with the checkmark to toggle the option on and off. You can also edit this characteristic in the Attribute Inspector.
Class PropertyIndicates that you want to include the attribute in your Enterprise Object classes. See “Class Property”.Click in the diamond column to toggle the option on and off. You can also edit this characteristic in diagram view.
Client-Side Class PropertyIndicates that you want to include the attribute in your Enterprise Object classes that live on the client side of Java Client applications. See “Client-Side Class Property”.Click in the column with the two opposing arrows to toggle the option on and off.
ColumnThe name of the column in the data source that corresponds to the attribute.Edit the table cell.
DefinitionThe SQL definition for a derived attribute. Note that Column and Definition are mutually exclusive; you can’t set both. Setting one clears the other. See “Definition (Derived Attributes)”.Edit the table cell.
External TypeThe data type of the attribute as it’s understood by the data source.Choose a value from the pop-up menu.
LockingIndicates whether an attribute participates in optimistic locking. See “Locking”.Click in the pad-lock column to toggle locking off and on for a particular attribute. You can also edit this characteristic in diagram view.
NameThe name of the attribute as it appears in your application and in your enterprise objects. EOModeler derives a default name based on the corresponding column in the data source which you can edit if necessary.Edit the table cell. You can also edit this characteristic in diagram view.
PrecisionThe number of significant digits. The number 12.34 has a precision of four and a scale of 2.Edit the table cell or use the Attribute Inspector.
Primary KeyDeclares whether a property is or is part of the entity’s primary key. See “Primary Key”.Click in the key column to toggle the primary key off and on. You can also edit this characteristic in diagram view.
PrototypeA prototype attribute from which this attribute derives its characteristics. See “Prototype Attributes”.Choose a value from the pop-up menu. See “Prototype Attributes” to learn where these values are defined.
Read FormatThe format string that’s used to format the attribute’s value for SQL SELECT statements. In the string, %P is replaced by the attribute’s external name. This string is used whenever the attribute is referenced in a SQL select statement or qualifier. See “Read Format and Write Format”.Edit the table cell.
Read OnlyIndicates whether the attribute is read only.Use the Advanced Attribute Inspector.
ScaleThe number of digits to the right of the decimal point. Can be negative. Applies only to noninteger, numerical types. The number 12.34 has a scale of 2.Edit the table cell or use the Attribute Inspector.
Value ClassNot applicable in WebObjects 5. 
Value Class (Java)The Java type to which the attribute will be coerced in your enterprise objects.Edit the table cell or use the Attribute Inspector.
Value Class (Obj-C)Not applicable in WebObjects 5. 
Value TypeThe conversion character (such as “i” or “d”) the JDBC adaptor uses to communicate with the data source. See “Value Type”.Edit the table cell or use the Attribute Inspector.
WidthThe maximum width in bytes or chars of the attribute (applies to string and raw data only).Edit the table cell or use the Attribute Inspector.
Write FormatThe format string that’s used to format the attribute’s value for SQL INSERT or UPDATE expressions. In the string, %V is replaced by the attribute’s external name.

For LDAP data sources accessed via the JNDI adaptor, write format specifies the pattern used to generate the relative distinguished name. See “Read Format and Write Format”.

Edit the table cell.




Previous Next


© 2002 Apple Computer, Inc. (Last Updated November 2002)