Hibernate Filters - VI

30 August 2008

After defining a filter, it might be attached to multiple entities and/or collections and each will have its own condition. Yes, it is tedious when the conditions are the same each time and you have to repeat the condition.

Use to define a default condition, either as an attribute or CDATA as shown below:

<filter-def name="myFilter" condition="abc > xyz">...</filter-def>
<filter-def name="myOtherFilter">abc=xyz</filter-def>

Now whenever you attach a filter to something without specifying a condition, this default condition will be used. You may overrides the default condition if you provide a specific condition as part of the attachment of the filter.

del.icio.us:Hibernate Filters - VI  digg:Hibernate Filters - VI  spurl:Hibernate Filters - VI  wists:Hibernate Filters - VI  simpy:Hibernate Filters - VI  newsvine:Hibernate Filters - VI  blinklist:Hibernate Filters - VI  furl:Hibernate Filters - VI  reddit:Hibernate Filters - VI  fark:Hibernate Filters - VI  blogmarks:Hibernate Filters - VI  Y!:Hibernate Filters - VI  smarking:Hibernate Filters - VI  magnolia:Hibernate Filters - VI  segnalo:Hibernate Filters - VI  gifttagging:Hibernate Filters - VI

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 - VI

Leave a Reply