Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Altering DB interface

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I know that we're not allowed to alter the DB interface that the Data access class MUST implement.

However, I was thinking that the if the DB interface extends an interface with exactly the same methods, only WITH throws RemoteException; it would solve a lot of problems.

So:

interface BaseDB
{
read(int recNo) throws RemoteException
etc throws RemoteException
etc throws RemoteException
}

interface DB extends BaseDB
{
read(int recNo)
etc
etc
}


The question is, would I be violating any MUSTs (or taking it one step further, be auto-failed) if I tag the DB interface as extending another interface?

Thanks /Dave
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will still be auto fail because you have changed the given interface DB, from not extending anything to extending another interface.

I wonder, why you need to throw RemoteException for the data access. It is because it is only focus on data access no matter you are local or remote client. Also, as this is a low level API that access with the "DB", should the client really being able to invoke it directly?

For my implementation, I keep everything unchanged for the DB access interface, while I will provide (create) another interface for the user (GUI) to invoke with the network server, and only the network server (or data server) will invoke the DB interface.

Nick
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic