public Query createQuery(String ejbqlString) { //adjustFlushMode(); try { return new QueryImpl( getSession().createQuery( ejbqlString ), this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createQuery(String ejbqlString) { //adjustFlushMode(); try { return new QueryImpl( getSession().createQuery( ejbqlString ), this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createQuery(String jpaqlString) { try { return applyProperties( new QueryImpl<Object>( getSession().createQuery( jpaqlString ), this ) ); } catch ( HibernateException he ) { throw convert( he ); } }
public Query createNamedQuery(String name) { try { org.hibernate.Query namedQuery = getSession().getNamedQuery( name ); try { return new QueryImpl( namedQuery, this ); } catch ( HibernateException he ) { throw convert( he ); } } catch ( MappingException e ) { throw new IllegalArgumentException( "Named query not found: " + name ); } }
public Query createNamedQuery(String name) { //adjustFlushMode(); org.hibernate.Query namedQuery; try { namedQuery = getSession().getNamedQuery( name ); } catch (MappingException e) { throw new IllegalArgumentException("Named query not found: " + name); } try { return new QueryImpl( namedQuery, this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createNativeQuery(String sqlString) { //adjustFlushMode(); try { SQLQuery q = getSession().createSQLQuery( sqlString ); return new QueryImpl( q, this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createNativeQuery(String sqlString) { try { SQLQuery q = getSession().createSQLQuery( sqlString ); return new QueryImpl( q, this ); } catch ( HibernateException he ) { throw convert( he ); } }
public Query createNamedQuery(String name) { //adjustFlushMode(); try { return new QueryImpl( getSession().getNamedQuery( name ), this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createNativeQuery(String sqlString, Class resultClass) { //adjustFlushMode(); try { SQLQuery q = getSession().createSQLQuery( sqlString ); q.addEntity( "alias1", resultClass.getName(), LockMode.READ ); return new QueryImpl( q, this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createNativeQuery(String sqlString, Class resultClass) { try { SQLQuery q = getSession().createSQLQuery( sqlString ); q.addEntity( "alias1", resultClass.getName(), LockMode.READ ); return new QueryImpl( q, this ); } catch ( HibernateException he ) { throw convert( he ); } }
public Query createNativeQuery(String sqlString) { //adjustFlushMode(); try { SQLQuery q = getSession().createSQLQuery( sqlString ); return new QueryImpl( q, this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createNativeQuery(String sqlString, Class resultClass) { //adjustFlushMode(); try { SQLQuery q = getSession().createSQLQuery( sqlString ); q.addEntity( "alias1", resultClass.getName(), LockMode.READ ); return new QueryImpl( q, this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
public Query createNativeQuery(String sqlString, String resultSetMapping) { try { SQLQuery q = getSession().createSQLQuery( sqlString ); q.setResultSetMapping( resultSetMapping ); return new QueryImpl( q, this ); } catch ( HibernateException he ) { throw convert( he ); } }
public Query createNativeQuery(String sqlString, String resultSetMapping) { //adjustFlushMode(); try { SQLQuery q = getSession().createSQLQuery( sqlString ); q.setResultSetMapping( resultSetMapping ); return new QueryImpl( q, this ); } catch (HibernateException he) { throwPersistenceException( he ); return null; } }
return new QueryImpl<T>( hqlQuery, this );
public <T> TypedQuery<T> createQuery( String jpaqlString, Class<T> resultClass, Selection selection, Options options) { try { org.hibernate.Query hqlQuery = getSession().createQuery( jpaqlString ); if ( options.getValueHandlers() == null ) { options.getResultMetadataValidator().validate( hqlQuery.getReturnTypes() ); } // determine if we need a result transformer List tupleElements = Tuple.class.equals( resultClass ) ? ( ( CompoundSelectionImpl<Tuple> ) selection ).getCompoundSelectionItems() : null; if ( options.getValueHandlers() != null || tupleElements != null ) { hqlQuery.setResultTransformer( new CriteriaQueryTransformer( options.getValueHandlers(), tupleElements ) ); } return new QueryImpl<T>( hqlQuery, this, options.getNamedParameterExplicitTypes() ); } catch ( HibernateException he ) { throw convert( he ); } }
return new QueryImpl<T>( namedQuery, this );