Red Hat Web Application Framework 6.1 Manuale Utente
142
Chapter 11. Services Tutorials
}
versioned object type VTC3 {
BigInteger[1..1] id = t_vtc3.id INTEGER;
object key(id);
object key(id);
}
object type C2 {
BigInteger[1..1] id = t_c2.id INTEGER;
composite VTC3[1..1] vtc3 = join t_c2.composite_id to t_vtc3.id;
object key(id);
composite VTC3[1..1] vtc3 = join t_c2.composite_id to t_vtc3.id;
object key(id);
}
object type UT5 {
BigInteger[1..1] id = t_ut5.id INTEGER;
object key(id);
object key(id);
}
object type UT6 {
BigInteger[1..1] id = t_ut6.id INTEGER;
object key(id);
object key(id);
}
Example 11-9. Sample PDL definitions
For the sake of brevity, Example 11-9 only has key attributes for
object types
and does not show
any scalar attributes.
The graph in Figure 11-8 provides a visual representation of the above PDL definitions. Wheat-colored
The graph in Figure 11-8 provides a visual representation of the above PDL definitions. Wheat-colored
nodes represent
object types
that are marked as
versioned
in Example 11-9. There are two types
of edges. If an edge is labeled
extends
, it means that the type at the edge head extends, in the PDL
sense, the type at the edge tail. For example,
VT2
extends
VT1
. This relationship is important, because
subtypes of a versioned type are also versioned.
The other kind of edge is one that shows attributes of an object type. For example, consider the edge
The other kind of edge is one that shows attributes of an object type. For example, consider the edge
labeled
rqd:ut3attr
that connects
UT1
and
UT3
. It means that the
object type UT1
has a required
attribute
ut3attr
of type
UT3
.
There are two kinds of compound attributes that are important from the versioning point of view:
required (
rqd
) and components (
cnt
).