• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to use multiple filters at class level

 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem1:
I have one filter already defined at the class level and wanted to have another filter at classs level. How to implement that?

Problem2:
My class structure is ClassA, ClassB and ClassC.

Class A contains set for Class B. They have one to many relationship.

ClassB and ClassC has many-to-one relationship. So I have following method call in my ClassB.
public ClassC getClassC(){//return instance of ClassC};

My initial filter in ClassA filters isactive='Y' column of Class B and works fine. This filter defined on the set collection of ClassB in Class A.

Now I have to define another filter at ClassA which filters
ClassB.ClassC.cityId =5 and it also need to implement at set collection of ClassB in ClassA.

How to do that?
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As a second thought, if I can use multiple ParamDef in same filter that will also work.
But in that case I don't know how to put condition on the object of ClassC(i.e. ClassB.ClassC.cityId=:cityId)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic