1 package org.bejug.javacareers.feeder.dao;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import org.apache.commons.logging.Log;
7 import org.apache.commons.logging.LogFactory;
8 import org.bejug.javacareers.feeder.dao.hibernate.RssFeedDaoHibernateImplTests;
9 import org.bejug.javacareers.feeder.model.RssFeed;
10 import org.springframework.dao.DataAccessException;
11
12 /***
13 Copyright (C) 2005 The Java Community
14
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free Software
17 Foundation; either version 2 of the License, or (at your option) any later
18 version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
26 Place, Suite 330, Boston, MA 02111-1307 USA.
27 */
28
29 /***
30 * Created by IntelliJ IDEA.
31 * User: jcs
32 * Date: 3-mei-2005
33 * Time: 12:16:18
34 */
35 public class RssFeedDaoMockup implements RssFeedDao {
36
37 private static final Log LOGGER = LogFactory.getLog(RssFeedDaoHibernateImplTests.class);
38
39 private List list;
40
41 /***
42 *
43 */
44 public RssFeedDaoMockup() {
45 LOGGER.info("Using mockup RssFeed");
46 list = new ArrayList();
47 }
48
49 /***
50 * @param feed is the RssFeed
51 * @see org.bejug.javacareers.feeder.dao.RssFeedDao#storeRssFeed(org.bejug.javacareers.feeder.model.RssFeed)
52 * @throws DataAccessException in case of DataAccessException
53 */
54 public void storeRssFeed(RssFeed feed) throws DataAccessException {
55 LOGGER.info("Using mockup addRssFeed");
56 list.add(feed);
57
58 }
59
60 /***
61 * @see org.bejug.javacareers.feeder.dao.RssFeedDao#getRssFeeds()
62 * @return list of mockup RssFeed
63 * @throws DataAccessException in case of error
64 */
65 public List getRssFeeds() throws DataAccessException {
66 LOGGER.info("Using mockup getRRSFeed");
67 return list;
68
69 }
70
71 /***
72 * Convenience method to delete RSS feed by matching all properties
73 *
74 * @param feed The feed to delete
75 */
76
77 public void deleteRssFeed(RssFeed feed) {
78
79 }
80
81 /***
82 * Delete RSS feeds by URL
83 *
84 * @param url String.
85 */
86
87 public void deleteRssFeedByUrl(String url) {
88
89 }
90
91 /***
92 * gets a RssFeed by id.
93 *
94 * @param id the id of the RssFeed
95 * @return the wanted RssFeed
96 */
97 public RssFeed getRssFeed(Integer id) {
98 return null;
99 }
100
101 /***
102 * Delete RSS feeds by URL
103 *
104 * @param id ID of feed to delete
105 */
106 public void deleteRssFeed(Integer id) {
107
108 }
109 }