1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method GetChildrenOfPeriodDimension () declarative remote as owning UnitPeriods 
 |  { 
 |    Description: 'Return all the direct children' 
 |    TextBody: 
 |    [* 
 |      // Return all children of period dimension in current unit period 
 |      // Note(1): If multiple same time-unit-level period specifications are created ( weekly, bi-weekly ), this method will return only  
 |      //          part of the children ( e.g, Monthly unit period will get either 4xWeekly or 2xBi-Weekly ) = sums up to 28 days only,  
 |      // Note(2): The remaining days will be filled in by 'basechildren', which returns system created unit periods 
 |       
 |      //select the mintimeunit level and nrof timeunit 
 |      periodspec := minselect( this, ChildOfPeriodDimension.Period_MP.PeriodSpecification_MP, spec, true,  spec.TimeUnitLevel(), spec.NrOfTimeUnit() ); 
 |      directchildren := selectset( this, ChildOfPeriodDimension, child, true, child.Period_MP().PeriodSpecification_MP() = periodspec ); 
 |      basechildren := selectset( this, UnitPeriodInPeriod.BaseUnitPeriodInPeriod, e, true ); 
 |       
 |      return directchildren.Union( basechildren ); 
 |    *] 
 |  } 
 |  
  |