Hibernate Filters - III
29 August 2008This is in continuation to the last post.
The methods on Session are:
enableFilter(String filterName) getEnabledFilter(String filterName) disableFilter(String filterName)
Remember that the default behavious is that filters are not enabled for a given session. You have to explcitly enabled them
through use of the Session.enabledFilter() method. It will return an instance of the Filter interface.
Using the simple filter defined above, it would look like:
session.enableFilter("myFilter").setParameter("myFilterParam", "some-value");
The methods on the org.hibernate.Filter interface do allow the method-chaining common to much of Hibernate.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Hibernate Filters - III