Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S : DBAccess

 
Chris Hurst
Ranch Hand
Posts: 443
3
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming its ok to expand on the DBAccess interface i.e. implement more methods in Data that can be used by the GUI as currently there are no methods to read the database schema from the database in mine, just manipulate records so I'ed have to hard code this data in the GUI otherwise ?? Does the GUI have to use methods of the DBAccess form at all I mean I know you have to provide them and they must work but could you just provide some better ones as well and actually use them on the GUI (not intending to do this just thinking aloud).
 
Mark Ebeling
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree. I have implemented more methods in the Data class than are in the DBAccess interface too. But it would be good to hear from someone who has passed that they did it. I really don't see why it would be a problem.
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also doing the SCJD.

I think that it would be better to take these extra methods into a higher level (business level/layer), these extended methods will use the original interface methods.

that's only my opinion.
 
uzma ali
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

You might want to read through older post regarding this. What others have done, extended the DBACESS interface from another interface and defined additional methods in that interface.

I hope this helps

Uzma
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic