• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX (Contractors).. DBAccess, Data, and DataAdapter Dilemma

 
Majid AlMeshari
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I just started the new assignment (Contractors), before that I completed the indispensable Max's book.
The Dilemma I'm facing at the moment is a Sun's requirement thing. The requirements say:
"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface..."
does this mean that the class that handles the DB I/O must be Data.java?
Or , as Max advises, we can declare a DB I/O calss that handles the I/O without impliementing the DBAccess Interface?.
Between trying an elegant solution and sticking to the requirements, there is a fine thin red line. You cross it and you fail automatically.
 
Mike Southgate
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO, this means the class that handles at least the IO in the interface must be in the Data class.
ms
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Majid
Welcome to JavaRanch.
Your requirements do not state that all IO must be done through the Data class. You could have another class doing IO which Data calls as required.
If you do this, you just have to make sure that the Data class is the class that the rest of your application calls to access the database - they must not call (or even know about) your other class which is doing the low level work.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic