org.openl.codegen.template.DefaultPropertiesContextMatcher-constraints.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.openl.rules.gen Show documentation
Show all versions of org.openl.rules.gen Show documentation
OpenL Code generation project
#foreach( $tablePropertyDefinition in $tablePropertyDefinitions )
constraints.put("$tablePropertyDefinition.PropertyVar", new MatchingConstraint<$tool.getTypeName($tablePropertyDefinition.Definition.Type.InstanceClass), $tool.getTypeName($contextPropertyDefinitionWrappers.findWrapper($tablePropertyDefinition.ContextVar).Definition.Type.InstanceClass)>() {
@Override
protected $tool.getTypeName($contextPropertyDefinitionWrappers.findWrapper($tablePropertyDefinition.ContextVar).Definition.Type.InstanceClass) getContextValue(IRulesRuntimeContext context) {
return context.get$tool.formatAccessorName($tablePropertyDefinition.ContextVar)();
}
@Override
protected $tool.getTypeName($tablePropertyDefinition.Definition.Type.InstanceClass) getPropertyValue(ITableProperties properties) {
return properties.get$tool.formatAccessorName($tablePropertyDefinition.PropertyVar)();
}
@Override
protected boolean matchNotNulls($tool.getTypeName($tablePropertyDefinition.Definition.Type.InstanceClass) propertyValue, $tool.getTypeName($contextPropertyDefinitionWrappers.findWrapper($tablePropertyDefinition.ContextVar).Definition.Type.InstanceClass) contextValue) {
return ${tablePropertyDefinition.Operation}(propertyValue, contextValue);
}
});
#end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy