use of com.developmentontheedge.sql.model.AstJoin in project be5 by DevelopmentOnTheEdge.
the class CategoryFilter method processTableRef.
private void processTableRef(AstTableRef ref) {
String alias = Optional.ofNullable(ref.getAlias()).orElse(entity);
AstFunNode categoryCondition = DefaultParserContext.FUNC_EQ.node(new AstFieldReference(identifier("classifications"), identifier("categoryID")), AstNumericConstant.of(categoryId));
AstFunNode recordCondition = DefaultParserContext.FUNC_EQ.node(new AstFieldReference(identifier("classifications"), identifier("recordID")), new AstFieldReference(identifier(alias), identifier(primaryKeyColumn)));
AstJoin join = JoinType.INNER.node("classifications", DefaultParserContext.FUNC_AND.node(categoryCondition, recordCondition));
ref.appendSibling(join);
}
Aggregations