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

Should I declare and implement delete and create methods in an Adpter Interface?

 
Eugenio Flores
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My assignment states:

- I must allow the user search data for all records, or for records where the name and/or location fields exactly match values specified by the user.
-It must present search result in a Jtable
-It must allow the user to book a selected record, updating the database accordingly.

I have already implemented the Database Interface, but now I want to create an Adapter whose methods will be exposed in the service interface .
So I wonder, if I need to declare the delete and create methods from the Database Interface in my Adapter Interface, because the clients won't need them, as you can read above.

Any advice?

Thanks in advance again.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My business service interface had just 2 methods: find and book. Nothing more, nothing less
 
Eugenio Flores
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Roel. Thanks.
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
+1 to what Roel said.
I exposed only business methods to the client and (basing on specification) these are booking and searching.

Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic