Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IHibernateOperations.Load(T)(Object, LockMode) Method

Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found. Obtains the specified lock mode if the instance exists.

[Visual Basic]
Public Sub Load(Of T)( _
   ByVal id As Object, _
   ByVal lockMode As LockMode _
T Load<T>(
   object id,
   LockMode lockMode


An identifier of the persistent instance.
The lock mode.

Return Value

The persistent instance


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

See Also

IHibernateOperations Interface | Spring.Data.NHibernate.Generic Namespace | IHibernateOperations.Load(T) Overload List