Java Reference
In-Depth Information
Listing 6-8. DBClient.java
public interface DBClient {
/**
* Adds a DVD to the database or inventory.
*
* @param dvd The DVD item to add to inventory.
* @return Indicates the success/failure of the add operation.
* @throws IOException Indicates there is a problem accessing the database.
*/
public boolean addDVD(DVD dvd) throws IOException;
/**
* Locates a DVD using the UPC identification number.
*
* @param UPC The UPC of the DVD to locate.
* @return The DVD object which matches the UPC.
* @throws IOException if there is a problem accessing the data.
*/
public DVD getDVD(String UPC)throws IOException;
/**
* Changes existing information of a DVD item.
* Modifications can occur on any of the attributes of DVD except UPC.
* The UPC is used to identify the DVD to be modified.
*
* @param dvd The Dvd to modify.
* @return Returns true if the DVD was found and modified.
* @throws IOException Indicates there is a problem accessing the data.
*/
public boolean modifyDVD(DVD dvd) throws IOException;
/**
* Removes DVDs from inventory using the unique UPC.
*
* @param UPC The UPC or key of the DVD to be removed.
* @return Returns true if the UPC was found and the DVD was removed.
* @throws IOException Indicates there is a problem accessing the data.
*/
public boolean removeDVD(String UPC) throws IOException;
/**
* Gets the store's inventory.
* All of the DVDs in the system.
*
* @return A List containing all found DVDs.
Search WWH ::




Custom Search