FileDocCategorySizeDatePackage
EntityLoader.javaAPI DocHibernate 3.2.52249Tue Jul 26 00:51:48 BST 2005org.hibernate.loader.entity

EntityLoader

public class EntityLoader extends AbstractEntityLoader
Loads an entity instance using outerjoin fetching to fetch associated entities.
The EntityPersister must implement Loadable. For other entities, create a customized subclass of Loader.
author
Gavin King

Fields Summary
private final boolean
batchLoader
Constructors Summary
public EntityLoader(org.hibernate.persister.entity.OuterJoinLoadable persister, org.hibernate.LockMode lockMode, org.hibernate.engine.SessionFactoryImplementor factory, Map enabledFilters)

		this(persister, 1, lockMode, factory, enabledFilters);
	
public EntityLoader(org.hibernate.persister.entity.OuterJoinLoadable persister, int batchSize, org.hibernate.LockMode lockMode, org.hibernate.engine.SessionFactoryImplementor factory, Map enabledFilters)

		this( 
				persister, 
				persister.getIdentifierColumnNames(), 
				persister.getIdentifierType(), 
				batchSize,
				lockMode,
				factory, 
				enabledFilters 
			);
	
public EntityLoader(org.hibernate.persister.entity.OuterJoinLoadable persister, String[] uniqueKey, org.hibernate.type.Type uniqueKeyType, int batchSize, org.hibernate.LockMode lockMode, org.hibernate.engine.SessionFactoryImplementor factory, Map enabledFilters)

		super(persister, uniqueKeyType, factory, enabledFilters);

		JoinWalker walker = new EntityJoinWalker(
				persister, 
				uniqueKey, 
				batchSize, 
				lockMode, 
				factory, 
				enabledFilters
			);
		initFromWalker( walker );

		postInstantiate();

		batchLoader = batchSize > 1;
		
		log.debug( "Static select for entity " + entityName + ": " + getSQLString() );

	
Methods Summary
protected booleanisSingleRowLoader()

		return !batchLoader;
	
public java.lang.ObjectloadByUniqueKey(org.hibernate.engine.SessionImplementor session, java.lang.Object key)

		return load(session, key, null, null);