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()

__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()

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()

getThisType ( )

Get the PersistentObject type at this end.

Returns
String

Definition at line 98 of file RelationDescription.php.

◆ getThisMapper()

getThisMapper ( )

Get the PersistentMapper at this end.

Returns
PersistenceMapper

Definition at line 106 of file RelationDescription.php.

◆ getThisRole()

getThisRole ( )

Get the role name at this end.

Returns
String

Definition at line 114 of file RelationDescription.php.

◆ getOtherType()

getOtherType ( )

Get the PersistentObject type at the other end.

Returns
String

Definition at line 122 of file RelationDescription.php.

◆ getOtherMapper()

getOtherMapper ( )

Get the PersistentMapper at the other end.

Returns
PersistenceMapper

Definition at line 130 of file RelationDescription.php.

◆ getOtherRole()

getOtherRole ( )

Get the role name at the other end.

Returns
String

Definition at line 138 of file RelationDescription.php.

◆ getThisMinMultiplicity()

getThisMinMultiplicity ( )

Get the minimum number of instances at this end.

Returns
Number or 'unbound'

Definition at line 146 of file RelationDescription.php.

◆ getThisMaxMultiplicity()

getThisMaxMultiplicity ( )

Get the maximum number of instances at this end.

Returns
Number or 'unbound'

Definition at line 154 of file RelationDescription.php.

◆ getOtherMinMultiplicity()

getOtherMinMultiplicity ( )

Get the minimum number of instances at the other end.

Returns
Number or 'unbound'

Definition at line 162 of file RelationDescription.php.

◆ getOtherMaxMultiplicity()

getOtherMaxMultiplicity ( )

Get the maximum number of instances at the other end.

Returns
Number or 'unbound'

Definition at line 170 of file RelationDescription.php.

◆ getThisAggregationKind()

getThisAggregationKind ( )

Get the aggregation kind at this end.

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

Definition at line 178 of file RelationDescription.php.

◆ getOtherAggregationKind()

getOtherAggregationKind ( )

Get the aggregation kind at the other end.

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

Definition at line 186 of file RelationDescription.php.

◆ getThisNavigability()

getThisNavigability ( )

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

Returns
Boolean

Definition at line 194 of file RelationDescription.php.

◆ getOtherNavigability()

getOtherNavigability ( )

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

Returns
Boolean

Definition at line 202 of file RelationDescription.php.

◆ getHierarchyType()

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()

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

$thisType = ''
protected

Definition at line 23 of file RelationDescription.php.

◆ $thisRole

$thisRole = ''
protected

Definition at line 24 of file RelationDescription.php.

◆ $otherType

$otherType = ''
protected

Definition at line 25 of file RelationDescription.php.

◆ $otherRole

$otherRole = ''
protected

Definition at line 26 of file RelationDescription.php.

◆ $thisMinMultiplicity

$thisMinMultiplicity = '0'
protected

Definition at line 28 of file RelationDescription.php.

◆ $thisMaxMultiplicity

$thisMaxMultiplicity = 'unbound'
protected

Definition at line 29 of file RelationDescription.php.

◆ $otherMinMultiplicity

$otherMinMultiplicity = '0'
protected

Definition at line 30 of file RelationDescription.php.

◆ $otherMaxMultiplicity

$otherMaxMultiplicity = 'unbound'
protected

Definition at line 31 of file RelationDescription.php.

◆ $thisAggregationKind

$thisAggregationKind = 'none'
protected

Definition at line 33 of file RelationDescription.php.

◆ $otherAggregationKind

$otherAggregationKind = 'none'
protected

Definition at line 34 of file RelationDescription.php.

◆ $thisNavigability

$thisNavigability = true
protected

Definition at line 36 of file RelationDescription.php.

◆ $otherNavigability

$otherNavigability = true
protected

Definition at line 37 of file RelationDescription.php.

◆ $hierarchyType

$hierarchyType = 'undefined'
protected

Definition at line 39 of file RelationDescription.php.