Java Reference
In-Depth Information
children += self .requirements. map toRequirement();
}
mapping old::Requirement::toRequirement() : new::Requirement {
id := self .id;
name := self .title;
description := self .description;
type := self .type.toType();
children += self .children. map toRequirement();
priority := self .priority.toPriority();
author := self .author;
created := self .created;
comments += self .comments. map toComment();
version := self .version. map toVersion();
dependencies += self .dependencies. late resolve (new::Requirement);
scenario := self .scenario;
state := self .state.toState();
resolution := self .resolution.toResolution();
}
mapping old::Comment::toComment() : new::Comment {
subject := self .subject;
body := self . body ;
author := self .author;
created := self .created;
children += self .children. map toComment();
}
mapping old::Version::toVersion() : new::Version {
major := self .major;
minor := self .minor;
service := self .service;
}
query old::State::toState() : new::State {
var state : new::State := null ;
switch {
( self = old::State::NEW) ? state := new::State::NEW;
( self = old::State::REVIEWED) ?
state := new::State::REVIEWED;
( self = old::State::APPROVED) ?
state := new::State::APPROVED;
( self = old::State::RESOLVED) ?
state := new::State::RESOLVED;
else ? assert fatal ( false )
with log ('State unsupported', self );
};
return state;
}
-- The remaining queries toType(), toPriority(), and toResolution()
not shown
Search WWH ::




Custom Search