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