KickJava   Java API By Example, From Geeks To Geeks.

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


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.ContentImage;
21 import com.blandware.atleap.model.core.ResourceData;
22 import com.blandware.atleap.persistence.exception.DeleteException;
23
24 /**
25  * <p>DAO for content image</p>
26  * <p><a HREF="ContentImageDAO.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.4 $ $Date: 2005/07/29 14:12:16 $
30  */

31 public interface ContentImageDAO extends ContentResourceDAO {
32
33     // ~ CRUD Methods ================================================================
34

35     /**
36      * Creates new content image
37      *
38      * @param contentImage Object that represents what image must be created
39      * @param resourceData resource data that holds image data
40      * @return ID of created content image
41      */

42     public Long JavaDoc createContentImage(ContentImage contentImage, ResourceData resourceData);
43
44     /**
45      * Retrieves content image with specified ID
46      *
47      * @param contentImageId ID to search by
48      * @return Content image or null if no content image with specified ID exists in database
49      */

50     public ContentImage retrieveContentImage(Long JavaDoc contentImageId);
51
52     /**
53      * Updates content image
54      *
55      * @param contentImage Image to update
56      * @param resourceData resource data that holds image data
57      */

58     public void updateContentImage(ContentImage contentImage, ResourceData resourceData);
59
60     /**
61      * Deletes content image
62      *
63      * @param contentImage Image to delete
64      * @throws com.blandware.atleap.persistence.exception.DeleteException
65      * if content image cannot be deleted
66      */

67     public void deleteContentImage(ContentImage contentImage) throws DeleteException;
68
69     // ~ Additional methods ================================================================
70

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

77     public PartialCollection listContentImages(QueryInfo queryInfo);
78
79     
80     // ~ Finders ================================================================
81

82     /**
83      * Finds content image by URI
84      *
85      * @param uri URI of image to search by
86      * @return Content image or null if nothing was found
87      */

88     public ContentImage findContentImageByUri(String JavaDoc uri);
89
90
91 }
92
Popular Tags