lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Quintiq file version 2.0
#parent: #root
StaticMethod Create (LibDMF_CommunicationChannelRoot owner_i)
{
  Description: 'This is a create template that should be copied into subclasses of this class'
  TextBody:
  [*
    // Timothy Guan Jun-12-2015 (created)
    
    LibDMF_Util::LogError( owner_i.SystemShortName(),
                           "LibDMF_CommunicationChannel::Create() is a template which should be copied into a subclass" );
    
    /* This is an example
    
    // Only create if it does not exist yet.
    channel := select( owner_i, CommunicationChannel.astype( DMChannelProductHierarchy ), cc,
                       cc.Name() = LibDMC_ChannelProductHierarchy::ChannelProductHierarchy() );
    
    if( isnull( channel ) )
    {
      channel := owner_i.CommunicationChannel( relnew, DMChannelProductHierarchy,
                                               Name := LibDMC_ChannelProductHierarchy::ChannelProductHierarchy(),
                                               ObjectTypeName := LibDMC_ChannelProductHierarchy::ChannelProductHierarchyObject() );
    }
    
    return channel;
    */
  *]
}