Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find method : Filtering in Gui?

 
Bably Das
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I understand that in the Data class my find method has to do a OR search with startsWith and in the GUI I need to use a equals / equalsIgnoreCase for exact matches. For this apart from the provided find method in the Data class I have extra methods to do the exact matches fulfilling both AND and OR conditions on name and location. Is this the right approach or should I use TableRowSorter to do filtering? I find using methods more intuitive but would like to use the correct approach. From what I understand the Data class should be separate from the gui layer so having methods in the Dats class to be used in the GUI seems a not right to me.Can anyone please throw some light in this regard?

Thanks,
Regards,
Bably Das
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bably,

The find-method in my business service filters the records returned by the find-method of the Data class. The filtered list is returned to the GUI and displayed in the JTable.
Of course it is just another decision you have to make but using a Sorter to filter records is not a very good idea: a Sorter should be used to sort records in some kind of order.

Kind regards,
Roel
 
Bably Das
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roel for the quick reply!
The find-method in my business service filters the records returned by the find-method of the Data class. The filtered list is returned to the GUI and displayed in the JTable.


My find method in the business layer is doing exactly that! I am at peace now

Regards,
Bably Das

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic