1 package org.hibernate.loader.collection; 3 4 import java.util.Map ; 5 6 import org.apache.commons.logging.Log; 7 import org.apache.commons.logging.LogFactory; 8 import org.hibernate.MappingException; 9 import org.hibernate.engine.SessionFactoryImplementor; 10 import org.hibernate.loader.JoinWalker; 11 import org.hibernate.persister.collection.QueryableCollection; 12 13 22 public class BasicCollectionLoader extends CollectionLoader { 23 24 private static final Log log = LogFactory.getLog(BasicCollectionLoader.class); 25 26 public BasicCollectionLoader( 27 QueryableCollection collectionPersister, 28 SessionFactoryImplementor session, 29 Map enabledFilters) 30 throws MappingException { 31 this(collectionPersister, 1, session, enabledFilters); 32 } 33 34 public BasicCollectionLoader( 35 QueryableCollection collectionPersister, 36 int batchSize, 37 SessionFactoryImplementor factory, 38 Map enabledFilters) 39 throws MappingException { 40 this(collectionPersister, batchSize, null, factory, enabledFilters); 41 } 42 43 protected BasicCollectionLoader( 44 QueryableCollection collectionPersister, 45 int batchSize, 46 String subquery, 47 SessionFactoryImplementor factory, 48 Map enabledFilters) 49 throws MappingException { 50 51 super(collectionPersister, factory, enabledFilters); 52 53 JoinWalker walker = new BasicCollectionJoinWalker( 54 collectionPersister, 55 batchSize, 56 subquery, 57 factory, 58 enabledFilters 59 ); 60 initFromWalker( walker ); 61 62 postInstantiate(); 63 64 log.debug( "Static select for collection " + collectionPersister.getRole() + ": " + getSQLString() ); 65 } 66 67 } 68 | Popular Tags |