Example: Rows of Interface-Specific Tables

Meta Data Services Programming

Meta Data Services Programming

Example: Rows of Interface-Specific Tables

Consider the version graph for a typical object. Suppose the object is part of a user-installed information model; it conforms to the CParagraph class. Suppose further that the CParagraph class implements two interfaces:

  • IFont exposes the properties Color, Style, and PointSize.

  • IParagraph exposes the properties Alignment and Spacing.

The following figure shows a portion of the version graph, along with properties for each version of the object.

Assume that the object's internal identifier is 7. Assume that Version 7 and Version 9 are leaf nodes; they have no successors. Also assume that there are two branches containing these object versions, as shown in the following figure.

The properties for these object versions are stored in two separate interface-specific tables. The table for the properties of the IFont interface includes the following rows.

IntID Z_BranchID_Z Z_VS_Z Z_VE_Z Color Style Point Size
7 2 0 1 Blue Italic 10
7 2 3 VERINFINITY Blue Italic 10
7 2 0 VERINFINITY Blue Italic 10

The first row in the preceding table indicates that the properties (Blue, Italic, 10-point) apply to each object version in a range within Branch 2 that begins at Version 4 and ends at Version 5.

The second row indicates that the properties (Blue, Italic, 12-point) apply to each object version in a range within Branch 2 that begins at Version 9 and ends at the end of the branch.

Similarly, the third row indicates that the properties (Blue, Italic, 10-point) apply to each object version in a range within Branch 3 that begins at Version 6 and ends at the end of the branch.

The following table for the properties of the IParagraph interface includes the following rows.

IntID Z_BranchID_Z Z_VS_Z Z_VE_Z Alignment Spacing
7 2 0 0 Center Single
7 2 1 VERINFINITY Center Double
7 3 0 VERINFINITY Center Double

The first row of the preceding table indicates that the properties (Center, Single) apply to each object version in a range within Branch 2 that begins at Version 4 and ends at Version 4, a single-version range.

The second row indicates that the properties (Center, Double) apply to each object version in an unbounded range within Branch 2 that begins at Version 5.

Similarly, the third row indicates that the properties (Center, Double) apply to each object version in an unbounded range within Branch 3 that begins at Version 6.

Within the Z_VE_Z column, VERINFINITY indicates that the range has no upper bound. Thus, if you enlarge a branch (by invoking the CreateVersion method on the branch's newest object version) the creation predecessor's property values will automatically apply to the newly created version.

For example, suppose you invoke the CreateVersion method on Version 9, yielding a version graph, as shown in the following figure.

In the preceding figure, the new object version is on the same branch as its predecessor, and has the same properties as its predecessor. To apply these existing property values to the newly created object, the CreateVersion method does not need to modify the IFont-specific property table or the IParagraph-specific property table, because those tables contained rows that applied those property values to ranges with no upper bound.

See Also

Branches in the Version Graph

Ranges in the Version Graph

Repository SQL Schema

Repository SQL Tables

Storage Strategy in a Repository Database

Version Graph