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="SCLicenseUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SCLicenseUtil {
32      public static void cacheResult(
33          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
34          getPersistence().cacheResult(scLicense);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses) {
39          getPersistence().cacheResult(scLicenses);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.softwarecatalog.model.SCLicense create(
47          long licenseId) {
48          return getPersistence().create(licenseId);
49      }
50  
51      public static com.liferay.portlet.softwarecatalog.model.SCLicense remove(
52          long licenseId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
55          return getPersistence().remove(licenseId);
56      }
57  
58      public static com.liferay.portlet.softwarecatalog.model.SCLicense remove(
59          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(scLicense);
62      }
63  
64      /**
65       * @deprecated Use <code>update(SCLicense scLicense, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.softwarecatalog.model.SCLicense update(
68          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(scLicense);
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        scLicense 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 scLicense 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.SCLicense update(
87          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(scLicense, merge);
90      }
91  
92      public static com.liferay.portlet.softwarecatalog.model.SCLicense updateImpl(
93          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(scLicense, merge);
96      }
97  
98      public static com.liferay.portlet.softwarecatalog.model.SCLicense findByPrimaryKey(
99          long licenseId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
102         return getPersistence().findByPrimaryKey(licenseId);
103     }
104 
105     public static com.liferay.portlet.softwarecatalog.model.SCLicense fetchByPrimaryKey(
106         long licenseId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(licenseId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
111         boolean active) throws com.liferay.portal.SystemException {
112         return getPersistence().findByActive(active);
113     }
114 
115     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
116         boolean active, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByActive(active, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
122         boolean active, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByActive(active, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_First(
129         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
132         return getPersistence().findByActive_First(active, obc);
133     }
134 
135     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_Last(
136         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
139         return getPersistence().findByActive_Last(active, obc);
140     }
141 
142     public static com.liferay.portlet.softwarecatalog.model.SCLicense[] findByActive_PrevAndNext(
143         long licenseId, boolean active,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
147         return getPersistence().findByActive_PrevAndNext(licenseId, active, obc);
148     }
149 
150     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
151         boolean active, boolean recommended)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().findByA_R(active, recommended);
154     }
155 
156     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
157         boolean active, boolean recommended, int start, int end)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findByA_R(active, recommended, start, end);
160     }
161 
162     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
163         boolean active, boolean recommended, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByA_R(active, recommended, start, end, obc);
167     }
168 
169     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_First(
170         boolean active, boolean recommended,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
174         return getPersistence().findByA_R_First(active, recommended, obc);
175     }
176 
177     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_Last(
178         boolean active, boolean recommended,
179         com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
182         return getPersistence().findByA_R_Last(active, recommended, obc);
183     }
184 
185     public static com.liferay.portlet.softwarecatalog.model.SCLicense[] findByA_R_PrevAndNext(
186         long licenseId, boolean active, boolean recommended,
187         com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.SystemException,
189             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
190         return getPersistence()
191                    .findByA_R_PrevAndNext(licenseId, active, recommended, obc);
192     }
193 
194     public static java.util.List<Object> findWithDynamicQuery(
195         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findWithDynamicQuery(dynamicQuery);
198     }
199 
200     public static java.util.List<Object> findWithDynamicQuery(
201         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
202         int end) throws com.liferay.portal.SystemException {
203         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
204     }
205 
206     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll()
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findAll();
209     }
210 
211     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
212         int start, int end) throws com.liferay.portal.SystemException {
213         return getPersistence().findAll(start, end);
214     }
215 
216     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
217         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(start, end, obc);
220     }
221 
222     public static void removeByActive(boolean active)
223         throws com.liferay.portal.SystemException {
224         getPersistence().removeByActive(active);
225     }
226 
227     public static void removeByA_R(boolean active, boolean recommended)
228         throws com.liferay.portal.SystemException {
229         getPersistence().removeByA_R(active, recommended);
230     }
231 
232     public static void removeAll() throws com.liferay.portal.SystemException {
233         getPersistence().removeAll();
234     }
235 
236     public static int countByActive(boolean active)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().countByActive(active);
239     }
240 
241     public static int countByA_R(boolean active, boolean recommended)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().countByA_R(active, recommended);
244     }
245 
246     public static int countAll() throws com.liferay.portal.SystemException {
247         return getPersistence().countAll();
248     }
249 
250     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
251         long pk) throws com.liferay.portal.SystemException {
252         return getPersistence().getSCProductEntries(pk);
253     }
254 
255     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
256         long pk, int start, int end) throws com.liferay.portal.SystemException {
257         return getPersistence().getSCProductEntries(pk, start, end);
258     }
259 
260     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
261         long pk, int start, int end,
262         com.liferay.portal.kernel.util.OrderByComparator obc)
263         throws com.liferay.portal.SystemException {
264         return getPersistence().getSCProductEntries(pk, start, end, obc);
265     }
266 
267     public static int getSCProductEntriesSize(long pk)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().getSCProductEntriesSize(pk);
270     }
271 
272     public static boolean containsSCProductEntry(long pk, long scProductEntryPK)
273         throws com.liferay.portal.SystemException {
274         return getPersistence().containsSCProductEntry(pk, scProductEntryPK);
275     }
276 
277     public static boolean containsSCProductEntries(long pk)
278         throws com.liferay.portal.SystemException {
279         return getPersistence().containsSCProductEntries(pk);
280     }
281 
282     public static void addSCProductEntry(long pk, long scProductEntryPK)
283         throws com.liferay.portal.SystemException {
284         getPersistence().addSCProductEntry(pk, scProductEntryPK);
285     }
286 
287     public static void addSCProductEntry(long pk,
288         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
289         throws com.liferay.portal.SystemException {
290         getPersistence().addSCProductEntry(pk, scProductEntry);
291     }
292 
293     public static void addSCProductEntries(long pk, long[] scProductEntryPKs)
294         throws com.liferay.portal.SystemException {
295         getPersistence().addSCProductEntries(pk, scProductEntryPKs);
296     }
297 
298     public static void addSCProductEntries(long pk,
299         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
300         throws com.liferay.portal.SystemException {
301         getPersistence().addSCProductEntries(pk, scProductEntries);
302     }
303 
304     public static void clearSCProductEntries(long pk)
305         throws com.liferay.portal.SystemException {
306         getPersistence().clearSCProductEntries(pk);
307     }
308 
309     public static void removeSCProductEntry(long pk, long scProductEntryPK)
310         throws com.liferay.portal.SystemException {
311         getPersistence().removeSCProductEntry(pk, scProductEntryPK);
312     }
313 
314     public static void removeSCProductEntry(long pk,
315         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
316         throws com.liferay.portal.SystemException {
317         getPersistence().removeSCProductEntry(pk, scProductEntry);
318     }
319 
320     public static void removeSCProductEntries(long pk, long[] scProductEntryPKs)
321         throws com.liferay.portal.SystemException {
322         getPersistence().removeSCProductEntries(pk, scProductEntryPKs);
323     }
324 
325     public static void removeSCProductEntries(long pk,
326         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
327         throws com.liferay.portal.SystemException {
328         getPersistence().removeSCProductEntries(pk, scProductEntries);
329     }
330 
331     public static void setSCProductEntries(long pk, long[] scProductEntryPKs)
332         throws com.liferay.portal.SystemException {
333         getPersistence().setSCProductEntries(pk, scProductEntryPKs);
334     }
335 
336     public static void setSCProductEntries(long pk,
337         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
338         throws com.liferay.portal.SystemException {
339         getPersistence().setSCProductEntries(pk, scProductEntries);
340     }
341 
342     public static SCLicensePersistence getPersistence() {
343         return _persistence;
344     }
345 
346     public void setPersistence(SCLicensePersistence persistence) {
347         _persistence = persistence;
348     }
349 
350     private static SCLicensePersistence _persistence;
351 }