KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > patterns > listdata > persist > ListFactory


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: ListFactory.java,v 1.4 2007/01/07 06:14:09 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.patterns.listdata.persist;
23
24 import java.util.List JavaDoc;
25
26 import org.opensubsystems.core.error.OSSException;
27 import org.opensubsystems.core.persist.DataFactory;
28 import org.opensubsystems.patterns.listdata.data.ListDefinition;
29 import org.opensubsystems.patterns.listdata.data.ListOptions;
30
31 /**
32  * This interface should be implemented by all data object factories, which
33  * support browsing through list of data object page by page.
34  *
35  * @version $Id: ListFactory.java,v 1.4 2007/01/07 06:14:09 bastafidli Exp $
36  * @author Julo Legeny
37  * @code.reviewer Miro Halas
38  * @code.reviewed 1.2 2004/12/18 06:18:28 bastafidli
39  */

40 public interface ListFactory extends DataFactory
41 {
42    /**
43     * Get the default list definition, which will be used to retrieve the initial
44     * list of data objects
45     *
46     * @return ListDefinition - list definition describing what list of data objects
47     * to retrieve by default.
48     */

49    ListDefinition getDefaultListDefinition(
50    );
51    
52    /**
53     * Get list of data objects specified by the list options.
54     *
55     * @param options - options specifying what data to retrieve
56     * @return List - list of selected items specified by the list option
57     * @throws OSSException - error during select
58     */

59    List JavaDoc get(
60       ListOptions options
61    ) throws OSSException;
62 }
63
Popular Tags