KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > blog > persist > EntryFactory


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenChronicle
5  *
6  * $Id: EntryFactory.java,v 1.4 2007/01/07 06:04:30 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.blog.persist;
23
24 import java.util.List JavaDoc;
25
26 import org.opensubsystems.blog.data.Entry;
27 import org.opensubsystems.core.error.OSSException;
28 import org.opensubsystems.core.persist.ModifiableDataFactory;
29
30 /**
31  * This interface defines methods to create, retrieve and manipulate entries
32  * in the persistance store.
33  *
34  * @version $Id: EntryFactory.java,v 1.4 2007/01/07 06:04:30 bastafidli Exp $
35  * @author Miro Halas
36  * @code.reviewer Miro Halas
37  * @code.reviewed Initial revision
38  */

39 public interface EntryFactory extends ModifiableDataFactory
40 {
41    /**
42     * Get all entries from blog
43     *
44     * @param iBlogId - ID of the blog to get entry from
45     * @return List - list of entries sorted from the most recent to the oldest
46     * one or null if none exists
47     * @throws OSSException - an error has occured
48     */

49    List JavaDoc getAll(
50       int iBlogId
51    ) throws OSSException;
52
53    /**
54     * Get last added entry added to the specified blog
55     *
56     * @param iBlogId - id of the blog to get entry from
57     * @return Entry - last added entry or null if no entry couldn't be found
58     * @throws OSSException - an error has occured
59     */

60    Entry getLast(
61       int iBlogId
62    ) throws OSSException;
63 }
64
Popular Tags