use of com.developmentontheedge.be5.metadata.model.base.DataElementPath in project be5 by DevelopmentOnTheEdge.
the class Project method mergeTemplate.
public ParseResult mergeTemplate(TemplateElement element) {
boolean besql = element instanceof Query && ((Query) element).getEntity().isBesql() && ((Query) element).isSqlQuery();
try {
sqlMacros.clear();
if (" ".equals(element.getTemplateCode()))
return new ParseResult(" ");
final DataElementPath path = element.getCompletePath();
final String merged = FreemarkerUtils.mergeTemplateByPath(path.toString(), getContext(element), getConfiguration());
if (besql)
enterSQL();
return new ParseResult(besql ? translateSQL(merged) : merged);
} catch (ProjectElementException e) {
return new ParseResult(e);
} catch (Throwable e) {
return new ParseResult(new ProjectElementException(getCompletePath(), "source", e));
} finally {
beSQL = 0;
sqlMacros.clear();
}
}
Aggregations