/** * Actually execute a query, ignoring the query cache */ protected List doList(final SessionImplementor session, final QueryParameters queryParameters) throws HibernateException { final boolean stats = getFactory().getStatistics().isStatisticsEnabled(); long startTime = 0; if ( stats ) startTime = System.currentTimeMillis(); List result; try { result = doQueryAndInitializeNonLazyCollections( session, queryParameters, true ); } catch ( SQLException sqle ) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "could not execute query", getSQLString() ); } if ( stats ) { getFactory().getStatisticsImplementor().queryExecuted( getQueryIdentifier(), result.size(), System.currentTimeMillis() - startTime ); } return result; }
/** * Actually execute a query, ignoring the query cache */ protected List doList(final SessionImplementor session, final QueryParameters queryParameters) throws HibernateException { final boolean stats = getFactory().getStatistics().isStatisticsEnabled(); long startTime = 0; if ( stats ) startTime = System.currentTimeMillis(); List result; try { result = doQueryAndInitializeNonLazyCollections( session, queryParameters, true ); } catch ( SQLException sqle ) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "could not execute query", getSQLString() ); } if ( stats ) { getFactory().getStatisticsImplementor().queryExecuted( getQueryIdentifier(), result.size(), System.currentTimeMillis() - startTime ); } return result; }
/** * Return the query results as an iterator */ public Iterator iterate(QueryParameters queryParameters, SessionImplementor session) throws HibernateException { boolean stats = session.getFactory().getStatistics().isStatisticsEnabled(); long startTime = 0; if ( stats ) startTime = System.currentTimeMillis(); try { PreparedStatement st = prepareQueryStatement( queryParameters, false, session ); ResultSet rs = getResultSet( st, false, queryParameters.getRowSelection(), session ); HolderInstantiator hi = new HolderInstantiator(holderConstructor, false, false, null); Iterator result = new IteratorImpl( rs, st, session, returnTypes, getColumnNames(), hi ); if ( stats ) { session.getFactory().getStatisticsImplementor().queryExecuted( "HQL: " + queryString, 0, System.currentTimeMillis() - startTime ); } return result; } catch ( SQLException sqle ) { throw JDBCExceptionHelper.convert( getFactory().getSQLExceptionConverter(), sqle, "could not execute query using iterate", getSQLString() ); } }
session.getFactory().getStatisticsImplementor().queryExecuted( "HQL: " + queryTranslator.getQueryString(), 0,
session.getFactory().getStatisticsImplementor().queryExecuted( "HQL: " + queryString, 0,
getFactory().getStatisticsImplementor().queryExecuted( getQueryIdentifier(), 0,
session.getFactory().getStatisticsImplementor().queryExecuted(