FileDocCategorySizeDatePackage
SubselectOneToManyLoader.javaAPI DocHibernate 3.2.52046Fri Jul 29 00:36:14 BST 2005org.hibernate.loader.collection

SubselectOneToManyLoader

public class SubselectOneToManyLoader extends OneToManyLoader
Implements subselect fetching for a one to many association
author
Gavin King

Fields Summary
private final Serializable[]
keys
private final org.hibernate.type.Type[]
types
private final Object[]
values
private final Map
namedParameters
private final Map
namedParameterLocMap
Constructors Summary
public SubselectOneToManyLoader(org.hibernate.persister.collection.QueryableCollection persister, String subquery, Collection entityKeys, org.hibernate.engine.QueryParameters queryParameters, Map namedParameterLocMap, org.hibernate.engine.SessionFactoryImplementor factory, Map enabledFilters)

		
		super(persister, 1, subquery, factory, enabledFilters);

		keys = new Serializable[ entityKeys.size() ];
		Iterator iter = entityKeys.iterator();
		int i=0;
		while ( iter.hasNext() ) {
			keys[i++] = ( (EntityKey) iter.next() ).getIdentifier();
		}
		
		this.namedParameters = queryParameters.getNamedParameters();
		this.types = queryParameters.getFilteredPositionalParameterTypes();
		this.values = queryParameters.getFilteredPositionalParameterValues();
		this.namedParameterLocMap = namedParameterLocMap;
		
	
Methods Summary
public int[]getNamedParameterLocs(java.lang.String name)

		return (int[]) namedParameterLocMap.get( name );
	
public voidinitialize(java.io.Serializable id, org.hibernate.engine.SessionImplementor session)

		loadCollectionSubselect( 
				session, 
				keys, 
				values,
				types,
				namedParameters,
				getKeyType() 
			);