Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateAccessor.PrepareCriteria Method

Prepare the given Criteria object, applying cache settings and/or a transaction timeout.

[Visual Basic]
Public Sub PrepareCriteria( _
   ByVal criteria As ICriteria _
)
[C#]
public void PrepareCriteria(
   ICriteria criteria
);

Parameters

criteria
The criteria object to prepare

Remarks

Note that for NHibernate 1.2 this only works if the implementation is of the type CriteriaImpl, which should generally be the case. The SetFetchSize method is not available on the ICriteria interface

This is a no-op for NHibernate 1.0.x since the SetFetchSize method is not on the ICriteria interface and the implementation class is has internal access.

To remove the method completely for Spring's NHibernate 1.0 support while reusing code for NHibernate 1.2 would not be possible. So now this ineffectual operation is left in tact for NHibernate 1.0.2 support.

See Also

HibernateAccessor Class | Spring.Data.NHibernate Namespace