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

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


net.sf.hibernate.loader
Class OneToManyLoader

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

public class OneToManyLoader
extends OuterJoinLoader
implements CollectionInitializer

Loads one-to-many associations

The collection persister must implement QueryableCOllection. For other collections, create a customized subclass of Loader.

Author:
Gavin King
See Also:
CollectionLoader

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
OneToManyLoader(QueryableCollection collPersister, int batchSize, SessionFactoryImplementor factory)
           
OneToManyLoader(QueryableCollection collPersister, SessionFactoryImplementor session)
           
 
Method Summary
protected  CollectionPersister getCollectionPersister()
          An (optional) persister for a collection to be initialized; only collection loaders return a non-null value
 void initialize(Serializable id, SessionImplementor session)
          Initialize the given collection
protected  boolean isJoinedFetchEnabled(Type type, boolean mappingDefault, String path, String table, String[] foreignKeyColumns)
          Override on subclasses to enable or suppress joining of some associations, especially in the case of dynamic fetch settings
 
Methods inherited from class net.sf.hibernate.loader.OuterJoinLoader
containsCollectionPersister, countClassPersisters, createLockModeArray, generateRootAlias, generateTableAlias, getJoinType, getLockModes, getOwners, getPersisters, getSQLString, getSuffixes, 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

OneToManyLoader

public OneToManyLoader(QueryableCollection collPersister,
                       SessionFactoryImplementor session)
                throws MappingException

OneToManyLoader

public OneToManyLoader(QueryableCollection collPersister,
                       int batchSize,
                       SessionFactoryImplementor factory)
                throws MappingException
Method Detail

isJoinedFetchEnabled

protected boolean isJoinedFetchEnabled(Type type,
                                       boolean mappingDefault,
                                       String path,
                                       String table,
                                       String[] foreignKeyColumns)
Description copied from class: OuterJoinLoader
Override on subclasses to enable or suppress joining of some associations, especially in the case of dynamic fetch settings

Overrides:
isJoinedFetchEnabled in class OuterJoinLoader

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