public QueryParameters createCopyUsing(RowSelection selection) { QueryParameters copy = new QueryParameters( this.positionalParameterTypes, this.positionalParameterValues, this.namedParameters, this.lockModes, selection, this.readOnly, this.cacheable, this.cacheRegion, this.comment, this.collectionKeys, this.optionalObject, this.optionalEntityName, this.optionalId, this.resultTransformer ); copy.processedSQL = this.processedSQL; copy.processedPositionalParameterTypes = this.processedPositionalParameterTypes; copy.processedPositionalParameterValues = this.processedPositionalParameterValues; return copy; }
/** * Retrieve a list of persistent objects using a hibernate query */ public List find(String query) throws HibernateException { return list( query, new QueryParameters() ); }
public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws HibernateException { Object[] vals = new Object[values.length + 1]; Type[] typs = new Type[types.length + 1]; System.arraycopy( values, 0, vals, 1, values.length ); System.arraycopy( types, 0, typs, 1, types.length ); return listFilter( collection, filter, new QueryParameters( typs, vals ) ); }
public Collection filter(Object collection, String filter, Object[] values, Type[] types) throws HibernateException { Object[] vals = new Object[values.length + 1]; Type[] typs = new Type[types.length + 1]; System.arraycopy( values, 0, vals, 1, values.length ); System.arraycopy( types, 0, typs, 1, types.length ); return listFilter( collection, filter, new QueryParameters( typs, vals ) ); }
public List find(String query, Object value, Type type) throws HibernateException { return list( query, new QueryParameters(type, value) ); }
public Iterator iterate(String query, Object[] values, Type[] types) throws HibernateException { return iterate( query, new QueryParameters(types, values) ); }
public Iterator iterate(String query) throws HibernateException { return iterate( query, new QueryParameters() ); }
public List find(String query, Object[] values, Type[] types) throws HibernateException { return list( query, new QueryParameters(types, values) ); }
public Iterator iterate(String query) throws HibernateException { return iterate( query, new QueryParameters() ); }
public List find(String query, Object[] values, Type[] types) throws HibernateException { return list( query, new QueryParameters(types, values) ); }
public Collection filter(Object collection, String filter) throws HibernateException { return listFilter( collection, filter, new QueryParameters( new Type[1], new Object[1] ) ); }
public Iterator iterate(String query, Object value, Type type) throws HibernateException { return iterate( query, new QueryParameters(type, value) ); }
public Collection filter(Object collection, String filter, Object value, Type type) throws HibernateException { return listFilter( collection, filter, new QueryParameters( new Type[]{null, type}, new Object[]{null, value} ) ); }
public Collection filter(Object collection, String filter) throws HibernateException { return listFilter( collection, filter, new QueryParameters( new Type[1], new Object[1] ) ); }
public QueryParameters getQueryParameters(Map namedParams) { return new QueryParameters( typeArray(), valueArray(), namedParams, getLockModes(), getSelection(), readOnly, cacheable, cacheRegion, comment, collectionKey == null ? null : new Serializable[] { collectionKey }, optionalObject, optionalEntityName, optionalId, resultTransformer ); }
public QueryParameters getQueryParameters(Map namedParams) { return new QueryParameters( typeArray(), valueArray(), namedParams, getLockModes(), getSelection(), readOnly, cacheable, cacheRegion, //forceCacheRefresh, comment, collectionKey==null ? null : new Serializable[] { collectionKey } ); }
public Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException { errorIfClosed(); checkTransactionSynchStatus(); queryParameters.validateParameters(); HQLQueryPlan plan = getHQLQueryPlan( query, true ); autoFlushIfRequired( plan.getQuerySpaces() ); dontFlushFromFind++; //stops flush being called multiple times if this method is recursively called try { return plan.performIterate( queryParameters, this ); } finally { dontFlushFromFind--; } }
doQueryAndInitializeNonLazyCollections( session, new QueryParameters( idTypes, ids, ids ), true );
doQueryAndInitializeNonLazyCollections( session, new QueryParameters( new Type[]{type}, ids, ids ), true );
/** * Called by subclasses that batch initialize collections */ protected final void loadCollectionSubselect(final SessionImplementor session, final Serializable[] ids, final Object[] parameterValues, final Type[] parameterTypes, final Map namedParameters, final Type type) throws HibernateException { Type[] idTypes = new Type[ids.length]; Arrays.fill( idTypes, type ); try { doQueryAndInitializeNonLazyCollections( session, new QueryParameters( parameterTypes, parameterValues, namedParameters, ids ), true ); } catch ( SQLException sqle ) { throw JDBCExceptionHelper.convert( factory.getSQLExceptionConverter(), sqle, "could not load collection by subselect: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() ); } }