Quintiq file version 2.0
|
#parent: #root
|
Method GetIdentifierValidateBody () as String
|
{
|
TextBody:
|
[*
|
looptext := "";
|
traverse( this, TG_UIObjectIdentifier, id )
|
{
|
if( looptext <> "" )
|
{
|
looptext := looptext + " + ';' + ";
|
}
|
argname := id.CreatedName().ToLower();
|
looptext := looptext + "'" + argname + "=' + [String]" + argname;
|
}
|
|
body := "run.RegisterFailure( 'Not implemented yet.' );
|
|
instance := null( Object ); // TODO
|
|
type := '@WRAPPEDINSTANCETYPE@';
|
text := @CHECKTEXT@;
|
|
if( checkexist )
|
{
|
run.AssertNotIsNull( instance, 'Checking exists ' + type + '. [' + text + ']' );
|
}
|
else
|
{
|
run.AssertIsNull( instance, 'Checking not exists ' + type + '. ' + text + ']' );
|
}"
|
.ReplaceAll( '@WRAPPEDINSTANCETYPE@', this.ModeledType() )
|
.ReplaceAll( '@CHECKTEXT@', looptext );
|
|
return body;
|
|
|
|
/*
|
body := "";
|
|
if( this.HasIdentifier() )
|
{
|
body := "instance := null( Object ); // TODO
|
|
run.RegisterFailure( 'Not implemented yet.' );
|
|
type := 'Operation';
|
|
";
|
|
looptext := "";
|
traverse( this, TG_UIObjectIdentifier, id )
|
{
|
if( looptext <> "" )
|
{
|
looptext := looptext + " + ';' + ";
|
}
|
argname := id.TG_UIObjectAttribute().CreatedName().ToLower();
|
looptext := looptext + "'" + argname + "=' + [String]" + argname;
|
}
|
|
body := body + "text := " + looptext;
|
|
body := body + ";
|
|
if( checkexist )
|
{
|
run.AssertNotIsNull( instance, 'Checking exists ' + instance.DefinitionName() + '. [' + text + ']' );
|
}
|
else
|
{
|
run.AssertIsNull( instance, 'Checking not exists ' + instance.DefinitionName() + '. ' + text + ']' );
|
}";
|
}
|
|
return body;
|
*]
|
}
|