Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.Load Method

Load the persistent instance with the given identifier into the given object, throwing an exception if not found.

[Visual Basic]
Public NotOverridable Sub Load( _
   ByVal entity As Object, _
   ByVal id As Object _
) _
    Implements ICommonHibernateOperations.Load
[C#]
public void Load(
   object entity,
   object id
);

Parameters

entity
Entity the object (of the target class) to load into.
id
An identifier of the persistent instance.

Implements

ICommonHibernateOperations.Load

Exceptions

Exception Type Condition
ObjectRetrievalFailureException If object not found.
DataAccessException In case of Hibernate errors

See Also

HibernateTemplate Class | Spring.Data.NHibernate.Generic Namespace