Java Code Examples for org.hibernate.loader.custom.CustomLoader#list()
The following examples show how to use
org.hibernate.loader.custom.CustomLoader#list() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SessionImpl.java From lams with GNU General Public License v2.0 | 6 votes |
@Override public List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) { checkOpenOrWaitingForAutoClose(); // checkTransactionSynchStatus(); if ( log.isTraceEnabled() ) { log.tracev( "SQL query: {0}", customQuery.getSQL() ); } CustomLoader loader = getFactory().getQueryPlanCache().getNativeQueryInterpreter().createCustomLoader( customQuery, getFactory() ); autoFlushIfRequired( loader.getQuerySpaces() ); dontFlushFromFind++; boolean success = false; try { List results = loader.list( this, queryParameters ); success = true; return results; } finally { dontFlushFromFind--; delayedAfterCompletion(); afterOperation( success ); } }
Example 2
Source File: StatelessSessionImpl.java From lams with GNU General Public License v2.0 | 6 votes |
@Override public List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException { checkOpen(); CustomLoader loader = new CustomLoader( customQuery, getFactory() ); boolean success = false; List results; try { results = loader.list( this, queryParameters ); success = true; } finally { afterOperation( success ); } temporaryPersistenceContext.clear(); return results; }
Example 3
Source File: SessionImpl.java From cacheonix-core with GNU Lesser General Public License v2.1 | 6 votes |
public List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException { errorIfClosed(); checkTransactionSynchStatus(); if ( log.isTraceEnabled() ) { log.trace( "SQL query: " + customQuery.getSQL() ); } CustomLoader loader = new CustomLoader( customQuery, getFactory() ); autoFlushIfRequired( loader.getQuerySpaces() ); dontFlushFromFind++; boolean success = false; try { List results = loader.list(this, queryParameters); success = true; return results; } finally { dontFlushFromFind--; afterOperation(success); } }
Example 4
Source File: StatelessSessionImpl.java From cacheonix-core with GNU Lesser General Public License v2.1 | 6 votes |
public List listCustomQuery(CustomQuery customQuery, QueryParameters queryParameters) throws HibernateException { errorIfClosed(); CustomLoader loader = new CustomLoader( customQuery, getFactory() ); boolean success = false; List results; try { results = loader.list(this, queryParameters); success = true; } finally { afterOperation(success); } temporaryPersistenceContext.clear(); return results; }