use of org.hibernate.sql.ast.tree.predicate.BooleanExpressionPredicate in project hibernate-orm by hibernate.
the class TimesTenSqlAstTranslator method renderTableGroupJoin.
@Override
protected void renderTableGroupJoin(TableGroupJoin tableGroupJoin, List<TableGroupJoin> tableGroupJoinCollector) {
if (tableGroupJoin.getJoinType() == SqlAstJoinType.CROSS) {
appendSql(", ");
} else {
appendSql(WHITESPACE);
appendSql(tableGroupJoin.getJoinType().getText());
appendSql("join ");
}
final Predicate predicate;
if (tableGroupJoin.getPredicate() == null) {
if (tableGroupJoin.getJoinType() == SqlAstJoinType.CROSS) {
predicate = null;
} else {
predicate = new BooleanExpressionPredicate(new QueryLiteral<>(true, getBooleanType()));
}
} else {
predicate = tableGroupJoin.getPredicate();
}
if (predicate != null && !predicate.isEmpty()) {
renderTableGroup(tableGroupJoin.getJoinedGroup(), predicate, tableGroupJoinCollector);
} else {
renderTableGroup(tableGroupJoin.getJoinedGroup(), null, tableGroupJoinCollector);
}
}
use of org.hibernate.sql.ast.tree.predicate.BooleanExpressionPredicate in project hibernate-orm by hibernate.
the class SybaseASESqlAstTranslator method renderTableGroupJoin.
@Override
protected void renderTableGroupJoin(TableGroupJoin tableGroupJoin, List<TableGroupJoin> tableGroupJoinCollector) {
if (tableGroupJoin.getJoinType() == SqlAstJoinType.CROSS) {
appendSql(", ");
} else {
appendSql(WHITESPACE);
appendSql(tableGroupJoin.getJoinType().getText());
appendSql("join ");
}
final Predicate predicate;
if (tableGroupJoin.getPredicate() == null) {
if (tableGroupJoin.getJoinType() == SqlAstJoinType.CROSS) {
predicate = null;
} else {
predicate = new BooleanExpressionPredicate(new QueryLiteral<>(true, getBooleanType()));
}
} else {
predicate = tableGroupJoin.getPredicate();
}
if (predicate != null && !predicate.isEmpty()) {
renderTableGroup(tableGroupJoin.getJoinedGroup(), predicate, tableGroupJoinCollector);
} else {
renderTableGroup(tableGroupJoin.getJoinedGroup(), null, tableGroupJoinCollector);
}
}
use of org.hibernate.sql.ast.tree.predicate.BooleanExpressionPredicate in project hibernate-orm by hibernate.
the class AbstractSqlAstTranslator method renderTableGroupJoin.
protected void renderTableGroupJoin(TableGroupJoin tableGroupJoin, List<TableGroupJoin> tableGroupJoinCollector) {
appendSql(WHITESPACE);
appendSql(tableGroupJoin.getJoinType().getText());
appendSql("join ");
final Predicate predicate;
if (tableGroupJoin.getPredicate() == null) {
if (tableGroupJoin.getJoinType() == SqlAstJoinType.CROSS) {
predicate = null;
} else {
predicate = new BooleanExpressionPredicate(new QueryLiteral<>(true, getBooleanType()));
}
} else {
predicate = tableGroupJoin.getPredicate();
}
if (predicate != null && !predicate.isEmpty()) {
renderTableGroup(tableGroupJoin.getJoinedGroup(), predicate, tableGroupJoinCollector);
} else {
renderTableGroup(tableGroupJoin.getJoinedGroup(), null, tableGroupJoinCollector);
}
}
Aggregations