Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Methods add and delete

 
Daniela Ch
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
what should I do in the methods add and delete of the data class?
Since they are included in my data interface, should I make them throw DatabaseException("method not supported")?
I know that I dont use them in this application, but if they want to reuse the database, I have to make sure no body calls them...
what is the best approach?
daniela
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Since they are included in my data interface, should I make them throw DatabaseException("method not supported")?

These methods are supported (they have a complete and functional implementations), they are just not used. Let them exist (for future use)!
Eugene.
 
Daniela Ch
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but eugene they are not completed...
in the comments of the add, the intern said that
first field, the key, must be unique in the database or his is going to throw runtime exception (i know that he should not) but he dont do this check in the method...
do i have to complete it?
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

first field, the key, must be unique in the database or his is going to throw runtime exception (i know that he should not) but he dont do this check in the method...

Yes, there is such a check (at least in my version of Data.java):

Again, all the methods of Data (except for possibly lock/unlock) are functional and complete. So leave them alone.
Eugene.
[ January 03, 2003: Message edited by: Eugene Kononov ]
 
Daniela Ch
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hehehe ok fine!!! I will leave them alone
 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daniela,
It's time for you to submit. I think you are way too done with your project :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic