use of org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestonedPropertyMetaData in project legend-pure by finos.
the class FunctionExpressionProcessor method milestoningMissingDateParamErrorMsg.
private static void milestoningMissingDateParamErrorMsg(ProcessorSupport processorSupport, AbstractProperty<?> property, StringBuilder message) {
MilestonedPropertyMetaData milestonedPropertyMetaData = MilestoningFunctions.getMilestonedMetaDataForProperty((QualifiedProperty<?>) property, processorSupport);
message.append("is milestoned with stereotypes: ");
milestonedPropertyMetaData.getClassTemporalStereotypes().appendString(message, "[ ", ",", " ]");
message.append(" and requires date parameters: ");
milestonedPropertyMetaData.getTemporalDatePropertyNamesForStereotypes().appendString(message, "[ ", ", ", " ]");
}
use of org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestonedPropertyMetaData in project legend-pure by finos.
the class MilestoningFunctionExpressionValidator method validateMissingMilestoningDateArguments.
private static void validateMissingMilestoningDateArguments(FunctionExpression functionExpression, Function<?> function, ProcessorSupport processorSupport) {
if (MilestoningFunctions.isGeneratedMilestonedQualifiedPropertyWithMissingDates(function, processorSupport)) {
MilestonedPropertyMetaData milestoningPropertyMetaData = MilestoningFunctions.getMilestonedMetaDataForProperty((QualifiedProperty<?>) function, processorSupport);
ListIterable<String> temporalPropertyNames = milestoningPropertyMetaData.getTemporalDatePropertyNamesForStereotypes();
throw new PureCompilationException(functionExpression.getSourceInformation(), "No-Arg milestoned property: '" + function._functionName() + "' must be either called in a milestoning context or supplied with " + temporalPropertyNames.makeString("[", ", ", "]") + " parameters");
}
}
use of org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestonedPropertyMetaData in project legend-pure by finos.
the class FunctionExpressionProcessor method milestoningMissingDateParamErrorMsgForAllVersionInRange.
private static void milestoningMissingDateParamErrorMsgForAllVersionInRange(ProcessorSupport processorSupport, AbstractProperty<?> property, StringBuilder message) {
MilestonedPropertyMetaData milestonedPropertyMetaData = MilestoningFunctions.getMilestonedMetaDataForProperty((QualifiedProperty<?>) property, processorSupport);
message.append("is milestoned with stereotypes: ");
milestonedPropertyMetaData.getClassTemporalStereotypes().appendString(message, "[ ", ",", " ]");
message.append(" and requires 2 date parameters : [start, end]");
}
Aggregations