KickJava   Java API By Example, From Geeks To Geeks.

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


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.ContentPage;
21 import com.blandware.atleap.model.core.Layout;
22 import com.blandware.atleap.persistence.exception.DeleteException;
23
24 /**
25  * <p>DAO for content page (CP)</p>
26  * <p><a HREF="ContentPageDAO.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.9 $ $Date: 2006/03/16 11:09:37 $
30  */

31 public interface ContentPageDAO extends PageDAO {
32
33     // ~ CRUD methods ================================================================
34

35     /**
36      * Creates new content page
37      *
38      * @param contentPage Object that represents what page must be created
39      * @param layout Layout on which new content page is based
40      * @return ID of created content page
41      */

42     public Long JavaDoc createContentPage(ContentPage contentPage, Layout layout);
43
44     /**
45      * Retrieves content page with specified ID
46      *
47      * @param contentPageId ID to search by
48      * @return Content page with specified ID or null if no page with specified ID exists in database
49      */

50     public ContentPage retrieveContentPage(Long JavaDoc contentPageId);
51
52     /**
53      * Updates content page
54      *
55      * @param contentPage Page to update
56      * @param layout Layout on which updated content page is based
57      */

58     public void updateContentPage(ContentPage contentPage, Layout layout);
59
60     /**
61      * Deletes content page
62      *
63      * @param contentPage Page to delete
64      * @throws DeleteException if content page cannot be deleted
65      */

66     public void deleteContentPage(ContentPage contentPage) throws DeleteException;
67
68     // ~ Additional methods ================================================================
69

70     /**
71      * Retrieves filtered/sorted collection of content pages.
72      *
73      * @param queryInfo Object that contains information about how to filter and sort data
74      * @return Collection of content pages
75      */

76     public PartialCollection listContentPages(QueryInfo queryInfo);
77
78     // ~ Finders ================================================================
79

80     /**
81      * Finds content page by URI
82      *
83      * @param contentPageUri URI of content page to search by
84      * @return Content page or null if nothing was found
85      */

86     public ContentPage findContentPageByUri(String JavaDoc contentPageUri);
87
88 }
89
Popular Tags