/** * Called by subclasses that batch initialize collections */ protected final void loadCollectionSubselect( final SharedSessionContractImplementor session, final Serializable[] ids, final Object[] parameterValues, final Type[] parameterTypes, final Map<String, TypedValue> namedParameters, final Type type) throws HibernateException { final Type[] idTypes = new Type[ids.length]; Arrays.fill( idTypes, type ); try { doQueryAndInitializeNonLazyCollections( session, new QueryParameters( parameterTypes, parameterValues, namedParameters, ids ), true ); } catch (SQLException sqle) { throw factory.getJdbcServices().getSqlExceptionHelper().convert( sqle, "could not load collection by subselect: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() ); } }
LOG.debugf( "Batch loading collection: %s", MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ) ); sqle, "could not initialize a collection batch: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() );
final CollectionPersister[] collectionPersisters = getCollectionPersisters(); if ( collectionPersisters != null ) {
LOG.debugf( "Loading collection: %s", MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ) ); sqle, "could not initialize a collection: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ), getSQLString() );
CollectionPersister[] collectionPersisters = getCollectionPersisters(); for ( CollectionPersister collectionPersister : collectionPersisters ) { for ( Serializable key : keys ) {
List<AfterLoadAction> afterLoadActions) throws HibernateException { final CollectionPersister[] collectionPersisters = getCollectionPersisters(); if ( collectionPersisters != null ) { for ( CollectionPersister collectionPersister : collectionPersisters ) {
log.debug( "batch loading collection: "+ MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ) ); sqle, "could not initialize a collection batch: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() );
log.debug( "loading collection: "+ MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ) ); sqle, "could not initialize a collection: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ), getSQLString() );
CollectionPersister[] collectionPersisters = getCollectionPersisters(); for ( int j=0; j<collectionPersisters.length; j++ ) { for ( int i = 0; i < keys.length; i++ ) {
/** * Called by wrappers that batch initialize collections */ public final void loadCollectionBatch( final SessionImplementor session, final Serializable[] ids, final Type type) throws HibernateException { if ( LOG.isDebugEnabled() ) LOG.debugf( "Batch loading collection: %s", MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ) ); Type[] idTypes = new Type[ids.length]; Arrays.fill( idTypes, type ); try { doQueryAndInitializeNonLazyCollections( session, new QueryParameters( idTypes, ids, ids ), true ); } catch ( SQLException sqle ) { throw factory.getSQLExceptionHelper().convert( sqle, "could not initialize a collection batch: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() ); } LOG.debug( "Done batch load" ); }
/** * Called by wrappers that batch initialize collections */ public final void loadCollectionBatch( final SessionImplementor session, final Serializable[] ids, final Type type) throws HibernateException { if ( LOG.isDebugEnabled() ) LOG.debugf( "Batch loading collection: %s", MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ) ); Type[] idTypes = new Type[ids.length]; Arrays.fill( idTypes, type ); try { doQueryAndInitializeNonLazyCollections( session, new QueryParameters( idTypes, ids, ids ), true ); } catch ( SQLException sqle ) { throw factory.getSQLExceptionHelper().convert( sqle, "could not initialize a collection batch: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() ); } LOG.debug( "Done batch load" ); }
/** * 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 factory.getSQLExceptionHelper().convert( sqle, "could not load collection by subselect: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() ); } }
/** * 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() ); } }
/** * 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 factory.getSQLExceptionHelper().convert( sqle, "could not load collection by subselect: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], ids, getFactory() ), getSQLString() ); } }
final CollectionPersister[] collectionPersisters = getCollectionPersisters(); if ( collectionPersisters != null ) {
sqle, "could not initialize a collection: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ), getSQLString() );
/** * Called by subclasses that initialize collections */ public final void loadCollection( final SessionImplementor session, final Serializable id, final Type type) throws HibernateException { if ( LOG.isDebugEnabled() ) LOG.debugf( "Loading collection: %s", MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ) ); Serializable[] ids = new Serializable[]{id}; try { doQueryAndInitializeNonLazyCollections( session, new QueryParameters( new Type[]{type}, ids, ids ), true ); } catch ( SQLException sqle ) { throw factory.getSQLExceptionHelper().convert( sqle, "could not initialize a collection: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ), getSQLString() ); } LOG.debug( "Done loading collection" ); }
/** * Called by subclasses that initialize collections */ public final void loadCollection( final SessionImplementor session, final Serializable id, final Type type) throws HibernateException { if ( LOG.isDebugEnabled() ) LOG.debugf( "Loading collection: %s", MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ) ); Serializable[] ids = new Serializable[]{id}; try { doQueryAndInitializeNonLazyCollections( session, new QueryParameters( new Type[]{type}, ids, ids ), true ); } catch ( SQLException sqle ) { throw factory.getSQLExceptionHelper().convert( sqle, "could not initialize a collection: " + MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory() ), getSQLString() ); } LOG.debug( "Done loading collection" ); }
CollectionPersister[] collectionPersisters = getCollectionPersisters(); for ( int j=0; j<collectionPersisters.length; j++ ) { for ( int i = 0; i < keys.length; i++ ) {
CollectionPersister[] collectionPersisters = getCollectionPersisters(); for ( int j=0; j<collectionPersisters.length; j++ ) { for ( int i = 0; i < keys.length; i++ ) {