subject

Now that your tables are designed and created, it's time to start writing the code you will use to interface with them. First, let's start by reviewing the DAO - Data Access Objects - provided in the starter kit to deal with Books. We see that the BookDAO. java file is just an interface, which is implemented by the BookDAOImpl class. In the DAOUtilities class, we have a method that will instantiate and return a new instance of BookDAOImpl for us... but it returns it inside a BookDAO interface reference. Why is that?
Well, recall that an interface is capable of calling its own declared methods against a subclass reference that has those methods defined. You should also recall that just like any polymorphic reference, you can use a single superclass reference for multiple types of subclass objects. In this way, we save ourselves some time and protect our application in the face of future upgrades.
Consider a situation in which the PubHub application is undergoing another update - this time, to add a VIP tagging system. VIP users can have a separate tagging system, but their database interactions are otherwise exactly the same as a standard user. In this case, we might still use the same TagDAO interface to implement with our VipTagDAOImpl class. Then, no change is required in the code which calls the tagging database methods. We can use the same TagDAO interface reference to manipulate both a TagDAOImpl object and and VipTagDAOImpl object.
Your final task this week, is simply to chart out what kind of SQL queries your tagging system might need to run. From there, create a DAO interface which declares the methods that will call those queries. You won't need to implement them yet, that's a task for the next dive.
You will need, at minimum:.
1. A method to add a tag to a book, given the tag name and a reference to a book (either a Book reference variable or just an ISBN-13)
2. A method to remove a tag from a book, given the tag name and a reference to a book (either a Book reference variable or just an ISBN-13)
3. A method to retrieve all tags that have been added to a given book
4. A method to retrieve all books that have a given tag. Hint: This will require either a SQL JOIN statement or a nested query.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
You know the right answer?
Now that your tables are designed and created, it's time to start writing the code you will use to i...
Questions
question
Biology, 06.11.2020 04:10
question
Physics, 06.11.2020 04:10
question
English, 06.11.2020 04:10
question
Mathematics, 06.11.2020 04:10
question
Mathematics, 06.11.2020 04:10
Questions on the website: 13722363