use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl in project legend-engine by finos.
the class Milestoning method generateMilestoningRangeProperty.
private static Property generateMilestoningRangeProperty(CompileContext context, MilestoningStereotype milestoningStereotype, Class<Object> owner) {
GenericType milestoningRangePropertyGenericType = context.resolveGenericType(milestoningStereotype.getMilestoningPropertyClassName());
Property generatedMilestoningRangeProperty = new Root_meta_pure_metamodel_function_property_Property_Impl<>(MilestoningFunctions.MILESTONING)._name(MilestoningFunctions.MILESTONING)._genericType(milestoningRangePropertyGenericType)._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::Property"))._typeArguments(Lists.fixedSize.of(owner._classifierGenericType(), milestoningRangePropertyGenericType)))._multiplicity(context.pureModel.getMultiplicity("zeroone"))._stereotypes(Lists.fixedSize.of(generatedMilestoningStereotype(context, GeneratedMilestoningStereotype.generatedmilestoningdateproperty)))._owner(owner);
return generatedMilestoningRangeProperty;
}
use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl in project legend-engine by finos.
the class Milestoning method newProperty.
private static org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> newProperty(PropertyOwner owner, org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> originalProperty, String name, org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.multiplicity.Multiplicity multiplicity, ListIterable<Stereotype> stereotypes) {
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> property = newAbstractProperty(owner, originalProperty, name, multiplicity, stereotypes, new Root_meta_pure_metamodel_function_property_Property_Impl(name));
property._classifierGenericType(originalProperty._classifierGenericType());
return property;
}
use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl in project legend-engine by finos.
the class HelperMappingBuilder method getMappedProperty.
public static Property getMappedProperty(PropertyMapping propertyMapping, CompileContext context) {
if (propertyMapping.localMappingProperty != null) {
// Local property mapping
LocalMappingPropertyInfo localMappingPropertyInfo = propertyMapping.localMappingProperty;
// Raw type will be populated when mapping class is built
GenericType sourceGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("");
GenericType targetGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.resolveType(localMappingPropertyInfo.type, localMappingPropertyInfo.sourceInformation));
GenericType propertyClassifierGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::Property"))._typeArguments(Lists.fixedSize.of(sourceGenericType, targetGenericType))._multiplicityArgumentsAdd(context.pureModel.getMultiplicity(localMappingPropertyInfo.multiplicity));
return new Root_meta_pure_metamodel_function_property_Property_Impl<>(propertyMapping.property.property)._name(propertyMapping.property.property)._classifierGenericType(propertyClassifierGenericType)._genericType(targetGenericType)._multiplicity(context.pureModel.getMultiplicity(localMappingPropertyInfo.multiplicity));
}
return HelperModelBuilder.getPropertyOrResolvedEdgePointProperty(context, context.resolveClass(propertyMapping.property._class, propertyMapping.sourceInformation), Optional.empty(), propertyMapping.property.property, propertyMapping.sourceInformation);
}
Aggregations