package gw.rating.flow.domain uses javax.naming.OperationNotSupportedException class CostDataRoundingStatement extends Statement { var _roundMode : RoundingModeType as readonly RoundingMode var _scale : RoundingScaleType as readonly RoundingScale static final var _costDataSymbolKey : String as CostDataSymbolKey = ParseUtil.getInScopeVariableKey(CalcRoutineParamName.TC_COSTDATA) construct(mode : RoundingModeType, scale : RoundingScaleType) { this(mode, scale, null) } construct(mode : RoundingModeType, scale : RoundingScaleType, aHighlightElement: RateRoutineHighlightElement) { _roundMode = mode _scale = scale _highlightElement = aHighlightElement } override function generate(context: GenerationContext) { _start = context.beginCodeGen() context.WorksheetHelper.wrapStatement(this, \ -> { context.append(CostDataSymbolKey) context.append(".setRounding(") context.WorksheetHelper.wrapFunctionArgument("Scale", \ -> { context.append("typekey.RoundingScaleType.get(\"${RoundingScale.Code}\").ScaleValue") }) context.append(", ") context.WorksheetHelper.wrapFunctionArgument("Mode", \ -> { context.append("typekey.RoundingModeType.get(\"${RoundingMode.Code}\").ModeValue") }) context.append(")") }) _end = context.endCodeGen() } override function getOffendingOperand(issue: gw.lang.parser.IParseIssue) : CalcStepOperand { throw new OperationNotSupportedException() } }