use of org.dbflute.cbean.sqlclause.union.UnionClauseProvider in project dbflute-core by dbflute.
the class AbstractSqlClause method prepareUnionClause.
protected String prepareUnionClause(String selectClause) {
if (!hasUnionQuery()) {
return "";
}
final StringBuilder sb = new StringBuilder();
for (UnionQueryInfo unionQueryInfo : _unionQueryInfoList) {
final UnionClauseProvider unionClauseProvider = unionQueryInfo.getUnionClauseProvider();
final String unionQueryClause = unionClauseProvider.provide();
final boolean unionAll = unionQueryInfo.isUnionAll();
sb.append(ln()).append(unionAll ? " union all " : " union ").append(ln());
sb.append(selectClause).append(" ").append(unionQueryClause);
}
return sb.toString();
}
Aggregations