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