question: public static void buildWhereClause ( AbstractSqlPagingQueryProvider provider , boolean remainingPageQuery , StringBuilder sql ) { if ( remainingPageQuery ) { sql . append ( " WHERE " ) ; if ( provider . getWhereClause ( ) != null ) { sql . append ( "(" ) ; sql . append ( provider . getWhereClause ( ) ) ; sql . append ( ") AND " ) ; } } else { sql . append ( provider . getWhereClause ( ) == null ? "" : " WHERE " + provider . getWhereClause ( ) ) ; } }
target:  Generates WHERE clause for queries that require sub selects.