Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.FindByNamedQuery(T)(String, Object, IType) Method

Execute a named query for persistent instances, binding one value to a "?" parameter in the query string. A named query is defined in a Hibernate mapping file.

[Visual Basic]
Public NotOverridable Overloads Sub FindByNamedQuery(Of T)( _
   ByVal queryName As String, _
   ByVal value As Object, _
   ByVal type As IType _
) _
    Implements IHibernateOperations.FindByNamedQuery
[C#]
public IList<T> FindByNamedQuery<T>(
   string queryName,
   object value,
   IType type
);

Parameters

queryName
The name of a Hibernate query in a mapping file
value
The value of the parameter
type
Hibernate type of the parameter (or null)

Return Value

A generic List containing 0 or more persistent instances

Implements

IHibernateOperations.FindByNamedQuery

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

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