Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.Get(T)(Object, LockMode) Method

Return the persistent instance of the given entity type with the given identifier, or null if not found. Obtains the specified lock mode if the instance exists.

[Visual Basic]
Public NotOverridable Overloads Sub Get(Of T)( _
   ByVal id As Object, _
   ByVal lockMode As LockMode _
) _
    Implements IHibernateOperations.Get
[C#]
public T Get<T>(
   object id,
   LockMode lockMode
);

Parameters

id
The lock mode to obtain.
lockMode
The lock mode.

Return Value

the persistent instance, or null if not found

Implements

IHibernateOperations.Get

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

HibernateTemplate Class | Spring.Data.NHibernate.Generic Namespace | HibernateTemplate.Get(T) Overload List