/** * <p>Renders the WHERE portion of the query in the database-specific SQL * dialect. Very few databases deviate from the standard in this matter, * thus the default implementation is usually sufficient.</p> * <p/> * <p>An example return value: <code>" WHERE name = ? OR age < 20"</code></p> * <p/> * <p>There is usually no need to call this method directly. Under normal * operations it functions as a delegate for {@link #renderQuery(Query, TableNameConverter, boolean)}.</p> * * @param query The Query instance from which to determine the WHERE properties. * @return The database-specific SQL rendering of the WHERE portion of the query. */ protected String renderQueryWhere(Query query) { StringBuilder sql = new StringBuilder(); String whereClause = query.getWhereClause(); if (whereClause != null) { sql.append(" WHERE "); sql.append(processWhereClause(whereClause)); } return sql.toString(); }
/** * <p>Renders the WHERE portion of the query in the database-specific SQL * dialect. Very few databases deviate from the standard in this matter, * thus the default implementation is usually sufficient.</p> * <p/> * <p>An example return value: <code>" WHERE name = ? OR age < 20"</code></p> * <p/> * <p>There is usually no need to call this method directly. Under normal * operations it functions as a delegate for {@link #renderQuery(Query, TableNameConverter, boolean)}.</p> * * @param query The Query instance from which to determine the WHERE properties. * @return The database-specific SQL rendering of the WHERE portion of the query. */ protected String renderQueryWhere(Query query) { StringBuilder sql = new StringBuilder(); String whereClause = query.getWhereClause(); if (whereClause != null) { sql.append(" WHERE "); sql.append(processWhereClause(whereClause)); } return sql.toString(); }