Java Reference
In-Depth Information
*
* @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 DVD's.
* @throws IOException Indicates there is a problem accessing the data.
*/
public List<DVD> getDVDs() throws IOException;
/**
* A properly formatted <code>String</code> expressions returns all
* matching DVD items. The <code>String</code> must be formatted as a
* regular expression.
*
* @param query The formatted regular expression used as the search
* criteria.
* @return The list of DVDs that match the query. Can be an empty
* Collection.
* @throws IOException Indicates there is a problem accessing the data.
* @throws PatternSyntaxException Indicates there is a syntax problem in
* the regular expression.
*/
public Collection<DVD> findDVD(String query)
throws IOException, PatternSyntaxException;
/**
* Lock the requested DVD. This method blocks until the lock succeeds,
* or for a maximum of 5 seconds, whichever comes first.
*
* @param UPC The UPC of the DVD to reserve
Search WWH ::




Custom Search