@@ -0,0 +1,948 @@
+package google.finder;%0A%0Aimport java.util.List;%0A%0Aimport google.dao.DaoException;%0Aimport google.model.Result;%0A%0Apublic interface FinderService %7B%0A%0A%09/**%0A%09 * This method checks if a result corresponding to the given query is stored in%0A%09 * the database. If so it is added to cache, if not a request to www.google.pl%0A%09 * is sent, then the result is saved in the database and added to cache.%0A%09 * %0A%09 * @param query%0A%09 *            A query to be processed.%0A%09 * %0A%09 * @throws DaoException%0A%09 *             if a problem with database occurred.%0A%09 * @throws FinderException%0A%09 *             if a problem with Internet connection occurred.%0A%09 */%0A%09void findAndSave(String query);%0A%0A%09/**%0A%09 * This method returns all cached results - the ones from database as well as%0A%09 * ones that were just got from the network. The returned list is sorted%0A%09 * descending with respect to popularity.%0A%09 * %0A%09 * @return A list of all received results.%0A%09 */%0A%09List%3CResult%3E getAllResults();%0A%0A%7D%0A

Add finder service.