1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.imagegallery.service.persistence;
24  
25  /**
26   * <a href="IGImagePersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface IGImagePersistence {
32      public com.liferay.portlet.imagegallery.model.IGImage create(long imageId);
33  
34      public com.liferay.portlet.imagegallery.model.IGImage remove(long imageId)
35          throws com.liferay.portal.SystemException,
36              com.liferay.portlet.imagegallery.NoSuchImageException;
37  
38      public com.liferay.portlet.imagegallery.model.IGImage remove(
39          com.liferay.portlet.imagegallery.model.IGImage igImage)
40          throws com.liferay.portal.SystemException;
41  
42      /**
43       * @deprecated Use <code>update(IGImage igImage, boolean merge)</code>.
44       */
45      public com.liferay.portlet.imagegallery.model.IGImage update(
46          com.liferay.portlet.imagegallery.model.IGImage igImage)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * Add, update, or merge, the entity. This method also calls the model
51       * listeners to trigger the proper events associated with adding, deleting,
52       * or updating an entity.
53       *
54       * @param        igImage the entity to add, update, or merge
55       * @param        merge boolean value for whether to merge the entity. The
56       *                default value is false. Setting merge to true is more
57       *                expensive and should only be true when igImage is
58       *                transient. See LEP-5473 for a detailed discussion of this
59       *                method.
60       * @return        true if the portlet can be displayed via Ajax
61       */
62      public com.liferay.portlet.imagegallery.model.IGImage update(
63          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
64          throws com.liferay.portal.SystemException;
65  
66      public com.liferay.portlet.imagegallery.model.IGImage updateImpl(
67          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
68          throws com.liferay.portal.SystemException;
69  
70      public com.liferay.portlet.imagegallery.model.IGImage findByPrimaryKey(
71          long imageId)
72          throws com.liferay.portal.SystemException,
73              com.liferay.portlet.imagegallery.NoSuchImageException;
74  
75      public com.liferay.portlet.imagegallery.model.IGImage fetchByPrimaryKey(
76          long imageId) throws com.liferay.portal.SystemException;
77  
78      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
79          java.lang.String uuid) throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
82          java.lang.String uuid, int start, int end)
83          throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
86          java.lang.String uuid, int start, int end,
87          com.liferay.portal.kernel.util.OrderByComparator obc)
88          throws com.liferay.portal.SystemException;
89  
90      public com.liferay.portlet.imagegallery.model.IGImage findByUuid_First(
91          java.lang.String uuid,
92          com.liferay.portal.kernel.util.OrderByComparator obc)
93          throws com.liferay.portal.SystemException,
94              com.liferay.portlet.imagegallery.NoSuchImageException;
95  
96      public com.liferay.portlet.imagegallery.model.IGImage findByUuid_Last(
97          java.lang.String uuid,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException,
100             com.liferay.portlet.imagegallery.NoSuchImageException;
101 
102     public com.liferay.portlet.imagegallery.model.IGImage[] findByUuid_PrevAndNext(
103         long imageId, java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.imagegallery.NoSuchImageException;
107 
108     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
109         long folderId) throws com.liferay.portal.SystemException;
110 
111     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
112         long folderId, int start, int end)
113         throws com.liferay.portal.SystemException;
114 
115     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
116         long folderId, int start, int end,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException;
119 
120     public com.liferay.portlet.imagegallery.model.IGImage findByFolderId_First(
121         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.imagegallery.NoSuchImageException;
124 
125     public com.liferay.portlet.imagegallery.model.IGImage findByFolderId_Last(
126         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.imagegallery.NoSuchImageException;
129 
130     public com.liferay.portlet.imagegallery.model.IGImage[] findByFolderId_PrevAndNext(
131         long imageId, long folderId,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.imagegallery.NoSuchImageException;
135 
136     public com.liferay.portlet.imagegallery.model.IGImage findBySmallImageId(
137         long smallImageId)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.imagegallery.NoSuchImageException;
140 
141     public com.liferay.portlet.imagegallery.model.IGImage fetchBySmallImageId(
142         long smallImageId) throws com.liferay.portal.SystemException;
143 
144     public com.liferay.portlet.imagegallery.model.IGImage findByLargeImageId(
145         long largeImageId)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.imagegallery.NoSuchImageException;
148 
149     public com.liferay.portlet.imagegallery.model.IGImage fetchByLargeImageId(
150         long largeImageId) throws com.liferay.portal.SystemException;
151 
152     public com.liferay.portlet.imagegallery.model.IGImage findByCustom1ImageId(
153         long custom1ImageId)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.imagegallery.NoSuchImageException;
156 
157     public com.liferay.portlet.imagegallery.model.IGImage fetchByCustom1ImageId(
158         long custom1ImageId) throws com.liferay.portal.SystemException;
159 
160     public com.liferay.portlet.imagegallery.model.IGImage findByCustom2ImageId(
161         long custom2ImageId)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.imagegallery.NoSuchImageException;
164 
165     public com.liferay.portlet.imagegallery.model.IGImage fetchByCustom2ImageId(
166         long custom2ImageId) throws com.liferay.portal.SystemException;
167 
168     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
169         long folderId, java.lang.String name)
170         throws com.liferay.portal.SystemException;
171 
172     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
173         long folderId, java.lang.String name, int start, int end)
174         throws com.liferay.portal.SystemException;
175 
176     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
177         long folderId, java.lang.String name, int start, int end,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException;
180 
181     public com.liferay.portlet.imagegallery.model.IGImage findByF_N_First(
182         long folderId, java.lang.String name,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.imagegallery.NoSuchImageException;
186 
187     public com.liferay.portlet.imagegallery.model.IGImage findByF_N_Last(
188         long folderId, java.lang.String name,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.imagegallery.NoSuchImageException;
192 
193     public com.liferay.portlet.imagegallery.model.IGImage[] findByF_N_PrevAndNext(
194         long imageId, long folderId, java.lang.String name,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException,
197             com.liferay.portlet.imagegallery.NoSuchImageException;
198 
199     public java.util.List<Object> findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
201         throws com.liferay.portal.SystemException;
202 
203     public java.util.List<Object> findWithDynamicQuery(
204         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
205         int end) throws com.liferay.portal.SystemException;
206 
207     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll()
208         throws com.liferay.portal.SystemException;
209 
210     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
211         int start, int end) throws com.liferay.portal.SystemException;
212 
213     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
214         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.SystemException;
216 
217     public void removeByUuid(java.lang.String uuid)
218         throws com.liferay.portal.SystemException;
219 
220     public void removeByFolderId(long folderId)
221         throws com.liferay.portal.SystemException;
222 
223     public void removeBySmallImageId(long smallImageId)
224         throws com.liferay.portal.SystemException,
225             com.liferay.portlet.imagegallery.NoSuchImageException;
226 
227     public void removeByLargeImageId(long largeImageId)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.imagegallery.NoSuchImageException;
230 
231     public void removeByCustom1ImageId(long custom1ImageId)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.imagegallery.NoSuchImageException;
234 
235     public void removeByCustom2ImageId(long custom2ImageId)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.imagegallery.NoSuchImageException;
238 
239     public void removeByF_N(long folderId, java.lang.String name)
240         throws com.liferay.portal.SystemException;
241 
242     public void removeAll() throws com.liferay.portal.SystemException;
243 
244     public int countByUuid(java.lang.String uuid)
245         throws com.liferay.portal.SystemException;
246 
247     public int countByFolderId(long folderId)
248         throws com.liferay.portal.SystemException;
249 
250     public int countBySmallImageId(long smallImageId)
251         throws com.liferay.portal.SystemException;
252 
253     public int countByLargeImageId(long largeImageId)
254         throws com.liferay.portal.SystemException;
255 
256     public int countByCustom1ImageId(long custom1ImageId)
257         throws com.liferay.portal.SystemException;
258 
259     public int countByCustom2ImageId(long custom2ImageId)
260         throws com.liferay.portal.SystemException;
261 
262     public int countByF_N(long folderId, java.lang.String name)
263         throws com.liferay.portal.SystemException;
264 
265     public int countAll() throws com.liferay.portal.SystemException;
266 
267     public void registerListener(
268         com.liferay.portal.model.ModelListener listener);
269 
270     public void unregisterListener(
271         com.liferay.portal.model.ModelListener listener);
272 }