Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.FindByNamedQuery(String, Object, IType) Method

Execute a named query for persistent instances, binding a number of values to "?" parameters in the query string. A named query is defined in a Hibernate mapping file.

[Visual Basic]
Public NotOverridable Overloads Sub FindByNamedQuery( _
   ByVal queryName As String, _
   ByVal values As Object, _
   ByVal types As IType _
) _
    Implements IHibernateOperations.FindByNamedQuery
[C#]
public IList FindByNamedQuery(
   string queryName,
   object[] values,
   IType[] types
);

Parameters

queryName
The name of a Hibernate query in a mapping file
values
The values of the parameters
types
Hibernate types of the parameters (or
null
)

Return Value

A List containing 0 or more persistent instances

Implements

IHibernateOperations.FindByNamedQuery

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors
ArgumentOutOfRangeException If values and types are not null and their lengths differ.

See Also

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