RelationDescription Class Reference

Detailed Description

Instances of RelationDescription describe relations between different types of PersistentObjects.

A relation always has two ends: 'this' end and 'other' end.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 21 of file RelationDescription.php.

+ Inheritance diagram for RelationDescription:

Public Member Functions

 __construct ($thisType, $thisRole, $otherType, $otherRole, $thisMinMultiplicity, $thisMaxMultiplicity, $otherMinMultiplicity, $otherMaxMultiplicity, $thisAggregationKind, $otherAggregationKind, $thisNavigability, $otherNavigability, $hierarchyType)
 
 isMultiValued ()
 
 getThisType ()
 
 getThisMapper ()
 
 getThisRole ()
 
 getOtherType ()
 
 getOtherMapper ()
 
 getOtherRole ()
 
 getThisMinMultiplicity ()
 
 getThisMaxMultiplicity ()
 
 getOtherMinMultiplicity ()
 
 getOtherMaxMultiplicity ()
 
 getThisAggregationKind ()
 
 getOtherAggregationKind ()
 
 getThisNavigability ()
 
 getOtherNavigability ()
 
 getHierarchyType ()
 
 isSameRelation (RelationDescription $other)
 

Protected Attributes

 $thisType = ''
 
 $thisRole = ''
 
 $otherType = ''
 
 $otherRole = ''
 
 $thisMinMultiplicity = '0'
 
 $thisMaxMultiplicity = 'unbound'
 
 $otherMinMultiplicity = '0'
 
 $otherMaxMultiplicity = 'unbound'
 
 $thisAggregationKind = 'none'
 
 $otherAggregationKind = 'none'
 
 $thisNavigability = true
 
 $otherNavigability = true
 
 $hierarchyType = 'undefined'
 

Constructor & Destructor Documentation

__construct (   $thisType,
  $thisRole,
  $otherType,
  $otherRole,
  $thisMinMultiplicity,
  $thisMaxMultiplicity,
  $otherMinMultiplicity,
  $otherMaxMultiplicity,
  $thisAggregationKind,
  $otherAggregationKind,
  $thisNavigability,
  $otherNavigability,
  $hierarchyType 
)

Constructor.

Parameters
$thisTypeThe PersistentObject type at this end
$thisRoleThe role name at this end
$otherTypeThe PersistentObject type at the other end
$otherRoleThe role name at the other end
$thisMinMultiplicityThe minimum number of instances at this end (number or 'unbound')
$thisMaxMultiplicityThe maximum number of instances at this end (number or 'unbound')
$otherMinMultiplicityThe minimum number of instances at the other end (number or 'unbound')
$otherMaxMultiplicityThe maximum number of instances at the other end (number or 'unbound')
$thisAggregationKindThe aggregation kind at this end ('none', 'shared' or 'composite')
$otherAggregationKindThe aggregation kind at the other end ('none', 'shared' or 'composite')
$thisNavigabilityBoolean whether this end is navigable from the other end or not
$otherNavigabilityBoolean whether the other end is navigable from this end or not
$hierarchyTypeThe hierarchy type that the other end has in relation to this end ('parent', 'child', 'undefined')

Definition at line 59 of file RelationDescription.php.

Member Function Documentation

isMultiValued ( )

Determine if there may more than one objects at the other side of the relation.

Returns
Boolean

Definition at line 86 of file RelationDescription.php.

getThisType ( )

Get the PersistentObject type at this end.

Returns
String

Definition at line 98 of file RelationDescription.php.

getThisMapper ( )

Get the PersistentMapper at this end.

Returns
PersistenceMapper

Definition at line 106 of file RelationDescription.php.

getThisRole ( )

Get the role name at this end.

Returns
String

Definition at line 114 of file RelationDescription.php.

getOtherType ( )

Get the PersistentObject type at the other end.

Returns
String

Definition at line 122 of file RelationDescription.php.

getOtherMapper ( )

Get the PersistentMapper at the other end.

Returns
PersistenceMapper

Definition at line 130 of file RelationDescription.php.

getOtherRole ( )

Get the role name at the other end.

Returns
String

Definition at line 138 of file RelationDescription.php.

getThisMinMultiplicity ( )

Get the minimum number of instances at this end.

Returns
Number or 'unbound'

Definition at line 146 of file RelationDescription.php.

getThisMaxMultiplicity ( )

Get the maximum number of instances at this end.

Returns
Number or 'unbound'

Definition at line 154 of file RelationDescription.php.

getOtherMinMultiplicity ( )

Get the minimum number of instances at the other end.

Returns
Number or 'unbound'

Definition at line 162 of file RelationDescription.php.

getOtherMaxMultiplicity ( )

Get the maximum number of instances at the other end.

Returns
Number or 'unbound'

Definition at line 170 of file RelationDescription.php.

getThisAggregationKind ( )

Get the aggregation kind at this end.

Returns
String 'none', 'shared' or 'composite'

Definition at line 178 of file RelationDescription.php.

getOtherAggregationKind ( )

Get the aggregation kind at the other end.

Returns
String 'none', 'shared' or 'composite'

Definition at line 186 of file RelationDescription.php.

getThisNavigability ( )

Check whether this end is navigable from the other end or not.

Returns
Boolean

Definition at line 194 of file RelationDescription.php.

getOtherNavigability ( )

Check whether the other end is navigable from this end or not.

Returns
Boolean

Definition at line 202 of file RelationDescription.php.

getHierarchyType ( )

Get the hierarchy type that the other end has in relation to this end.

Returns
String 'parent', 'child', 'undefined'

Definition at line 210 of file RelationDescription.php.

isSameRelation ( RelationDescription  $other)

Check if another RelationDescription instance describes the same relation as this one.

This is true if they connect the same types using the same role names (independent from the direction). All other attributes are not compared.

Parameters
$otherThe other RelationDescription
Returns
Boolean

Definition at line 221 of file RelationDescription.php.

Member Data Documentation

$thisType = ''
protected

Definition at line 23 of file RelationDescription.php.

$thisRole = ''
protected

Definition at line 24 of file RelationDescription.php.

$otherType = ''
protected

Definition at line 25 of file RelationDescription.php.

$otherRole = ''
protected

Definition at line 26 of file RelationDescription.php.

$thisMinMultiplicity = '0'
protected

Definition at line 28 of file RelationDescription.php.

$thisMaxMultiplicity = 'unbound'
protected

Definition at line 29 of file RelationDescription.php.

$otherMinMultiplicity = '0'
protected

Definition at line 30 of file RelationDescription.php.

$otherMaxMultiplicity = 'unbound'
protected

Definition at line 31 of file RelationDescription.php.

$thisAggregationKind = 'none'
protected

Definition at line 33 of file RelationDescription.php.

$otherAggregationKind = 'none'
protected

Definition at line 34 of file RelationDescription.php.

$thisNavigability = true
protected

Definition at line 36 of file RelationDescription.php.

$otherNavigability = true
protected

Definition at line 37 of file RelationDescription.php.

$hierarchyType = 'undefined'
protected

Definition at line 39 of file RelationDescription.php.