Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.Load(Type, Object) Method

Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.

[Visual Basic]
Public NotOverridable Overloads Sub Load( _
   ByVal entityType As Type, _
   ByVal id As Object _
) _
    Implements IHibernateOperations.Load
[C#]
public object Load(
   Type entityType,
   object id
);

Parameters

entityType
Type of the entity.
id
An identifier of the persistent instance.

Return Value

The persistent instance

Implements

IHibernateOperations.Load

Exceptions

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

See Also

HibernateTemplate Class | Spring.Data.NHibernate Namespace | HibernateTemplate.Load Overload List