/** * {@inheritDoc} */ public boolean hasSpaceAfterClause(SelectStatement expression) { return expression.hasSpaceBeforeOrderBy(); } }
/** * {@inheritDoc} */ @Override public void visit(SelectStatementStateObject stateObject) { if (stateObject.isDecorated()) { toText(stateObject); } else { boolean endWithSpace = toStringSelectStatement(stateObject); SelectStatement expression = stateObject.getExpression(); // If no ORDER BY clause was parsed but was added later, make sure a space is added if (exactMatch && (expression != null) && expression.hasSpaceBeforeOrderBy() || stateObject.hasOrderByClause()) { if (!endWithSpace) { writer.append(SPACE); } } // ORDER BY clause if (stateObject.hasOrderByClause()) { stateObject.getOrderByClause().accept(this); } } }
if (expression.hasSpaceBeforeOrderBy()) { virtualSpace = true;