1   /**
2    * Copyright (c) 2000-2009 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  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  import com.liferay.portal.service.persistence.BasePersistence;
30  
31  /**
32   * <a href="IGImagePersistence.java.html"><b><i>View Source</i></b></a>
33   *
34   * @author Brian Wing Shun Chan
35   *
36   */
37  @Transactional(rollbackFor =  {
38      PortalException.class, SystemException.class})
39  public interface IGImagePersistence extends BasePersistence {
40      public com.liferay.portlet.imagegallery.model.IGImage create(long imageId);
41  
42      public com.liferay.portlet.imagegallery.model.IGImage remove(long imageId)
43          throws com.liferay.portal.SystemException,
44              com.liferay.portlet.imagegallery.NoSuchImageException;
45  
46      public com.liferay.portlet.imagegallery.model.IGImage remove(
47          com.liferay.portlet.imagegallery.model.IGImage igImage)
48          throws com.liferay.portal.SystemException;
49  
50      /**
51       * @deprecated Use <code>update(IGImage igImage, boolean merge)</code>.
52       */
53      public com.liferay.portlet.imagegallery.model.IGImage update(
54          com.liferay.portlet.imagegallery.model.IGImage igImage)
55          throws com.liferay.portal.SystemException;
56  
57      /**
58       * Add, update, or merge, the entity. This method also calls the model
59       * listeners to trigger the proper events associated with adding, deleting,
60       * or updating an entity.
61       *
62       * @param        igImage the entity to add, update, or merge
63       * @param        merge boolean value for whether to merge the entity. The
64       *                default value is false. Setting merge to true is more
65       *                expensive and should only be true when igImage is
66       *                transient. See LEP-5473 for a detailed discussion of this
67       *                method.
68       * @return        true if the portlet can be displayed via Ajax
69       */
70      public com.liferay.portlet.imagegallery.model.IGImage update(
71          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
72          throws com.liferay.portal.SystemException;
73  
74      public com.liferay.portlet.imagegallery.model.IGImage updateImpl(
75          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
76          throws com.liferay.portal.SystemException;
77  
78      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
79      public com.liferay.portlet.imagegallery.model.IGImage findByPrimaryKey(
80          long imageId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.imagegallery.NoSuchImageException;
83  
84      public com.liferay.portlet.imagegallery.model.IGImage fetchByPrimaryKey(
85          long imageId) throws com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
89          java.lang.String uuid) throws com.liferay.portal.SystemException;
90  
91      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
92      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
93          java.lang.String uuid, int start, int end)
94          throws com.liferay.portal.SystemException;
95  
96      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
97      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByUuid(
98          java.lang.String uuid, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
102     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103     public com.liferay.portlet.imagegallery.model.IGImage findByUuid_First(
104         java.lang.String uuid,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.imagegallery.NoSuchImageException;
108 
109     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110     public com.liferay.portlet.imagegallery.model.IGImage findByUuid_Last(
111         java.lang.String uuid,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.imagegallery.NoSuchImageException;
115 
116     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117     public com.liferay.portlet.imagegallery.model.IGImage[] findByUuid_PrevAndNext(
118         long imageId, java.lang.String uuid,
119         com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.imagegallery.NoSuchImageException;
122 
123     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
125         long folderId) throws com.liferay.portal.SystemException;
126 
127     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
129         long folderId, int start, int end)
130         throws com.liferay.portal.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByFolderId(
134         long folderId, int start, int end,
135         com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public com.liferay.portlet.imagegallery.model.IGImage findByFolderId_First(
140         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException,
142             com.liferay.portlet.imagegallery.NoSuchImageException;
143 
144     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145     public com.liferay.portlet.imagegallery.model.IGImage findByFolderId_Last(
146         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.imagegallery.NoSuchImageException;
149 
150     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
151     public com.liferay.portlet.imagegallery.model.IGImage[] findByFolderId_PrevAndNext(
152         long imageId, long folderId,
153         com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.imagegallery.NoSuchImageException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public com.liferay.portlet.imagegallery.model.IGImage findBySmallImageId(
159         long smallImageId)
160         throws com.liferay.portal.SystemException,
161             com.liferay.portlet.imagegallery.NoSuchImageException;
162 
163     public com.liferay.portlet.imagegallery.model.IGImage fetchBySmallImageId(
164         long smallImageId) throws com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public com.liferay.portlet.imagegallery.model.IGImage findByLargeImageId(
168         long largeImageId)
169         throws com.liferay.portal.SystemException,
170             com.liferay.portlet.imagegallery.NoSuchImageException;
171 
172     public com.liferay.portlet.imagegallery.model.IGImage fetchByLargeImageId(
173         long largeImageId) throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public com.liferay.portlet.imagegallery.model.IGImage findByCustom1ImageId(
177         long custom1ImageId)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.imagegallery.NoSuchImageException;
180 
181     public com.liferay.portlet.imagegallery.model.IGImage fetchByCustom1ImageId(
182         long custom1ImageId) throws com.liferay.portal.SystemException;
183 
184     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185     public com.liferay.portlet.imagegallery.model.IGImage findByCustom2ImageId(
186         long custom2ImageId)
187         throws com.liferay.portal.SystemException,
188             com.liferay.portlet.imagegallery.NoSuchImageException;
189 
190     public com.liferay.portlet.imagegallery.model.IGImage fetchByCustom2ImageId(
191         long custom2ImageId) throws com.liferay.portal.SystemException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
195         long folderId, java.lang.String name)
196         throws com.liferay.portal.SystemException;
197 
198     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
200         long folderId, java.lang.String name, int start, int end)
201         throws com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findByF_N(
205         long folderId, java.lang.String name, int start, int end,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public com.liferay.portlet.imagegallery.model.IGImage findByF_N_First(
211         long folderId, java.lang.String name,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.imagegallery.NoSuchImageException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public com.liferay.portlet.imagegallery.model.IGImage findByF_N_Last(
218         long folderId, java.lang.String name,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.imagegallery.NoSuchImageException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public com.liferay.portlet.imagegallery.model.IGImage[] findByF_N_PrevAndNext(
225         long imageId, long folderId, java.lang.String name,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.imagegallery.NoSuchImageException;
229 
230     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231     public java.util.List<Object> findWithDynamicQuery(
232         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
233         throws com.liferay.portal.SystemException;
234 
235     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236     public java.util.List<Object> findWithDynamicQuery(
237         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
238         int end) throws com.liferay.portal.SystemException;
239 
240     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll()
242         throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
246         int start, int end) throws com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> findAll(
250         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
251         throws com.liferay.portal.SystemException;
252 
253     public void removeByUuid(java.lang.String uuid)
254         throws com.liferay.portal.SystemException;
255 
256     public void removeByFolderId(long folderId)
257         throws com.liferay.portal.SystemException;
258 
259     public void removeBySmallImageId(long smallImageId)
260         throws com.liferay.portal.SystemException,
261             com.liferay.portlet.imagegallery.NoSuchImageException;
262 
263     public void removeByLargeImageId(long largeImageId)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.imagegallery.NoSuchImageException;
266 
267     public void removeByCustom1ImageId(long custom1ImageId)
268         throws com.liferay.portal.SystemException,
269             com.liferay.portlet.imagegallery.NoSuchImageException;
270 
271     public void removeByCustom2ImageId(long custom2ImageId)
272         throws com.liferay.portal.SystemException,
273             com.liferay.portlet.imagegallery.NoSuchImageException;
274 
275     public void removeByF_N(long folderId, java.lang.String name)
276         throws com.liferay.portal.SystemException;
277 
278     public void removeAll() throws com.liferay.portal.SystemException;
279 
280     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281     public int countByUuid(java.lang.String uuid)
282         throws com.liferay.portal.SystemException;
283 
284     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285     public int countByFolderId(long folderId)
286         throws com.liferay.portal.SystemException;
287 
288     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289     public int countBySmallImageId(long smallImageId)
290         throws com.liferay.portal.SystemException;
291 
292     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293     public int countByLargeImageId(long largeImageId)
294         throws com.liferay.portal.SystemException;
295 
296     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297     public int countByCustom1ImageId(long custom1ImageId)
298         throws com.liferay.portal.SystemException;
299 
300     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301     public int countByCustom2ImageId(long custom2ImageId)
302         throws com.liferay.portal.SystemException;
303 
304     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305     public int countByF_N(long folderId, java.lang.String name)
306         throws com.liferay.portal.SystemException;
307 
308     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309     public int countAll() throws com.liferay.portal.SystemException;
310 }