Search in sources :

Example 1 with EnumerationMapping

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping in project legend-engine by finos.

the class HelperRelationalBuilder method processRelationalPropertyMapping.

private static PropertyMapping processRelationalPropertyMapping(RelationalPropertyMapping propertyMapping, CompileContext context, PropertyMappingsImplementation immediateParent, InstanceSetImplementation topParent, MutableList<EmbeddedRelationalInstanceSetImplementation> embeddedRelationalPropertyMappings, RichIterable<EnumerationMapping<Object>> allEnumerationMappings, MutableMap<String, TableAlias> aliasMap) {
    org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping rpm = new Root_meta_relational_mapping_RelationalPropertyMapping_Impl("");
    Property property = resolvePropertyForRelationalPropertyMapping(propertyMapping, immediateParent, context);
    if (propertyMapping.bindingTransformer != null) {
        return buildSemiStructuredPropertyMapping(property, propertyMapping, immediateParent, (RootRelationalInstanceSetImplementation) topParent, embeddedRelationalPropertyMappings, aliasMap, context);
    }
    org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping res = rpm._property(property)._localMappingProperty(propertyMapping.localMappingProperty != null)._relationalOperationElement(processRelationalOperationElement(propertyMapping.relationalOperation, context, aliasMap, FastList.newList()))._sourceSetImplementationId(HelperRelationalBuilder.getPropertyMappingSourceId(propertyMapping, immediateParent, property, context))._targetSetImplementationId(HelperRelationalBuilder.getPropertyMappingTargetId(propertyMapping, immediateParent, property, context))._owner(immediateParent);
    rpm.setSourceInformation(SourceInformationHelper.toM3SourceInformation(propertyMapping.sourceInformation));
    if (propertyMapping.enumMappingId != null) {
        EnumerationMapping<Object> eMap = allEnumerationMappings.select(e -> e._name().equals(propertyMapping.enumMappingId)).getFirst();
        Assert.assertTrue(eMap != null, () -> "Can't find enumeration mapping '" + propertyMapping.enumMappingId + "'");
        res = res._transformer(eMap);
    }
    return res;
}
Also used : Maps(org.eclipse.collections.impl.factory.Maps) Decimal(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Decimal) RootRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RootRelationalInstanceSetImplementation) Predicate(org.eclipse.collections.api.block.predicate.Predicate) Join(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.join.Join) BusinessMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.BusinessMilestoning) SemiStructuredEmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.SemiStructuredEmbeddedRelationalInstanceSetImplementation) PropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping) RichIterable(org.eclipse.collections.api.RichIterable) EnumerationMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.EnumerationMapping) Root_meta_relational_metamodel_datatype_TinyInt_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_TinyInt_Impl) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) Root_meta_relational_mapping_ColumnMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_ColumnMapping_Impl) Root_meta_relational_metamodel_datatype_Numeric_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Numeric_Impl) Root_meta_relational_metamodel_datatype_Varchar_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Varchar_Impl) Root_meta_relational_metamodel_join_JoinTreeNode_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_join_JoinTreeNode_Impl) GroupByMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.GroupByMapping) ElementWithJoins(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.ElementWithJoins) Date(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Date) Root_meta_relational_metamodel_MultiGrainFilter_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_MultiGrainFilter_Impl) AssociationImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.AssociationImplementation) MappingClass(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.MappingClass) UnifiedMap(org.eclipse.collections.impl.map.mutable.UnifiedMap) Schema(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Schema) Numeric(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Numeric) Root_meta_pure_metamodel_function_property_Property_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl) RelationalOperationElementWithJoin(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElementWithJoin) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) Root_meta_pure_functions_collection_Pair_Impl(org.finos.legend.pure.generated.Root_meta_pure_functions_collection_Pair_Impl) NamedRelationAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelationAccessor) Other(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Other) ColumnAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.ColumnAccessor) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) ListIterable(org.eclipse.collections.api.list.ListIterable) Root_meta_relational_mapping_GroupByMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_GroupByMapping_Impl) Root_meta_relational_metamodel_datatype_Other_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Other_Impl) PropertyMappingsImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMappingsImplementation) Function(org.eclipse.collections.api.block.function.Function) Root_meta_relational_metamodel_TableAliasColumn_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAliasColumn_Impl) Procedure(org.eclipse.collections.api.block.procedure.Procedure) Root_meta_external_shared_format_binding_validation_SuccessfulBindingDetail(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_validation_SuccessfulBindingDetail) View(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.View) FastList(org.eclipse.collections.impl.list.mutable.FastList) LinkedHashMap(java.util.LinkedHashMap) VarChar(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.VarChar) MutableMap(org.eclipse.collections.api.map.MutableMap) MilestoningStereotype(org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestoningStereotype) TreeNode(org.finos.legend.pure.m3.coreinstance.meta.pure.functions.collection.TreeNode) Root_meta_relational_metamodel_relation_Table_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_Table_Impl) Float(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Float) TablePtr(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.TablePtr) Root_meta_relational_metamodel_DynaFunction_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_DynaFunction_Impl) Binary(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Binary) Root_meta_pure_metamodel_relationship_Generalization_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_relationship_Generalization_Impl) Predicates(org.eclipse.collections.impl.block.factory.Predicates) Timestamp(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Timestamp) DynaFunction(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.DynaFunction) Predicates2(org.eclipse.collections.impl.block.factory.Predicates2) ExternalFormatExtension(org.finos.legend.engine.external.shared.format.model.ExternalFormatExtension) DataType(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.DataType) ListIterate(org.eclipse.collections.impl.utility.ListIterate) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) OtherwiseEmbeddedRelationalPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.OtherwiseEmbeddedRelationalPropertyMapping) SetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation) Literal(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Literal) EmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.EmbeddedRelationalInstanceSetImplementation) Root_meta_relational_mapping_OtherwiseEmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_OtherwiseEmbeddedRelationalInstanceSetImplementation_Impl) Root_meta_relational_metamodel_relation_View_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_View_Impl) RelationalOperationElement(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement) Table(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Table) ImmutableList(org.eclipse.collections.api.list.ImmutableList) RelationalClassMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RelationalClassMapping) RelationalPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RelationalPropertyMapping) TableAlias(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias) Operation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.Operation) Varbinary(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Varbinary) Root_meta_relational_metamodel_TableAlias_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAlias_Impl) Root_meta_relational_metamodel_operation_SemiStructuredPropertyAccess_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_operation_SemiStructuredPropertyAccess_Impl) UnifiedSet(org.eclipse.collections.impl.set.mutable.UnifiedSet) org.finos.legend.pure.generated.core_pure_model_modelUnit(org.finos.legend.pure.generated.core_pure_model_modelUnit) Root_meta_relational_mapping_InlineEmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_InlineEmbeddedRelationalInstanceSetImplementation_Impl) EngineErrorType(org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType) Root_meta_external_shared_format_binding_BindingTransformer(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_BindingTransformer) Association(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Association) Multimap(org.eclipse.collections.api.multimap.Multimap) Predicate2(org.eclipse.collections.api.block.predicate.Predicate2) SetIterable(org.eclipse.collections.api.set.SetIterable) SemiStructured(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.SemiStructured) Root_meta_relational_metamodel_datatype_SmallInt_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_SmallInt_Impl) Generalization(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization) Root_meta_relational_mapping_RelationalPropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_RelationalPropertyMapping_Impl) ColumnMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.ColumnMapping) MutableList(org.eclipse.collections.api.list.MutableList) Root_meta_external_shared_format_binding_Binding(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_Binding) Root_meta_relational_metamodel_SQLNull_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_SQLNull_Impl) Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl) RootRelationalClassMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RootRelationalClassMapping) MutableSet(org.eclipse.collections.api.set.MutableSet) Pair(org.finos.legend.pure.m3.coreinstance.meta.pure.functions.collection.Pair) Filter(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Filter) InlineEmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.InlineEmbeddedRelationalInstanceSetImplementation) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property) Store(org.finos.legend.pure.m3.coreinstance.meta.pure.store.Store) Root_meta_relational_mapping_SemiStructuredRelationalPropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_SemiStructuredRelationalPropertyMapping_Impl) Tuples(org.eclipse.collections.impl.tuple.Tuples) InstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.InstanceSetImplementation) Root_meta_relational_metamodel_Schema_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Schema_Impl) Root_meta_relational_metamodel_LiteralList_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_LiteralList_Impl) Root_meta_relational_metamodel_Column_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Column_Impl) org.finos.legend.pure.generated.core_pure_corefunctions_metaExtension(org.finos.legend.pure.generated.core_pure_corefunctions_metaExtension) Root_meta_external_shared_format_binding_BindingTransformer_Impl(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_BindingTransformer_Impl) Root_meta_relational_metamodel_datatype_Real_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Real_Impl) SourceInformation(org.finos.legend.engine.protocol.pure.v1.model.SourceInformation) Root_meta_relational_metamodel_join_Join_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_join_Join_Impl) OtherwiseEmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.OtherwiseEmbeddedRelationalInstanceSetImplementation) JoinPointer(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.JoinPointer) Root_meta_relational_metamodel_datatype_Decimal_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Decimal_Impl) AggregationAwarePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.aggregationAware.AggregationAwarePropertyMapping) SmallInt(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.SmallInt) RelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalInstanceSetImplementation) DynaFunc(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.DynaFunc) Root_meta_pure_mapping_MappingClass_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_MappingClass_Impl) List(java.util.List) Char(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Char) SchemaAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.SchemaAccessor) Lists(org.eclipse.collections.impl.factory.Lists) Optional(java.util.Optional) Root_meta_relational_metamodel_datatype_Varbinary_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Varbinary_Impl) Root_meta_relational_metamodel_relation_BusinessMilestoning_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_BusinessMilestoning_Impl) Root_meta_pure_metamodel_type_Class_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_Class_Impl) Root_meta_relational_metamodel_Filter_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Filter_Impl) Assert(org.finos.legend.engine.shared.core.operational.Assert) Root_meta_relational_metamodel_relation_BusinessSnapshotMilestoning_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_BusinessSnapshotMilestoning_Impl) ProcessingMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.ProcessingMilestoning) EmbeddedRelationalPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.EmbeddedRelationalPropertyMapping) Root_meta_relational_mapping_FilterMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_FilterMapping_Impl) Database(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Database) InlineEmbeddedPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.InlineEmbeddedPropertyMapping) Root_meta_external_shared_format_binding_validation_BindingDetail(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_validation_BindingDetail) Root_meta_relational_mapping_SemiStructuredEmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_SemiStructuredEmbeddedRelationalInstanceSetImplementation_Impl) Function0(org.eclipse.collections.api.block.function.Function0) BigInt(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.BigInt) Bit(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Bit) Real(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Real) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) PureDate(org.finos.legend.pure.m4.coreinstance.primitive.date.PureDate) Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl) JoinTreeNode(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.join.JoinTreeNode) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) Root_meta_relational_metamodel_datatype_Binary_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Binary_Impl) PackageableElement(org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement) TinyInt(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.TinyInt) MilestoningFunctions(org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestoningFunctions) Double(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Double) Type(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type) Root_meta_relational_metamodel_Literal_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Literal_Impl) Root_meta_relational_metamodel_relation_ProcessingMilestoning_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_ProcessingMilestoning_Impl) Root_meta_relational_metamodel_datatype_Char_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Char_Impl) Root_meta_relational_metamodel_datatype_SemiStructured_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_SemiStructured_Impl) Sets(org.eclipse.collections.impl.factory.Sets) org.finos.legend.pure.generated.platform_pure_corefunctions_meta(org.finos.legend.pure.generated.platform_pure_corefunctions_meta) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) Root_meta_relational_mapping_EmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_EmbeddedRelationalInstanceSetImplementation_Impl) Root_meta_relational_metamodel_datatype_Timestamp_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Timestamp_Impl) org.finos.legend.pure.generated.platform_pure_corefunctions_meta(org.finos.legend.pure.generated.platform_pure_corefunctions_meta) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property) Root_meta_relational_mapping_RelationalPropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_RelationalPropertyMapping_Impl)

Example 2 with EnumerationMapping

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping in project legend-engine by finos.

the class HelperMappingBuilder method processEnumMapping.

public static org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.EnumerationMapping<Object> processEnumMapping(EnumerationMapping em, Mapping pureMapping, CompileContext context) {
    // validate there is no mixed protocol format for source value
    List<Object> sourceValues = em.enumValueMappings.stream().flatMap(enumValueMapping -> enumValueMapping.sourceValues.stream()).collect(Collectors.toList());
    if (sourceValues.stream().anyMatch(sourceValue -> !(sourceValue instanceof EnumValueMappingSourceValue)) && sourceValues.stream().anyMatch(sourceValue -> sourceValue instanceof EnumValueMappingSourceValue)) {
        throw new EngineException("Mixed formats for enum value mapping source values", em.sourceInformation, EngineErrorType.COMPILATION);
    }
    // process enum value mappings
    String id = getEnumerationMappingId(em);
    return new Root_meta_pure_mapping_EnumerationMapping_Impl<>(id, SourceInformationHelper.toM3SourceInformation(em.sourceInformation), null)._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::mapping::EnumerationMapping"))._typeArguments(FastList.newListWith(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::type::Any")))))._name(id)._parent(pureMapping)._enumeration(context.resolveEnumeration(em.enumeration, em.sourceInformation))._enumValueMappings(ListIterate.collect(em.enumValueMappings, v -> new Root_meta_pure_mapping_EnumValueMapping_Impl(null, SourceInformationHelper.toM3SourceInformation(em.sourceInformation), null)._enum(context.resolveEnumValue(em.enumeration, v.enumValue))._sourceValues(convertSourceValues(em, v.sourceValues, context))));
}
Also used : AggregationFunctionSpecification(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.aggregationAware.AggregationFunctionSpecification) EngineErrorType(org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType) PurePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.modelToModel.mapping.PurePropertyMapping) XStoreAssociationImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.xStore.XStoreAssociationImplementation) SetIterable(org.eclipse.collections.api.set.SetIterable) Generalization(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization) MutableList(org.eclipse.collections.api.list.MutableList) MutableSet(org.eclipse.collections.api.set.MutableSet) Handlers(org.finos.legend.engine.language.pure.compiler.toPureGraph.handlers.Handlers) PropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.PropertyMapping) RichIterable(org.eclipse.collections.api.RichIterable) Variable(org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.Variable) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property) Store(org.finos.legend.pure.m3.coreinstance.meta.pure.store.Store) EnumValueMappingEnumSourceValue(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumValueMappingEnumSourceValue) Root_meta_pure_metamodel_function_LambdaFunction_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl) Map(java.util.Map) InstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.InstanceSetImplementation) Multiplicity(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Multiplicity) AssociationImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.AssociationImplementation) EnumerationMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping) MappingClass(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.MappingClass) GroupByFunctionSpecification(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.aggregationAware.GroupByFunctionSpecification) Root_meta_pure_mapping_SubstituteStore_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_SubstituteStore_Impl) MappingTest(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.mappingTest.MappingTest) Root_meta_pure_metamodel_function_property_Property_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl) LocalMappingPropertyInfo(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.LocalMappingPropertyInfo) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) Root_meta_pure_mapping_xStore_XStoreAssociationImplementation_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_xStore_XStoreAssociationImplementation_Impl) Collectors(java.util.stream.Collectors) Root_meta_pure_mapping_MappingClass_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_MappingClass_Impl) Objects(java.util.Objects) Root_meta_pure_mapping_aggregationAware_AggregationFunctionSpecification_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_aggregationAware_AggregationFunctionSpecification_Impl) List(java.util.List) ClassMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.ClassMapping) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping) Procedure2(org.eclipse.collections.api.block.procedure.Procedure2) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) Lists(org.eclipse.collections.impl.factory.Lists) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) Optional(java.util.Optional) InputData(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.mappingTest.InputData) EnumValueMappingStringSourceValue(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumValueMappingStringSourceValue) VariableExpression(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.VariableExpression) Lambda(org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.Lambda) PropertyMappingsImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMappingsImplementation) AggregateSpecification(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.aggregationAware.AggregateSpecification) Root_meta_pure_mapping_EnumValueMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_EnumValueMapping_Impl) MappingInclude(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.MappingInclude) AssociationMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.AssociationMapping) XStoreAssociationMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.xStore.XStoreAssociationMapping) EnumValueMappingIntegerSourceValue(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumValueMappingIntegerSourceValue) Root_meta_pure_functions_meta_elementToPath_PackageableElement_1__String_1_(org.finos.legend.pure.generated.platform_pure_corefunctions_meta.Root_meta_pure_functions_meta_elementToPath_PackageableElement_1__String_1_) FastList(org.eclipse.collections.impl.list.mutable.FastList) EnumValueMappingSourceValue(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumValueMappingSourceValue) HelperModelBuilder.getElementFullPath(org.finos.legend.engine.language.pure.compiler.toPureGraph.HelperModelBuilder.getElementFullPath) ObjectInputData(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.modelToModel.mapping.ObjectInputData) Root_meta_pure_mapping_EnumerationMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_EnumerationMapping_Impl) AggregateFunction(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.aggregationAware.AggregateFunction) GroupByFunction(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.aggregationAware.GroupByFunction) Root_meta_pure_metamodel_relationship_Generalization_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_relationship_Generalization_Impl) Root_meta_pure_mapping_MappingInclude_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_MappingInclude_Impl) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) PackageableElement(org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement) SourceInformation(org.finos.legend.pure.m4.coreinstance.SourceInformation) Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl) ValueSpecification(org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.ValueSpecification) ListIterate(org.eclipse.collections.impl.utility.ListIterate) SetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation) LambdaFunction(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.LambdaFunction) Root_meta_pure_mapping_aggregationAware_AggregateSpecification_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_aggregationAware_AggregateSpecification_Impl) InstanceValue(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.InstanceValue) Root_meta_pure_mapping_aggregationAware_GroupByFunctionSpecification_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_aggregationAware_GroupByFunctionSpecification_Impl) AggregateSetImplementationContainer(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.aggregationAware.AggregateSetImplementationContainer) Sets(org.eclipse.collections.impl.factory.Sets) Root_meta_pure_mapping_aggregationAware_AggregateSetImplementationContainer_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_aggregationAware_AggregateSetImplementationContainer_Impl) ImmutableSet(org.eclipse.collections.api.set.ImmutableSet) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) Root_meta_pure_mapping_EnumValueMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_EnumValueMapping_Impl) EnumValueMappingSourceValue(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumValueMappingSourceValue)

Example 3 with EnumerationMapping

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping in project legend-engine by finos.

the class ClassMappingSecondPassBuilder method visit.

@Override
public SetImplementation visit(PureInstanceClassMapping classMapping) {
    PureInstanceSetImplementation s = (PureInstanceSetImplementation) parentMapping._classMappings().select(c -> c._id().equals(HelperMappingBuilder.getClassMappingId(classMapping, this.context))).getFirst();
    s._propertyMappings().forEachWithIndex((ObjectIntProcedure<org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping>) ((p, i) -> {
        org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PurePropertyMapping pm = (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PurePropertyMapping) p;
        org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> property = pm._property();
        SourceInformation pSourceInformation = SourceInformationHelper.fromM3SourceInformation(p.getSourceInformation());
        org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.ValueSpecification last = pm._transform()._expressionSequence().getLast();
        List<Type> typesToCheck;
        if (property._genericType()._rawType()._classifierGenericType()._rawType()._name().equals("Class")) {
            SetImplementation setImplementation;
            if (p._targetSetImplementationId() != null && !p._targetSetImplementationId().equals("")) {
                setImplementation = parentMapping._classMappingByIdRecursive(Lists.fixedSize.with(p._targetSetImplementationId()), this.context.pureModel.getExecutionSupport()).getFirst();
                Assert.assertTrue(setImplementation != null, () -> "Can't find class mapping '" + p._targetSetImplementationId() + "'", pSourceInformation, EngineErrorType.COMPILATION);
            } else {
                setImplementation = parentMapping.classMappingByClass((org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class<Object>) property._genericType()._rawType(), this.context.pureModel.getExecutionSupport()).getFirst();
                Assert.assertTrue(setImplementation != null, () -> "Can't find class mapping for '" + HelperModelBuilder.getElementFullPath(property._genericType()._rawType(), this.context.pureModel.getExecutionSupport()) + "'", pSourceInformation, EngineErrorType.COMPILATION);
            }
            List<? extends InstanceSetImplementation> setImpls = core_pure_router_router_routing.Root_meta_pure_router_routing_resolveOperation_SetImplementation_MANY__Mapping_1__InstanceSetImplementation_MANY_(Lists.immutable.of(setImplementation), parentMapping, this.context.pureModel.getExecutionSupport()).toList();
            typesToCheck = setImpls.stream().map(setImpl -> ((PureInstanceSetImplementation) setImpl)._srcClass()).collect(Collectors.toList());
        } else if (((org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PurePropertyMapping) p)._transformer() != null) {
            EnumerationMapping<Object> m = ((EnumerationMapping<Object>) ((org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PurePropertyMapping) p)._transformer());
            Object val = m._enumValueMappings().getFirst()._sourceValues().getFirst();
            if (val instanceof String) {
                typesToCheck = Collections.singletonList(this.context.pureModel.getType("String"));
            } else if (val instanceof Long) {
                typesToCheck = Collections.singletonList(this.context.pureModel.getType("Integer"));
            } else if (val instanceof EnumValue) {
                typesToCheck = Collections.singletonList(this.context.resolveEnumeration(((EnumValue) val).fullPath, pSourceInformation));
            } else if (val instanceof Enum) {
                GenericType genericType = ((Enum) val)._classifierGenericType();
                typesToCheck = genericType != null ? Collections.singletonList(this.context.resolveEnumeration(PackageableElement.getUserPathForPackageableElement(genericType._rawType()), pSourceInformation)) : Collections.emptyList();
            } else {
                typesToCheck = Collections.emptyList();
            }
        } else {
            typesToCheck = Collections.singletonList(property._genericType()._rawType());
        }
        org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.multiplicity.Multiplicity multiplicityToCheck = pm._explodeProperty() != null && pm._explodeProperty() ? this.context.pureModel.getMultiplicity("zeromany") : property._multiplicity();
        List<ValueSpecification> lines = ((PurePropertyMapping) classMapping.propertyMappings.get(i)).transform.body;
        typesToCheck.stream().filter(Objects::nonNull).forEach(t -> HelperModelBuilder.checkTypeCompatibility(this.context, last._genericType()._rawType(), t, "Error in class mapping '" + HelperModelBuilder.getElementFullPath(parentMapping, this.context.pureModel.getExecutionSupport()) + "' for property '" + pm._property()._name() + "'", lines.get(lines.size() - 1).sourceInformation));
        HelperModelBuilder.checkMultiplicityCompatibility(last._multiplicity(), multiplicityToCheck, "Error in class mapping '" + HelperModelBuilder.getElementFullPath(parentMapping, this.context.pureModel.getExecutionSupport()) + "' for property '" + pm._property()._name() + "'", lines.get(lines.size() - 1).sourceInformation);
    }));
    return s;
}
Also used : Enum(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Enum) EnumerationMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.EnumerationMapping) EnumValue(org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.EnumValue) ValueSpecification(org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.ValueSpecification) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) PureInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PureInstanceSetImplementation) SourceInformation(org.finos.legend.engine.protocol.pure.v1.model.SourceInformation) EngineErrorType(org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType) Type(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) PurePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.modelToModel.mapping.PurePropertyMapping) PurePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.modelToModel.mapping.PurePropertyMapping) InstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.InstanceSetImplementation) OperationSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.OperationSetImplementation) PureInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PureInstanceSetImplementation) SetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation)

Example 4 with EnumerationMapping

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping in project legend-engine by finos.

the class MappingParseTreeWalker method visitMappingElement.

private Mapping visitMappingElement(MappingParserGrammar.MappingElementContext ctx, Mapping mapping) {
    String parserName = ctx.parserName().getText();
    // Construct the mapping element string (with spacing) to be dispatched to another parser
    // NOTE: we want to preserve the spacing so we can correctly produce source information in the dispatched parser
    StringBuilder mappingElementStringBuilder = new StringBuilder();
    for (MappingParserGrammar.MappingElementBodyContentContext fragment : ctx.mappingElementBody().mappingElementBodyContent()) {
        mappingElementStringBuilder.append(fragment.getText());
    }
    String mappingElementCode = mappingElementStringBuilder.length() > 0 ? mappingElementStringBuilder.substring(0, mappingElementStringBuilder.length() - 1) : mappingElementStringBuilder.toString();
    // prepare island grammar walker source information
    int startLine = ctx.mappingElementBody().BRACE_OPEN().getSymbol().getLine();
    int lineOffset = walkerSourceInformation.getLineOffset() + startLine - 1;
    // only add current walker source information column offset if this is the first line
    int columnOffset = (startLine == 1 ? walkerSourceInformation.getColumnOffset() : 0) + ctx.mappingElementBody().BRACE_OPEN().getSymbol().getCharPositionInLine() + ctx.mappingElementBody().BRACE_OPEN().getText().length();
    ParseTreeWalkerSourceInformation mappingElementWalkerSourceInformation = new ParseTreeWalkerSourceInformation.Builder(mapping.getPath(), lineOffset, columnOffset).withReturnSourceInfo(this.walkerSourceInformation.getReturnSourceInfo()).build();
    MappingElementSourceCode mappingElementSourceCode = new MappingElementSourceCode(mappingElementCode, parserName, mappingElementWalkerSourceInformation, ctx, this.walkerSourceInformation);
    MappingElementParser extraParser = this.extensions.getExtraMappingElementParser(mappingElementSourceCode.name);
    if (extraParser == null) {
        throw new EngineException("No parser for " + mappingElementSourceCode.name, this.walkerSourceInformation.getSourceInformation(ctx), EngineErrorType.PARSER);
    }
    Object mappingElement = extraParser.parse(mappingElementSourceCode, this.parserContext);
    if (mappingElement instanceof ClassMapping) {
        mapping.classMappings.add((ClassMapping) mappingElement);
    } else if (mappingElement instanceof EnumerationMapping) {
        mapping.enumerationMappings.add((EnumerationMapping) mappingElement);
    } else if (mappingElement instanceof AssociationMapping) {
        mapping.associationMappings.add((AssociationMapping) mappingElement);
    } else {
        throw new EngineException("Invalid parser result for " + mappingElementSourceCode.name + ": " + mappingElement, this.walkerSourceInformation.getSourceInformation(ctx), EngineErrorType.PARSER);
    }
    return mapping;
}
Also used : ClassMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.ClassMapping) EnumerationMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) AssociationMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.AssociationMapping) MappingElementParser(org.finos.legend.engine.language.pure.grammar.from.extension.MappingElementParser) MappingParserGrammar(org.finos.legend.engine.language.pure.grammar.from.antlr4.mapping.MappingParserGrammar) ParseTreeWalkerSourceInformation(org.finos.legend.engine.language.pure.grammar.from.ParseTreeWalkerSourceInformation)

Example 5 with EnumerationMapping

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.EnumerationMapping in project legend-engine by finos.

the class PropertyMappingBuilder method visit.

@Override
public PropertyMapping visit(PurePropertyMapping propertyMapping) {
    org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PurePropertyMapping pm = new Root_meta_pure_mapping_modelToModel_PurePropertyMapping_Impl("");
    Property property = HelperMappingBuilder.getMappedProperty(propertyMapping, this.context);
    pm.setSourceInformation(SourceInformationHelper.toM3SourceInformation(propertyMapping.sourceInformation));
    pm._property(property)._explodeProperty(propertyMapping.explodeProperty)._sourceSetImplementationId(propertyMapping.source)._targetSetImplementationId(HelperMappingBuilder.getPropertyMappingTargetId(propertyMapping, property, context))._owner(owner);
    String mappingName = owner._parent().getName();
    pm._transform(HelperMappingBuilder.processPurePropertyMappingTransform(propertyMapping, propertyMapping.transform, owner, owner._srcClass(), this.context, mappingName));
    if (propertyMapping.enumMappingId != null) {
        EnumerationMapping<Object> eMap = allEnumerationMappings.select(e -> e._name().equals(propertyMapping.enumMappingId)).getFirst();
        Assert.assertTrue(eMap != null, () -> "Can't find enumeration mapping '" + propertyMapping.enumMappingId + "'", propertyMapping.sourceInformation, EngineErrorType.COMPILATION);
        pm._transformer(eMap);
    }
    if (propertyMapping.localMappingProperty != null) {
        pm._localMappingProperty(true);
        pm._localMappingPropertyType(this.context.resolveType(propertyMapping.localMappingProperty.type, propertyMapping.localMappingProperty.sourceInformation));
        pm._localMappingPropertyMultiplicity(this.context.pureModel.getMultiplicity(propertyMapping.localMappingProperty.multiplicity));
    }
    return pm;
}
Also used : Assert(org.finos.legend.engine.shared.core.operational.Assert) VariableExpression(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.VariableExpression) EngineErrorType(org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType) PurePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.modelToModel.mapping.PurePropertyMapping) PropertyMappingsImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMappingsImplementation) Root_meta_pure_mapping_modelToModel_PurePropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_modelToModel_PurePropertyMapping_Impl) XStoreAssociationImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.xStore.XStoreAssociationImplementation) MutableList(org.eclipse.collections.api.list.MutableList) Function(java.util.function.Function) FastList(org.eclipse.collections.impl.list.mutable.FastList) PropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping) RichIterable(org.eclipse.collections.api.RichIterable) EnumerationMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.EnumerationMapping) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property) Root_meta_pure_metamodel_function_LambdaFunction_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl) InstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.InstanceSetImplementation) PureInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.modelToModel.PureInstanceSetImplementation) Root_meta_pure_mapping_aggregationAware_AggregationAwarePropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_aggregationAware_AggregationAwarePropertyMapping_Impl) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) SourceInformation(org.finos.legend.pure.m4.coreinstance.SourceInformation) MilestoningFunctions(org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestoningFunctions) Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl) XStorePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.xStore.XStorePropertyMapping) Root_meta_pure_mapping_xStore_XStorePropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_xStore_XStorePropertyMapping_Impl) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) ListIterate(org.eclipse.collections.impl.utility.ListIterate) Type(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type) AggregationAwarePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.aggregationAware.AggregationAwarePropertyMapping) SetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation) LambdaFunction(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.LambdaFunction) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) Lists(org.eclipse.collections.impl.factory.Lists) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) Optional(java.util.Optional) PropertyMappingVisitor(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.PropertyMappingVisitor) Root_meta_pure_mapping_modelToModel_PurePropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_modelToModel_PurePropertyMapping_Impl) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property)

Aggregations

EngineErrorType (org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType)4 EngineException (org.finos.legend.engine.shared.core.operational.errorManagement.EngineException)4 InstanceSetImplementation (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.InstanceSetImplementation)4 SetImplementation (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation)4 GenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)4 Optional (java.util.Optional)3 RichIterable (org.eclipse.collections.api.RichIterable)3 MutableList (org.eclipse.collections.api.list.MutableList)3 Lists (org.eclipse.collections.impl.factory.Lists)3 FastList (org.eclipse.collections.impl.list.mutable.FastList)3 ListIterate (org.eclipse.collections.impl.utility.ListIterate)3 PurePropertyMapping (org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.modelToModel.mapping.PurePropertyMapping)3 Root_meta_pure_metamodel_type_generics_GenericType_Impl (org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl)3 EnumerationMapping (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.EnumerationMapping)3 Mapping (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping)3 PropertyMappingsImplementation (org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMappingsImplementation)3 Property (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property)3 Class (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class)3 Type (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type)3 List (java.util.List)2