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, 21.06.2019 22:40
Write an assembly program with the following specifications.a). in the main block, you should have two registers r4 and r5. they should be checked in an infinite loop. if r4 is greater than r5, then the greater subroutine will be called. if r4 is less than r5, then the less subroutine will be called. if r4 equals r5, then no operations will be done
Answers: 1
question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their check-ins to publish a trip? a. whrrl b. buzzd c. foursquare (this option is wrong i already tried) d. gowalla for plato
Answers: 2
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
Mathematics, 26.08.2021 21:00
question
Mathematics, 26.08.2021 21:00
question
History, 26.08.2021 21:00
question
Health, 26.08.2021 21:00
question
Business, 26.08.2021 21:00
Questions on the website: 13722360