Apply a filter to a persistent collection, binding the given parameter to a "?" placeholder

Namespace:  NHibernate
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
<ObsoleteAttribute("Use ISession.CreateFilter().SetXYZ().List()")> _
Function Filter ( _
	collection As Object, _
	filter As String, _
	value As Object, _
	type As IType _
) As ICollection
C#
[ObsoleteAttribute("Use ISession.CreateFilter().SetXYZ().List()")]
ICollection Filter(
	Object collection,
	string filter,
	Object value,
	IType type
)
Visual C++
[ObsoleteAttribute(L"Use ISession.CreateFilter().SetXYZ().List()")]
ICollection^ Filter(
	Object^ collection, 
	String^ filter, 
	Object^ value, 
	IType^ type
)
JavaScript
function filter(collection, filter, value, type);

Parameters

collection
Type: System..::.Object
A persistent collection to filter
filter
Type: System..::.String
A filter query string
value
Type: System..::.Object
A value to be written to a "?" placeholder in the query
type
Type: NHibernate.Type..::.IType
The hibernate type of value

Return Value

A collection

Remarks

A filter is a Hibernate query that may refer to this, the collection element. Filters allow efficient access to very large lazy collections. (Executing the filter does not initialize the collection.)

See Also