站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

CollectionLoader (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.loader
Class CollectionLoader

java.lang.Object
  extended bynet.sf.hibernate.loader.Loader
      extended bynet.sf.hibernate.loader.OuterJoinLoader
          extended bynet.sf.hibernate.loader.CollectionLoader
All Implemented Interfaces:
CollectionInitializer

public class CollectionLoader
extends OuterJoinLoader
implements CollectionInitializer

Loads a collection of values or a many-to-many association.
The collection persister must implement QueryableCOllection. For other collections, create a customized subclass of Loader.

Author:
Gavin King
See Also:
OneToManyLoader

Nested Class Summary
 
Nested classes inherited from class net.sf.hibernate.loader.OuterJoinLoader
OuterJoinLoader.OuterJoinableAssociation
 
Field Summary
 
Fields inherited from class net.sf.hibernate.loader.OuterJoinLoader
AUTO, classPersisters, EAGER, LAZY, lockModeArray, owners, sql, suffixes
 
Fields inherited from class net.sf.hibernate.loader.Loader
NO_SUFFIX
 
Constructor Summary
CollectionLoader(QueryableCollection persister, int batchSize, SessionFactoryImplementor factory)
           
CollectionLoader(QueryableCollection persister, SessionFactoryImplementor session)
           
 
Method Summary
protected  CollectionPersister getCollectionPersister()
          An (optional) persister for a collection to be initialized; only collection loaders return a non-null value
protected  int getJoinType(AssociationType type, int config, String path, String table, String[] foreignKeyColumns, SessionFactoryImplementor factory)
           
 void initialize(Serializable id, SessionImplementor session)
          Initialize the given collection
 
Methods inherited from class net.sf.hibernate.loader.OuterJoinLoader
containsCollectionPersister, countClassPersisters, createLockModeArray, generateRootAlias, generateTableAlias, getLockModes, getOwners, getPersisters, getSQLString, getSuffixes, isJoinedFetchEnabled, isJoinedFetchEnabledByDefault, mergeOuterJoins, selectString, toOwner, walkCollectionTree, walkTree, whereString
 
Methods inherited from class net.sf.hibernate.loader.Loader
applyLocks, bindNamedParameters, bindPositionalParameters, doList, generateAlias, generateSuffixes, getCollectionOwner, getResultColumnOrRow, getResultList, getResultSet, isSingleRowLoader, list, loadCollection, loadCollectionBatch, loadEntity, loadEntityBatch, loadSingleRow, postInstantiate, prepareQueryStatement, upgradeLocks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionLoader

public CollectionLoader(QueryableCollection persister,
                        SessionFactoryImplementor session)
                 throws MappingException

CollectionLoader

public CollectionLoader(QueryableCollection persister,
                        int batchSize,
                        SessionFactoryImplementor factory)
                 throws MappingException
Method Detail

getCollectionPersister

protected CollectionPersister getCollectionPersister()
Description copied from class: Loader
An (optional) persister for a collection to be initialized; only collection loaders return a non-null value

Overrides:
getCollectionPersister in class OuterJoinLoader

initialize

public void initialize(Serializable id,
                       SessionImplementor session)
                throws SQLException,
                       HibernateException
Description copied from interface: CollectionInitializer
Initialize the given collection

Specified by:
initialize in interface CollectionInitializer
Throws:
SQLException
HibernateException

getJoinType

protected int getJoinType(AssociationType type,
                          int config,
                          String path,
                          String table,
                          String[] foreignKeyColumns,
                          SessionFactoryImplementor factory)
                   throws MappingException
Overrides:
getJoinType in class OuterJoinLoader
Throws:
MappingException