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="SCProductVersionUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SCProductVersionUtil {
32      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion create(
33          long productVersionId) {
34          return getPersistence().create(productVersionId);
35      }
36  
37      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
38          long productVersionId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
41          return getPersistence().remove(productVersionId);
42      }
43  
44      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion remove(
45          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(scProductVersion);
48      }
49  
50      /**
51       * @deprecated Use <code>update(SCProductVersion scProductVersion, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion update(
54          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(scProductVersion);
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        scProductVersion 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 scProductVersion 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.SCProductVersion update(
73          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(scProductVersion, merge);
76      }
77  
78      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateImpl(
79          com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(scProductVersion, merge);
82      }
83  
84      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByPrimaryKey(
85          long productVersionId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
88          return getPersistence().findByPrimaryKey(productVersionId);
89      }
90  
91      public static com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByPrimaryKey(
92          long productVersionId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(productVersionId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> 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.SCProductVersion> 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.SCProductVersion> 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.SCProductVersion findByProductEntryId_First(
116         long productEntryId,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException,
119             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
120         return getPersistence().findByProductEntryId_First(productEntryId, obc);
121     }
122 
123     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByProductEntryId_Last(
124         long productEntryId,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
128         return getPersistence().findByProductEntryId_Last(productEntryId, obc);
129     }
130 
131     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion[] findByProductEntryId_PrevAndNext(
132         long productVersionId, long productEntryId,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
136         return getPersistence()
137                    .findByProductEntryId_PrevAndNext(productVersionId,
138             productEntryId, obc);
139     }
140 
141     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion findByDirectDownloadURL(
142         java.lang.String directDownloadURL)
143         throws com.liferay.portal.SystemException,
144             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
145         return getPersistence().findByDirectDownloadURL(directDownloadURL);
146     }
147 
148     public static com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchByDirectDownloadURL(
149         java.lang.String directDownloadURL)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().fetchByDirectDownloadURL(directDownloadURL);
152     }
153 
154     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findWithDynamicQuery(
155         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().findWithDynamicQuery(queryInitializer);
158     }
159 
160     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findWithDynamicQuery(
161         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
162         int begin, int end) throws com.liferay.portal.SystemException {
163         return getPersistence()
164                    .findWithDynamicQuery(queryInitializer, begin, end);
165     }
166 
167     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll()
168         throws com.liferay.portal.SystemException {
169         return getPersistence().findAll();
170     }
171 
172     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
173         int begin, int end) throws com.liferay.portal.SystemException {
174         return getPersistence().findAll(begin, end);
175     }
176 
177     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> findAll(
178         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().findAll(begin, end, obc);
181     }
182 
183     public static void removeByProductEntryId(long productEntryId)
184         throws com.liferay.portal.SystemException {
185         getPersistence().removeByProductEntryId(productEntryId);
186     }
187 
188     public static void removeByDirectDownloadURL(
189         java.lang.String directDownloadURL)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
192         getPersistence().removeByDirectDownloadURL(directDownloadURL);
193     }
194 
195     public static void removeAll() throws com.liferay.portal.SystemException {
196         getPersistence().removeAll();
197     }
198 
199     public static int countByProductEntryId(long productEntryId)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().countByProductEntryId(productEntryId);
202     }
203 
204     public static int countByDirectDownloadURL(
205         java.lang.String directDownloadURL)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().countByDirectDownloadURL(directDownloadURL);
208     }
209 
210     public static int countAll() throws com.liferay.portal.SystemException {
211         return getPersistence().countAll();
212     }
213 
214     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
215         long pk)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
218         return getPersistence().getSCFrameworkVersions(pk);
219     }
220 
221     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
222         long pk, int begin, int end)
223         throws com.liferay.portal.SystemException,
224             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
225         return getPersistence().getSCFrameworkVersions(pk, begin, end);
226     }
227 
228     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> getSCFrameworkVersions(
229         long pk, int begin, int end,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
233         return getPersistence().getSCFrameworkVersions(pk, begin, end, obc);
234     }
235 
236     public static int getSCFrameworkVersionsSize(long pk)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().getSCFrameworkVersionsSize(pk);
239     }
240 
241     public static boolean containsSCFrameworkVersion(long pk,
242         long scFrameworkVersionPK) throws com.liferay.portal.SystemException {
243         return getPersistence()
244                    .containsSCFrameworkVersion(pk, scFrameworkVersionPK);
245     }
246 
247     public static boolean containsSCFrameworkVersions(long pk)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().containsSCFrameworkVersions(pk);
250     }
251 
252     public static void addSCFrameworkVersion(long pk, long scFrameworkVersionPK)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
255             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
256         getPersistence().addSCFrameworkVersion(pk, scFrameworkVersionPK);
257     }
258 
259     public static void addSCFrameworkVersion(long pk,
260         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
261         throws com.liferay.portal.SystemException,
262             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
263             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
264         getPersistence().addSCFrameworkVersion(pk, scFrameworkVersion);
265     }
266 
267     public static void addSCFrameworkVersions(long pk,
268         long[] scFrameworkVersionPKs)
269         throws com.liferay.portal.SystemException,
270             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
271             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
272         getPersistence().addSCFrameworkVersions(pk, scFrameworkVersionPKs);
273     }
274 
275     public static void addSCFrameworkVersions(long pk,
276         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
277         throws com.liferay.portal.SystemException,
278             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
279             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
280         getPersistence().addSCFrameworkVersions(pk, scFrameworkVersions);
281     }
282 
283     public static void clearSCFrameworkVersions(long pk)
284         throws com.liferay.portal.SystemException,
285             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException {
286         getPersistence().clearSCFrameworkVersions(pk);
287     }
288 
289     public static void removeSCFrameworkVersion(long pk,
290         long scFrameworkVersionPK)
291         throws com.liferay.portal.SystemException,
292             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
293             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
294         getPersistence().removeSCFrameworkVersion(pk, scFrameworkVersionPK);
295     }
296 
297     public static void removeSCFrameworkVersion(long pk,
298         com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
299         throws com.liferay.portal.SystemException,
300             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
301             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
302         getPersistence().removeSCFrameworkVersion(pk, scFrameworkVersion);
303     }
304 
305     public static void removeSCFrameworkVersions(long pk,
306         long[] scFrameworkVersionPKs)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
309             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
310         getPersistence().removeSCFrameworkVersions(pk, scFrameworkVersionPKs);
311     }
312 
313     public static void removeSCFrameworkVersions(long pk,
314         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
315         throws com.liferay.portal.SystemException,
316             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
317             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
318         getPersistence().removeSCFrameworkVersions(pk, scFrameworkVersions);
319     }
320 
321     public static void setSCFrameworkVersions(long pk,
322         long[] scFrameworkVersionPKs)
323         throws com.liferay.portal.SystemException,
324             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
325             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
326         getPersistence().setSCFrameworkVersions(pk, scFrameworkVersionPKs);
327     }
328 
329     public static void setSCFrameworkVersions(long pk,
330         java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> scFrameworkVersions)
331         throws com.liferay.portal.SystemException,
332             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
333             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
334         getPersistence().setSCFrameworkVersions(pk, scFrameworkVersions);
335     }
336 
337     public static SCProductVersionPersistence getPersistence() {
338         return _getUtil()._persistence;
339     }
340 
341     public void setPersistence(SCProductVersionPersistence persistence) {
342         _persistence = persistence;
343     }
344 
345     private static SCProductVersionUtil _getUtil() {
346         if (_util == null) {
347             _util = (SCProductVersionUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
348         }
349 
350         return _util;
351     }
352 
353     private static final String _UTIL = SCProductVersionUtil.class.getName();
354     private static SCProductVersionUtil _util;
355     private SCProductVersionPersistence _persistence;
356 }