Ableverse™
TOB 6.0

av.tob
Interface Kin<R extends TheRelation,T extends TheObject>

Type Parameters:
R - class of the source relation
T - class of the related object
All Known Implementing Classes:
TheRelation, TheRelation.Tie

public interface Kin<R extends TheRelation,T extends TheObject>

The Kin interface serves as the type of kin fields, or type of iterable objects in kin set fields.

Kin and KinSet fields are means by which persistent objects can reach their related objects that related by existence of corresponding relation objects.

A relation object ties 2 or more persistent objects together with 2 or more Tie fields. The tied objects each performs its own role in the relation, which is reflected by name of the Tie field tying it. These tied objects directly see eachother through their own Kin and KinSet fields.

A relation object can also have only 1 Tie field, which used to tie itself to another object. In this case the tied object can have a direct Kin or KinSet field to see back the relation object.

A kin presents a related object connected via existence of a source relation object. The R type parameter declares the source relation class of the kin, while the T type parameter declares the class of the related object. Roles in the source relation are essential for kins. To define the semantics of a Kin or KinSet field, 2 list of roles are concerned:

Self Roles
A list of names of Tie fields in the source relation class, that may tie the object defines the Kin or KinSet field. This list may be explicitly specified with a IAm annotation. Or TOB can determine it by comparing the defining class to target type of all Tie fields in the source relation class.
Target Roles
A list of names of Tie fields in the source relation class, that may tie the related object. This list may be explicitly specified with a ThisIs annotation for a Kin field or with a TheyAre annotation for a KinSet field. Or TOB can determine it by comparing the related object class (the T) to target type of all Tie fields in the source relation class.

The runtime values of Kin fields and contents of KinSet fields are automatically maintained by TOB, according to corresponsive relation object manipulations. Applications just define and read these fields to traverse across the persistent object topograph.

See the Object-Relation-Kin Model.

Author:
Compl

Method Summary
 T getO()
          Get the related object of this kin.
 R getR()
          Get the source relation object of this kin.
 

Method Detail

getR

R getR()
Get the source relation object of this kin.

Returns:
the source relation object

getO

T getO()
Get the related object of this kin.

Returns:
the related object

Ableverse™
TOB 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.