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="SCProductEntryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SCProductEntryUtil {
32      public static void cacheResult(
33          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
34          getPersistence().cacheResult(scProductEntry);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries) {
39          getPersistence().cacheResult(scProductEntries);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry create(
47          long productEntryId) {
48          return getPersistence().create(productEntryId);
49      }
50  
51      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry remove(
52          long productEntryId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
55          return getPersistence().remove(productEntryId);
56      }
57  
58      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry remove(
59          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(scProductEntry);
62      }
63  
64      /**
65       * @deprecated Use <code>update(SCProductEntry scProductEntry, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry update(
68          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(scProductEntry);
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        scProductEntry 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 scProductEntry 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.SCProductEntry update(
87          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(scProductEntry, merge);
90      }
91  
92      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateImpl(
93          com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(scProductEntry, merge);
96      }
97  
98      public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByPrimaryKey(
99          long productEntryId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
102         return getPersistence().findByPrimaryKey(productEntryId);
103     }
104 
105     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchByPrimaryKey(
106         long productEntryId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(productEntryId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByGroupId(
111         long groupId) throws com.liferay.portal.SystemException {
112         return getPersistence().findByGroupId(groupId);
113     }
114 
115     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByGroupId(
116         long groupId, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByGroupId(groupId, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByGroupId(
122         long groupId, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByGroupId(groupId, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByGroupId_First(
129         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
132         return getPersistence().findByGroupId_First(groupId, obc);
133     }
134 
135     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByGroupId_Last(
136         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
139         return getPersistence().findByGroupId_Last(groupId, obc);
140     }
141 
142     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry[] findByGroupId_PrevAndNext(
143         long productEntryId, long groupId,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
147         return getPersistence()
148                    .findByGroupId_PrevAndNext(productEntryId, groupId, obc);
149     }
150 
151     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByCompanyId(
152         long companyId) throws com.liferay.portal.SystemException {
153         return getPersistence().findByCompanyId(companyId);
154     }
155 
156     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByCompanyId(
157         long companyId, int start, int end)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findByCompanyId(companyId, start, end);
160     }
161 
162     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByCompanyId(
163         long companyId, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByCompanyId(companyId, start, end, obc);
167     }
168 
169     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByCompanyId_First(
170         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
173         return getPersistence().findByCompanyId_First(companyId, obc);
174     }
175 
176     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByCompanyId_Last(
177         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
180         return getPersistence().findByCompanyId_Last(companyId, obc);
181     }
182 
183     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry[] findByCompanyId_PrevAndNext(
184         long productEntryId, long companyId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
188         return getPersistence()
189                    .findByCompanyId_PrevAndNext(productEntryId, companyId, obc);
190     }
191 
192     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByG_U(
193         long groupId, long userId) throws com.liferay.portal.SystemException {
194         return getPersistence().findByG_U(groupId, userId);
195     }
196 
197     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByG_U(
198         long groupId, long userId, int start, int end)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findByG_U(groupId, userId, start, end);
201     }
202 
203     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findByG_U(
204         long groupId, long userId, int start, int end,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findByG_U(groupId, userId, start, end, obc);
208     }
209 
210     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByG_U_First(
211         long groupId, long userId,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
215         return getPersistence().findByG_U_First(groupId, userId, obc);
216     }
217 
218     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByG_U_Last(
219         long groupId, long userId,
220         com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.SystemException,
222             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
223         return getPersistence().findByG_U_Last(groupId, userId, obc);
224     }
225 
226     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry[] findByG_U_PrevAndNext(
227         long productEntryId, long groupId, long userId,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
231         return getPersistence()
232                    .findByG_U_PrevAndNext(productEntryId, groupId, userId, obc);
233     }
234 
235     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry findByRG_RA(
236         java.lang.String repoGroupId, java.lang.String repoArtifactId)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
239         return getPersistence().findByRG_RA(repoGroupId, repoArtifactId);
240     }
241 
242     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchByRG_RA(
243         java.lang.String repoGroupId, java.lang.String repoArtifactId)
244         throws com.liferay.portal.SystemException {
245         return getPersistence().fetchByRG_RA(repoGroupId, repoArtifactId);
246     }
247 
248     public static com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchByRG_RA(
249         java.lang.String repoGroupId, java.lang.String repoArtifactId,
250         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
251         return getPersistence()
252                    .fetchByRG_RA(repoGroupId, repoArtifactId, retrieveFromCache);
253     }
254 
255     public static java.util.List<Object> findWithDynamicQuery(
256         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
257         throws com.liferay.portal.SystemException {
258         return getPersistence().findWithDynamicQuery(dynamicQuery);
259     }
260 
261     public static java.util.List<Object> findWithDynamicQuery(
262         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
263         int end) throws com.liferay.portal.SystemException {
264         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
265     }
266 
267     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll()
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findAll();
270     }
271 
272     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll(
273         int start, int end) throws com.liferay.portal.SystemException {
274         return getPersistence().findAll(start, end);
275     }
276 
277     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> findAll(
278         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().findAll(start, end, obc);
281     }
282 
283     public static void removeByGroupId(long groupId)
284         throws com.liferay.portal.SystemException {
285         getPersistence().removeByGroupId(groupId);
286     }
287 
288     public static void removeByCompanyId(long companyId)
289         throws com.liferay.portal.SystemException {
290         getPersistence().removeByCompanyId(companyId);
291     }
292 
293     public static void removeByG_U(long groupId, long userId)
294         throws com.liferay.portal.SystemException {
295         getPersistence().removeByG_U(groupId, userId);
296     }
297 
298     public static void removeByRG_RA(java.lang.String repoGroupId,
299         java.lang.String repoArtifactId)
300         throws com.liferay.portal.SystemException,
301             com.liferay.portlet.softwarecatalog.NoSuchProductEntryException {
302         getPersistence().removeByRG_RA(repoGroupId, repoArtifactId);
303     }
304 
305     public static void removeAll() throws com.liferay.portal.SystemException {
306         getPersistence().removeAll();
307     }
308 
309     public static int countByGroupId(long groupId)
310         throws com.liferay.portal.SystemException {
311         return getPersistence().countByGroupId(groupId);
312     }
313 
314     public static int countByCompanyId(long companyId)
315         throws com.liferay.portal.SystemException {
316         return getPersistence().countByCompanyId(companyId);
317     }
318 
319     public static int countByG_U(long groupId, long userId)
320         throws com.liferay.portal.SystemException {
321         return getPersistence().countByG_U(groupId, userId);
322     }
323 
324     public static int countByRG_RA(java.lang.String repoGroupId,
325         java.lang.String repoArtifactId)
326         throws com.liferay.portal.SystemException {
327         return getPersistence().countByRG_RA(repoGroupId, repoArtifactId);
328     }
329 
330     public static int countAll() throws com.liferay.portal.SystemException {
331         return getPersistence().countAll();
332     }
333 
334     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
335         long pk) throws com.liferay.portal.SystemException {
336         return getPersistence().getSCLicenses(pk);
337     }
338 
339     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
340         long pk, int start, int end) throws com.liferay.portal.SystemException {
341         return getPersistence().getSCLicenses(pk, start, end);
342     }
343 
344     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
345         long pk, int start, int end,
346         com.liferay.portal.kernel.util.OrderByComparator obc)
347         throws com.liferay.portal.SystemException {
348         return getPersistence().getSCLicenses(pk, start, end, obc);
349     }
350 
351     public static int getSCLicensesSize(long pk)
352         throws com.liferay.portal.SystemException {
353         return getPersistence().getSCLicensesSize(pk);
354     }
355 
356     public static boolean containsSCLicense(long pk, long scLicensePK)
357         throws com.liferay.portal.SystemException {
358         return getPersistence().containsSCLicense(pk, scLicensePK);
359     }
360 
361     public static boolean containsSCLicenses(long pk)
362         throws com.liferay.portal.SystemException {
363         return getPersistence().containsSCLicenses(pk);
364     }
365 
366     public static void addSCLicense(long pk, long scLicensePK)
367         throws com.liferay.portal.SystemException {
368         getPersistence().addSCLicense(pk, scLicensePK);
369     }
370 
371     public static void addSCLicense(long pk,
372         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
373         throws com.liferay.portal.SystemException {
374         getPersistence().addSCLicense(pk, scLicense);
375     }
376 
377     public static void addSCLicenses(long pk, long[] scLicensePKs)
378         throws com.liferay.portal.SystemException {
379         getPersistence().addSCLicenses(pk, scLicensePKs);
380     }
381 
382     public static void addSCLicenses(long pk,
383         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
384         throws com.liferay.portal.SystemException {
385         getPersistence().addSCLicenses(pk, scLicenses);
386     }
387 
388     public static void clearSCLicenses(long pk)
389         throws com.liferay.portal.SystemException {
390         getPersistence().clearSCLicenses(pk);
391     }
392 
393     public static void removeSCLicense(long pk, long scLicensePK)
394         throws com.liferay.portal.SystemException {
395         getPersistence().removeSCLicense(pk, scLicensePK);
396     }
397 
398     public static void removeSCLicense(long pk,
399         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
400         throws com.liferay.portal.SystemException {
401         getPersistence().removeSCLicense(pk, scLicense);
402     }
403 
404     public static void removeSCLicenses(long pk, long[] scLicensePKs)
405         throws com.liferay.portal.SystemException {
406         getPersistence().removeSCLicenses(pk, scLicensePKs);
407     }
408 
409     public static void removeSCLicenses(long pk,
410         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
411         throws com.liferay.portal.SystemException {
412         getPersistence().removeSCLicenses(pk, scLicenses);
413     }
414 
415     public static void setSCLicenses(long pk, long[] scLicensePKs)
416         throws com.liferay.portal.SystemException {
417         getPersistence().setSCLicenses(pk, scLicensePKs);
418     }
419 
420     public static void setSCLicenses(long pk,
421         java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses)
422         throws com.liferay.portal.SystemException {
423         getPersistence().setSCLicenses(pk, scLicenses);
424     }
425 
426     public static SCProductEntryPersistence getPersistence() {
427         return _persistence;
428     }
429 
430     public void setPersistence(SCProductEntryPersistence persistence) {
431         _persistence = persistence;
432     }
433 
434     private static SCProductEntryPersistence _persistence;
435 }