chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
30
Quintiq file version 2.0
#parent: #root
StaticMethod GetDataset (
  String datasetName_i
) as stream[LibDIF_IntegrationDataset]
{
  Description:
  [*
    Get the Integration-dataset of the planning-dataset of which the name is provided.
    The Integration-dataset is expected to be loaded.
  *]
  TextBody:
  [*
    includeOffline := false;
    datasetKey     := LibDIF_IntegrationDataset::FindDatasetKey( datasetName_i, includeOffline );
    dataset        := null( stream[LibDIF_IntegrationDataset] );
    
    if( datasetKey <> Key::ZeroKey() )
    {
      dataset := LibDIF_IntegrationDataset::GetRoot( datasetKey );
    }
    else
    {
      LibDIF_Util::Error( "Integration-dataset '" + LibDIF_IntegrationDataset::GetFullName( datasetName_i ) + "' of " +
                          "planning-dataset '" + datasetName_i + "' is not loaded" ); 
    }
    
    return dataset;
  *]
}