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.softwarecatalog.service.persistence;
24  
25  /**
26   * <a href="SCProductScreenshotUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SCProductScreenshotUtil {
32      public static void cacheResult(
33          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot) {
34          getPersistence().cacheResult(scProductScreenshot);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> scProductScreenshots) {
39          getPersistence().cacheResult(scProductScreenshots);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot create(
47          long productScreenshotId) {
48          return getPersistence().create(productScreenshotId);
49      }
50  
51      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot remove(
52          long productScreenshotId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
55          return getPersistence().remove(productScreenshotId);
56      }
57  
58      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot remove(
59          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(scProductScreenshot);
62      }
63  
64      /**
65       * @deprecated Use <code>update(SCProductScreenshot scProductScreenshot, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot update(
68          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(scProductScreenshot);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        scProductScreenshot the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when scProductScreenshot is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot update(
87          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(scProductScreenshot, merge);
90      }
91  
92      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot updateImpl(
93          com.liferay.portlet.softwarecatalog.model.SCProductScreenshot scProductScreenshot,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(scProductScreenshot, merge);
96      }
97  
98      public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByPrimaryKey(
99          long productScreenshotId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
102         return getPersistence().findByPrimaryKey(productScreenshotId);
103     }
104 
105     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByPrimaryKey(
106         long productScreenshotId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(productScreenshotId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
111         long productEntryId) throws com.liferay.portal.SystemException {
112         return getPersistence().findByProductEntryId(productEntryId);
113     }
114 
115     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
116         long productEntryId, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByProductEntryId(productEntryId, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
122         long productEntryId, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence()
126                    .findByProductEntryId(productEntryId, start, end, obc);
127     }
128 
129     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByProductEntryId_First(
130         long productEntryId,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException,
133             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
134         return getPersistence().findByProductEntryId_First(productEntryId, obc);
135     }
136 
137     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByProductEntryId_Last(
138         long productEntryId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
142         return getPersistence().findByProductEntryId_Last(productEntryId, obc);
143     }
144 
145     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot[] findByProductEntryId_PrevAndNext(
146         long productScreenshotId, long productEntryId,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
150         return getPersistence()
151                    .findByProductEntryId_PrevAndNext(productScreenshotId,
152             productEntryId, obc);
153     }
154 
155     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByThumbnailId(
156         long thumbnailId)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
159         return getPersistence().findByThumbnailId(thumbnailId);
160     }
161 
162     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByThumbnailId(
163         long thumbnailId) throws com.liferay.portal.SystemException {
164         return getPersistence().fetchByThumbnailId(thumbnailId);
165     }
166 
167     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByThumbnailId(
168         long thumbnailId, boolean retrieveFromCache)
169         throws com.liferay.portal.SystemException {
170         return getPersistence()
171                    .fetchByThumbnailId(thumbnailId, retrieveFromCache);
172     }
173 
174     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByFullImageId(
175         long fullImageId)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
178         return getPersistence().findByFullImageId(fullImageId);
179     }
180 
181     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByFullImageId(
182         long fullImageId) throws com.liferay.portal.SystemException {
183         return getPersistence().fetchByFullImageId(fullImageId);
184     }
185 
186     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByFullImageId(
187         long fullImageId, boolean retrieveFromCache)
188         throws com.liferay.portal.SystemException {
189         return getPersistence()
190                    .fetchByFullImageId(fullImageId, retrieveFromCache);
191     }
192 
193     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot findByP_P(
194         long productEntryId, int priority)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
197         return getPersistence().findByP_P(productEntryId, priority);
198     }
199 
200     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByP_P(
201         long productEntryId, int priority)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().fetchByP_P(productEntryId, priority);
204     }
205 
206     public static com.liferay.portlet.softwarecatalog.model.SCProductScreenshot fetchByP_P(
207         long productEntryId, int priority, boolean retrieveFromCache)
208         throws com.liferay.portal.SystemException {
209         return getPersistence()
210                    .fetchByP_P(productEntryId, priority, retrieveFromCache);
211     }
212 
213     public static java.util.List<Object> findWithDynamicQuery(
214         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
215         throws com.liferay.portal.SystemException {
216         return getPersistence().findWithDynamicQuery(dynamicQuery);
217     }
218 
219     public static java.util.List<Object> findWithDynamicQuery(
220         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
221         int end) throws com.liferay.portal.SystemException {
222         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
223     }
224 
225     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll()
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findAll();
228     }
229 
230     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll(
231         int start, int end) throws com.liferay.portal.SystemException {
232         return getPersistence().findAll(start, end);
233     }
234 
235     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll(
236         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findAll(start, end, obc);
239     }
240 
241     public static void removeByProductEntryId(long productEntryId)
242         throws com.liferay.portal.SystemException {
243         getPersistence().removeByProductEntryId(productEntryId);
244     }
245 
246     public static void removeByThumbnailId(long thumbnailId)
247         throws com.liferay.portal.SystemException,
248             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
249         getPersistence().removeByThumbnailId(thumbnailId);
250     }
251 
252     public static void removeByFullImageId(long fullImageId)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
255         getPersistence().removeByFullImageId(fullImageId);
256     }
257 
258     public static void removeByP_P(long productEntryId, int priority)
259         throws com.liferay.portal.SystemException,
260             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
261         getPersistence().removeByP_P(productEntryId, priority);
262     }
263 
264     public static void removeAll() throws com.liferay.portal.SystemException {
265         getPersistence().removeAll();
266     }
267 
268     public static int countByProductEntryId(long productEntryId)
269         throws com.liferay.portal.SystemException {
270         return getPersistence().countByProductEntryId(productEntryId);
271     }
272 
273     public static int countByThumbnailId(long thumbnailId)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().countByThumbnailId(thumbnailId);
276     }
277 
278     public static int countByFullImageId(long fullImageId)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().countByFullImageId(fullImageId);
281     }
282 
283     public static int countByP_P(long productEntryId, int priority)
284         throws com.liferay.portal.SystemException {
285         return getPersistence().countByP_P(productEntryId, priority);
286     }
287 
288     public static int countAll() throws com.liferay.portal.SystemException {
289         return getPersistence().countAll();
290     }
291 
292     public static SCProductScreenshotPersistence getPersistence() {
293         return _persistence;
294     }
295 
296     public void setPersistence(SCProductScreenshotPersistence persistence) {
297         _persistence = persistence;
298     }
299 
300     private static SCProductScreenshotPersistence _persistence;
301 }