FileDocCategorySizeDatePackage
LoadEvent.javaAPI DocHibernate 3.2.52558Mon Aug 08 18:24:44 BST 2005org.hibernate.event

LoadEvent

public class LoadEvent extends AbstractEvent
Defines an event class for the loading of an entity.
author
Steve Ebersole

Fields Summary
public static final org.hibernate.LockMode
DEFAULT_LOCK_MODE
private Serializable
entityId
private String
entityClassName
private Object
instanceToLoad
private org.hibernate.LockMode
lockMode
private boolean
isAssociationFetch
private Object
result
Constructors Summary
public LoadEvent(Serializable entityId, Object instanceToLoad, EventSource source)


	       
		this(entityId, null, instanceToLoad, null, false, source);
	
public LoadEvent(Serializable entityId, String entityClassName, org.hibernate.LockMode lockMode, EventSource source)

		this(entityId, entityClassName, null, lockMode, false, source);
	
public LoadEvent(Serializable entityId, String entityClassName, boolean isAssociationFetch, EventSource source)

		this(entityId, entityClassName, null, null, isAssociationFetch, source);
	
private LoadEvent(Serializable entityId, String entityClassName, Object instanceToLoad, org.hibernate.LockMode lockMode, boolean isAssociationFetch, EventSource source)


		super(source);

		if ( entityId == null ) {
			throw new IllegalArgumentException("id to load is required for loading");
		}

		if ( lockMode == LockMode.WRITE ) {
			throw new IllegalArgumentException("Invalid lock mode for loading");
		}
		else if ( lockMode == null ) {
			lockMode = DEFAULT_LOCK_MODE;
		}

		this.entityId = entityId;
		this.entityClassName = entityClassName;
		this.instanceToLoad = instanceToLoad;
		this.lockMode = lockMode;
		this.isAssociationFetch = isAssociationFetch;
	
Methods Summary
public java.lang.StringgetEntityClassName()

		return entityClassName;
	
public java.io.SerializablegetEntityId()

		return entityId;
	
public java.lang.ObjectgetInstanceToLoad()

		return instanceToLoad;
	
public org.hibernate.LockModegetLockMode()

		return lockMode;
	
public java.lang.ObjectgetResult()

		return result;
	
public booleanisAssociationFetch()

		return isAssociationFetch;
	
public voidsetEntityClassName(java.lang.String entityClassName)

		this.entityClassName = entityClassName;
	
public voidsetEntityId(java.io.Serializable entityId)

		this.entityId = entityId;
	
public voidsetInstanceToLoad(java.lang.Object instanceToLoad)

		this.instanceToLoad = instanceToLoad;
	
public voidsetLockMode(org.hibernate.LockMode lockMode)

		this.lockMode = lockMode;
	
public voidsetResult(java.lang.Object result)

		this.result = result;