KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > persistence > core > PageDAO


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.persistence.core;
17
18 import com.blandware.atleap.common.util.PartialCollection;
19 import com.blandware.atleap.common.util.QueryInfo;
20 import com.blandware.atleap.model.core.Page;
21
22 import java.util.Collection JavaDoc;
23
24 /**
25  * <p>DAO for pages. It contains methods common for both content and action pages</p>
26  * <p><a HREF="PageDAO.java.htm"><i>View Source</i></a></p>
27  *
28  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
29  * @version $Revision: 1.12 $ $Date: 2005/08/02 14:53:34 $
30  */

31 public interface PageDAO extends LocalizableDAO {
32
33     // ~ Common methods
34

35     /**
36      * Retrieves page despite its type
37      *
38      * @param pageId ID of page to retrieve
39      * @return Page or null if nothing was found
40      */

41     public Page retrievePage(Long JavaDoc pageId);
42
43     /**
44      * Finds page (no matter action or content) by its URI
45      *
46      * @param uri URI of page to search by
47      * @return Page or null if nothing was found
48      */

49     public Page findPageByUri(String JavaDoc uri);
50
51     /**
52      * Updates page
53      *
54      * @param page page for update
55      */

56     public void updatePage(Page page);
57
58     /**
59      * Returns collection of linkable items, which are not content nor action pages
60      *
61      * @param queryInfo Object with some information for query
62      * @return Collection of linkable items
63      */

64     public PartialCollection listLinkableItems(QueryInfo queryInfo);
65
66     /**
67      * Returns list of all pages fetching their fields and values
68      *
69      * @return list of pages, each of them with fields, each of fields with field values
70      */

71     public Collection listPagesFetching();
72
73     /**
74      * Searches for duplicates. Returns <code>true</code> if there is one or more pages with another ID, but which
75      * have same values from some set (e.g. uri)
76      *
77      * @param page Page to search duplicates for
78      * @return whether given page has duplicates
79      */

80     public boolean hasDuplicates(Page page);
81 }
82
Popular Tags