1 package org.hibernate.loader; 3 4 import java.util.Map ; 5 6 import org.hibernate.LockMode; 7 import org.hibernate.dialect.Dialect; 8 import org.hibernate.engine.SessionFactoryImplementor; 9 import org.hibernate.persister.collection.CollectionPersister; 10 import org.hibernate.persister.entity.Loadable; 11 import org.hibernate.type.EntityType; 12 13 21 public abstract class OuterJoinLoader extends BasicLoader { 22 23 protected Loadable[] persisters; 24 protected CollectionPersister[] collectionPersisters; 25 protected int[] collectionOwners; 26 protected String [] aliases; 27 protected LockMode[] lockModeArray; 28 protected int[] owners; 29 protected EntityType[] ownerAssociationTypes; 30 protected String sql; 31 protected String [] suffixes; 32 protected String [] collectionSuffixes; 33 34 private Map enabledFilters; 35 36 protected final Dialect getDialect() { 37 return getFactory().getDialect(); 38 } 39 40 public OuterJoinLoader(SessionFactoryImplementor factory, Map enabledFilters) { 41 super(factory); 42 this.enabledFilters = enabledFilters; 43 } 44 45 protected String [] getSuffixes() { 46 return suffixes; 47 } 48 49 protected String [] getCollectionSuffixes() { 50 return collectionSuffixes; 51 } 52 53 protected final String getSQLString() { 54 return sql; 55 } 56 57 protected final Loadable[] getEntityPersisters() { 58 return persisters; 59 } 60 61 protected int[] getOwners() { 62 return owners; 63 } 64 65 protected EntityType[] getOwnerAssociationTypes() { 66 return ownerAssociationTypes; 67 } 68 69 protected LockMode[] getLockModes(Map lockModes) { 70 return lockModeArray; 71 } 72 73 public Map getEnabledFilters() { 74 return enabledFilters; 75 } 76 77 protected final String [] getAliases() { 78 return aliases; 79 } 80 81 protected final CollectionPersister[] getCollectionPersisters() { 82 return collectionPersisters; 83 } 84 85 protected final int[] getCollectionOwners() { 86 return collectionOwners; 87 } 88 89 protected void initFromWalker(JoinWalker walker) { 90 persisters = walker.getPersisters(); 91 collectionPersisters = walker.getCollectionPersisters(); 92 ownerAssociationTypes = walker.getOwnerAssociationTypes(); 93 lockModeArray = walker.getLockModeArray(); 94 suffixes = walker.getSuffixes(); 95 collectionSuffixes = walker.getCollectionSuffixes(); 96 owners = walker.getOwners(); 97 collectionOwners = walker.getCollectionOwners(); 98 sql = walker.getSQLString(); 99 aliases = walker.getAliases(); 100 } 101 102 } 103 | Popular Tags |