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.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 begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByProductEntryId(productEntryId, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findByProductEntryId(
108         long productEntryId, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence()
112                    .findByProductEntryId(productEntryId, begin, 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<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findWithDynamicQuery(
179         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findWithDynamicQuery(queryInitializer);
182     }
183 
184     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findWithDynamicQuery(
185         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
186         int begin, int end) throws com.liferay.portal.SystemException {
187         return getPersistence()
188                    .findWithDynamicQuery(queryInitializer, begin, end);
189     }
190 
191     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll()
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findAll();
194     }
195 
196     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll(
197         int begin, int end) throws com.liferay.portal.SystemException {
198         return getPersistence().findAll(begin, end);
199     }
200 
201     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductScreenshot> findAll(
202         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findAll(begin, end, obc);
205     }
206 
207     public static void removeByProductEntryId(long productEntryId)
208         throws com.liferay.portal.SystemException {
209         getPersistence().removeByProductEntryId(productEntryId);
210     }
211 
212     public static void removeByThumbnailId(long thumbnailId)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
215         getPersistence().removeByThumbnailId(thumbnailId);
216     }
217 
218     public static void removeByFullImageId(long fullImageId)
219         throws com.liferay.portal.SystemException,
220             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
221         getPersistence().removeByFullImageId(fullImageId);
222     }
223 
224     public static void removeByP_P(long productEntryId, int priority)
225         throws com.liferay.portal.SystemException,
226             com.liferay.portlet.softwarecatalog.NoSuchProductScreenshotException {
227         getPersistence().removeByP_P(productEntryId, priority);
228     }
229 
230     public static void removeAll() throws com.liferay.portal.SystemException {
231         getPersistence().removeAll();
232     }
233 
234     public static int countByProductEntryId(long productEntryId)
235         throws com.liferay.portal.SystemException {
236         return getPersistence().countByProductEntryId(productEntryId);
237     }
238 
239     public static int countByThumbnailId(long thumbnailId)
240         throws com.liferay.portal.SystemException {
241         return getPersistence().countByThumbnailId(thumbnailId);
242     }
243 
244     public static int countByFullImageId(long fullImageId)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().countByFullImageId(fullImageId);
247     }
248 
249     public static int countByP_P(long productEntryId, int priority)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().countByP_P(productEntryId, priority);
252     }
253 
254     public static int countAll() throws com.liferay.portal.SystemException {
255         return getPersistence().countAll();
256     }
257 
258     public static SCProductScreenshotPersistence getPersistence() {
259         return _getUtil()._persistence;
260     }
261 
262     public void setPersistence(SCProductScreenshotPersistence persistence) {
263         _persistence = persistence;
264     }
265 
266     private static SCProductScreenshotUtil _getUtil() {
267         if (_util == null) {
268             _util = (SCProductScreenshotUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
269         }
270 
271         return _util;
272     }
273 
274     private static final String _UTIL = SCProductScreenshotUtil.class.getName();
275     private static SCProductScreenshotUtil _util;
276     private SCProductScreenshotPersistence _persistence;
277 }