* This is called from a named stored procedure query that employs result
* class name(s). The resultSetMappings are build from these class name(s)
* and are not available from the session.
*/
public static DatabaseQuery buildResultSetMappingQuery(List<SQLResultSetMapping> resultSetMappings, StoredProcedureCall call, Map<String, Object> hints, ClassLoader classLoader, AbstractSession session) {
ResultSetMappingQuery query = new ResultSetMappingQuery();
call.setReturnMultipleResultSetCollections(call.hasMultipleResultSets());
query.setCall(call);
query.setIsUserDefined(true);
query.setSQLResultSetMappings(resultSetMappings);
// apply any query hints
DatabaseQuery hintQuery = applyHints(hints, query, classLoader, session);
// apply any query arguments