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="SCFrameworkVersionUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SCFrameworkVersionUtil {
32      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion create(
33          long frameworkVersionId) {
34          return getPersistence().create(frameworkVersionId);
35      }
36  
37      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion remove(
38          long frameworkVersionId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
41          return getPersistence().remove(frameworkVersionId);
42      }
43  
44      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion remove(
45          com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(scFrameworkVersion);
48      }
49  
50      /**
51       * @deprecated Use <code>update(SCFrameworkVersion scFrameworkVersion, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion update(
54          com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(scFrameworkVersion);
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        scFrameworkVersion 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 scFrameworkVersion 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.SCFrameworkVersion update(
73          com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(scFrameworkVersion, merge);
76      }
77  
78      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion updateImpl(
79          com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion scFrameworkVersion,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(scFrameworkVersion, merge);
82      }
83  
84      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByPrimaryKey(
85          long frameworkVersionId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
88          return getPersistence().findByPrimaryKey(frameworkVersionId);
89      }
90  
91      public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion fetchByPrimaryKey(
92          long frameworkVersionId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(frameworkVersionId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByGroupId(
97          long groupId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByGroupId(groupId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByGroupId(
102         long groupId, int begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByGroupId(
108         long groupId, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, begin, end, obc);
112     }
113 
114     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByGroupId_First(
115         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
118         return getPersistence().findByGroupId_First(groupId, obc);
119     }
120 
121     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByGroupId_Last(
122         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
125         return getPersistence().findByGroupId_Last(groupId, obc);
126     }
127 
128     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion[] findByGroupId_PrevAndNext(
129         long frameworkVersionId, long groupId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
133         return getPersistence()
134                    .findByGroupId_PrevAndNext(frameworkVersionId, groupId, obc);
135     }
136 
137     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByCompanyId(
138         long companyId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByCompanyId(companyId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByCompanyId(
143         long companyId, int begin, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByCompanyId(companyId, begin, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByCompanyId(
149         long companyId, int begin, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByCompanyId(companyId, begin, end, obc);
153     }
154 
155     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByCompanyId_First(
156         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
159         return getPersistence().findByCompanyId_First(companyId, obc);
160     }
161 
162     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByCompanyId_Last(
163         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
166         return getPersistence().findByCompanyId_Last(companyId, obc);
167     }
168 
169     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion[] findByCompanyId_PrevAndNext(
170         long frameworkVersionId, long companyId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
174         return getPersistence()
175                    .findByCompanyId_PrevAndNext(frameworkVersionId, companyId,
176             obc);
177     }
178 
179     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByG_A(
180         long groupId, boolean active) throws com.liferay.portal.SystemException {
181         return getPersistence().findByG_A(groupId, active);
182     }
183 
184     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByG_A(
185         long groupId, boolean active, int begin, int end)
186         throws com.liferay.portal.SystemException {
187         return getPersistence().findByG_A(groupId, active, begin, end);
188     }
189 
190     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findByG_A(
191         long groupId, boolean active, int begin, int end,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findByG_A(groupId, active, begin, end, obc);
195     }
196 
197     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByG_A_First(
198         long groupId, boolean active,
199         com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException,
201             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
202         return getPersistence().findByG_A_First(groupId, active, obc);
203     }
204 
205     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion findByG_A_Last(
206         long groupId, boolean active,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
210         return getPersistence().findByG_A_Last(groupId, active, obc);
211     }
212 
213     public static com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion[] findByG_A_PrevAndNext(
214         long frameworkVersionId, long groupId, boolean active,
215         com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
218         return getPersistence()
219                    .findByG_A_PrevAndNext(frameworkVersionId, groupId, active,
220             obc);
221     }
222 
223     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findWithDynamicQuery(
224         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().findWithDynamicQuery(queryInitializer);
227     }
228 
229     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findWithDynamicQuery(
230         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
231         int begin, int end) throws com.liferay.portal.SystemException {
232         return getPersistence()
233                    .findWithDynamicQuery(queryInitializer, begin, end);
234     }
235 
236     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findAll()
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findAll();
239     }
240 
241     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findAll(
242         int begin, int end) throws com.liferay.portal.SystemException {
243         return getPersistence().findAll(begin, end);
244     }
245 
246     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCFrameworkVersion> findAll(
247         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findAll(begin, end, obc);
250     }
251 
252     public static void removeByGroupId(long groupId)
253         throws com.liferay.portal.SystemException {
254         getPersistence().removeByGroupId(groupId);
255     }
256 
257     public static void removeByCompanyId(long companyId)
258         throws com.liferay.portal.SystemException {
259         getPersistence().removeByCompanyId(companyId);
260     }
261 
262     public static void removeByG_A(long groupId, boolean active)
263         throws com.liferay.portal.SystemException {
264         getPersistence().removeByG_A(groupId, active);
265     }
266 
267     public static void removeAll() throws com.liferay.portal.SystemException {
268         getPersistence().removeAll();
269     }
270 
271     public static int countByGroupId(long groupId)
272         throws com.liferay.portal.SystemException {
273         return getPersistence().countByGroupId(groupId);
274     }
275 
276     public static int countByCompanyId(long companyId)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().countByCompanyId(companyId);
279     }
280 
281     public static int countByG_A(long groupId, boolean active)
282         throws com.liferay.portal.SystemException {
283         return getPersistence().countByG_A(groupId, active);
284     }
285 
286     public static int countAll() throws com.liferay.portal.SystemException {
287         return getPersistence().countAll();
288     }
289 
290     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCProductVersions(
291         long pk)
292         throws com.liferay.portal.SystemException,
293             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
294         return getPersistence().getSCProductVersions(pk);
295     }
296 
297     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCProductVersions(
298         long pk, int begin, int end)
299         throws com.liferay.portal.SystemException,
300             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
301         return getPersistence().getSCProductVersions(pk, begin, end);
302     }
303 
304     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCProductVersions(
305         long pk, int begin, int end,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
309         return getPersistence().getSCProductVersions(pk, begin, end, obc);
310     }
311 
312     public static int getSCProductVersionsSize(long pk)
313         throws com.liferay.portal.SystemException {
314         return getPersistence().getSCProductVersionsSize(pk);
315     }
316 
317     public static boolean containsSCProductVersion(long pk,
318         long scProductVersionPK) throws com.liferay.portal.SystemException {
319         return getPersistence().containsSCProductVersion(pk, scProductVersionPK);
320     }
321 
322     public static boolean containsSCProductVersions(long pk)
323         throws com.liferay.portal.SystemException {
324         return getPersistence().containsSCProductVersions(pk);
325     }
326 
327     public static void addSCProductVersion(long pk, long scProductVersionPK)
328         throws com.liferay.portal.SystemException,
329             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
330             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
331         getPersistence().addSCProductVersion(pk, scProductVersionPK);
332     }
333 
334     public static void addSCProductVersion(long pk,
335         com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
336         throws com.liferay.portal.SystemException,
337             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
338             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
339         getPersistence().addSCProductVersion(pk, scProductVersion);
340     }
341 
342     public static void addSCProductVersions(long pk, long[] scProductVersionPKs)
343         throws com.liferay.portal.SystemException,
344             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
345             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
346         getPersistence().addSCProductVersions(pk, scProductVersionPKs);
347     }
348 
349     public static void addSCProductVersions(long pk,
350         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> scProductVersions)
351         throws com.liferay.portal.SystemException,
352             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
353             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
354         getPersistence().addSCProductVersions(pk, scProductVersions);
355     }
356 
357     public static void clearSCProductVersions(long pk)
358         throws com.liferay.portal.SystemException,
359             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
360         getPersistence().clearSCProductVersions(pk);
361     }
362 
363     public static void removeSCProductVersion(long pk, long scProductVersionPK)
364         throws com.liferay.portal.SystemException,
365             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
366             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
367         getPersistence().removeSCProductVersion(pk, scProductVersionPK);
368     }
369 
370     public static void removeSCProductVersion(long pk,
371         com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion)
372         throws com.liferay.portal.SystemException,
373             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
374             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
375         getPersistence().removeSCProductVersion(pk, scProductVersion);
376     }
377 
378     public static void removeSCProductVersions(long pk,
379         long[] scProductVersionPKs)
380         throws com.liferay.portal.SystemException,
381             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
382             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
383         getPersistence().removeSCProductVersions(pk, scProductVersionPKs);
384     }
385 
386     public static void removeSCProductVersions(long pk,
387         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> scProductVersions)
388         throws com.liferay.portal.SystemException,
389             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
390             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
391         getPersistence().removeSCProductVersions(pk, scProductVersions);
392     }
393 
394     public static void setSCProductVersions(long pk, long[] scProductVersionPKs)
395         throws com.liferay.portal.SystemException,
396             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
397             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
398         getPersistence().setSCProductVersions(pk, scProductVersionPKs);
399     }
400 
401     public static void setSCProductVersions(long pk,
402         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> scProductVersions)
403         throws com.liferay.portal.SystemException,
404             com.liferay.portlet.softwarecatalog.NoSuchProductVersionException,
405             com.liferay.portlet.softwarecatalog.NoSuchFrameworkVersionException {
406         getPersistence().setSCProductVersions(pk, scProductVersions);
407     }
408 
409     public static SCFrameworkVersionPersistence getPersistence() {
410         return _getUtil()._persistence;
411     }
412 
413     public void setPersistence(SCFrameworkVersionPersistence persistence) {
414         _persistence = persistence;
415     }
416 
417     private static SCFrameworkVersionUtil _getUtil() {
418         if (_util == null) {
419             _util = (SCFrameworkVersionUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
420         }
421 
422         return _util;
423     }
424 
425     private static final String _UTIL = SCFrameworkVersionUtil.class.getName();
426     private static SCFrameworkVersionUtil _util;
427     private SCFrameworkVersionPersistence _persistence;
428 }