• 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

Initial display the records in the Table.

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
I am trying to initially display the data from the database file in the Table. I work with my data with the help of Data Class. By initialisation I need one method to read all records from the database file and display this in the table. And this method that I need doesn�t exist in the DB interface.
To change the DB interface and the Data corresponding, I think, it not a good idea.
After I read the schema of the Database file I have a number of records and one method from the DB interface that displays only one record with the given record number:


Can I read all record from the Database in this way?:



This Method will be called from the Controller (MVC).
How do you think is it a good way to read all data? Do you have another idea about initial reading of the records from the database file and displaying this in the Table.
I am very thankful for your comments, advices and help!
Lena
[ February 26, 2005: Message edited by: Olena Golub ]
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Olena,

How about searching for all records? This is a method your interface already must contain. Then read all found records and show them in your table.

Frans.
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Olena:

The Data class should only do I/O and caching. The actual business logic should be in some other class. Reading all records would be in that class. It would be like an Adapter from your Data layer.

This is a separate issue from the readAll method that you might implement to cache your records.
[ February 26, 2005: Message edited by: Anton Golovin ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic