}
}
protected void generateArtifactsByFunction(Template template, Direction... direction) throws MinuteProjectException {
for (Function function : getModel().getDataModel().getDatabase().getFunctions()) {
Direction functionDirection = function.getDirection();
for (Direction dir : direction) { // dir has to be put in the correct order IN or OUT before NONE, INOUT
if (dir.equals(functionDirection)) {
writeTemplateResult(function.getEntity(dir), template);
break;
}