basiccollectionloader.java
来自「一个Java持久层类库」· Java 代码 · 共 68 行
JAVA
68 行
//$Id: BasicCollectionLoader.java 7123 2005-06-13 20:10:20Z oneovthafew $package org.hibernate.loader.collection;import java.util.Map;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.hibernate.MappingException;import org.hibernate.engine.SessionFactoryImplementor;import org.hibernate.loader.JoinWalker;import org.hibernate.persister.collection.QueryableCollection;/** * Loads a collection of values or a many-to-many association. * <br> * The collection persister must implement <tt>QueryableCOllection<tt>. For * other collections, create a customized subclass of <tt>Loader</tt>. * * @see OneToManyLoader * @author Gavin King */public class BasicCollectionLoader extends CollectionLoader { private static final Logger log = LoggerFactory.getLogger(BasicCollectionLoader.class); public BasicCollectionLoader( QueryableCollection collectionPersister, SessionFactoryImplementor session, Map enabledFilters) throws MappingException { this(collectionPersister, 1, session, enabledFilters); } public BasicCollectionLoader( QueryableCollection collectionPersister, int batchSize, SessionFactoryImplementor factory, Map enabledFilters) throws MappingException { this(collectionPersister, batchSize, null, factory, enabledFilters); } protected BasicCollectionLoader( QueryableCollection collectionPersister, int batchSize, String subquery, SessionFactoryImplementor factory, Map enabledFilters) throws MappingException { super(collectionPersister, factory, enabledFilters); JoinWalker walker = new BasicCollectionJoinWalker( collectionPersister, batchSize, subquery, factory, enabledFilters ); initFromWalker( walker ); postInstantiate(); log.debug( "Static select for collection " + collectionPersister.getRole() + ": " + getSQLString() ); } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?