Search in sources :

Example 1 with Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl

use of org.finos.legend.pure.generated.Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl in project legend-engine by finos.

the class HelperServiceBuilder method processServiceKeyedExecutionParameter.

private static Root_meta_legend_service_metamodel_KeyedExecutionParameter processServiceKeyedExecutionParameter(KeyedExecutionParameter keyedExecutionParameter, CompileContext context, Set<String> executionKeyValues) {
    Mapping mapping = context.resolveMapping(keyedExecutionParameter.mapping, keyedExecutionParameter.mappingSourceInformation);
    inferEmbeddedRuntimeMapping(keyedExecutionParameter.runtime, keyedExecutionParameter.mapping);
    org.finos.legend.pure.m3.coreinstance.meta.pure.runtime.Runtime runtime = HelperRuntimeBuilder.buildPureRuntime(keyedExecutionParameter.runtime, context);
    HelperRuntimeBuilder.checkRuntimeMappingCoverage(runtime, Lists.fixedSize.of(mapping), context, keyedExecutionParameter.runtime.sourceInformation);
    if (!executionKeyValues.add(keyedExecutionParameter.key)) {
        throw new EngineException("Execution parameter with key '" + keyedExecutionParameter.key + "' already existed", keyedExecutionParameter.sourceInformation, EngineErrorType.COMPILATION);
    }
    return new Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl("")._key(keyedExecutionParameter.key)._mapping(mapping)._runtime(runtime);
}
Also used : EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl(org.finos.legend.pure.generated.Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping)

Aggregations

EngineException (org.finos.legend.engine.shared.core.operational.errorManagement.EngineException)1 Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl (org.finos.legend.pure.generated.Root_meta_legend_service_metamodel_KeyedExecutionParameter_Impl)1 Mapping (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping)1