Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

DB Interface and implementation.

Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Your data access class must be called "", must be in a package called "suncertify.db", and must implement the following interface:

package suncertify.db;
public interface DB
{.... }

Since the DB interface here contains lock and unlock mechanism, I created a wrapper class around my class which locks, performs the operation and unlocks the object. Since the connection could be local or remote, my client would require to deal with an interface. My question now is, is it mandatory to use this given interface "" for clients use or can I create another interface which my wrapper class would implement and this interface would actually be passed to client for all its operations.

I dont want client to be handling lock and unlock processes and all the client should be bothered of is operations on the database. Can my approach fail automatic test because I'll be using another interface apart from DB for the client to access data ?

Please let me know your views.

Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I guess you can use your own interface, since the spec only requires your class to implement it, not you to use it.
Probably they will use it to run your data layer on a automated evaluation.
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic