1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.softwarecatalog.service.persistence;
21  
22  /**
23   * <a href="SCLicenseUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class SCLicenseUtil {
29      public static com.liferay.portlet.softwarecatalog.model.SCLicense create(
30          long licenseId) {
31          return getPersistence().create(licenseId);
32      }
33  
34      public static com.liferay.portlet.softwarecatalog.model.SCLicense remove(
35          long licenseId)
36          throws com.liferay.portal.SystemException,
37              com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
38          return getPersistence().remove(licenseId);
39      }
40  
41      public static com.liferay.portlet.softwarecatalog.model.SCLicense remove(
42          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(scLicense);
45      }
46  
47      /**
48       * @deprecated Use <code>update(SCLicense scLicense, boolean merge)</code>.
49       */
50      public static com.liferay.portlet.softwarecatalog.model.SCLicense update(
51          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(scLicense);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        scLicense the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when scLicense is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portlet.softwarecatalog.model.SCLicense update(
70          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
71          boolean merge) throws com.liferay.portal.SystemException {
72          return getPersistence().update(scLicense, merge);
73      }
74  
75      public static com.liferay.portlet.softwarecatalog.model.SCLicense updateImpl(
76          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
77          boolean merge) throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(scLicense, merge);
79      }
80  
81      public static com.liferay.portlet.softwarecatalog.model.SCLicense findByPrimaryKey(
82          long licenseId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
85          return getPersistence().findByPrimaryKey(licenseId);
86      }
87  
88      public static com.liferay.portlet.softwarecatalog.model.SCLicense fetchByPrimaryKey(
89          long licenseId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(licenseId);
91      }
92  
93      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
94          boolean active) throws com.liferay.portal.SystemException {
95          return getPersistence().findByActive(active);
96      }
97  
98      public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
99          boolean active, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().findByActive(active, start, end);
102     }
103 
104     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
105         boolean active, int start, int end,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findByActive(active, start, end, obc);
109     }
110 
111     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_First(
112         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
115         return getPersistence().findByActive_First(active, obc);
116     }
117 
118     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_Last(
119         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
122         return getPersistence().findByActive_Last(active, obc);
123     }
124 
125     public static com.liferay.portlet.softwarecatalog.model.SCLicense[] findByActive_PrevAndNext(
126         long licenseId, boolean active,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
130         return getPersistence().findByActive_PrevAndNext(licenseId, active, obc);
131     }
132 
133     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
134         boolean active, boolean recommended)
135         throws com.liferay.portal.SystemException {
136         return getPersistence().findByA_R(active, recommended);
137     }
138 
139     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
140         boolean active, boolean recommended, int start, int end)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByA_R(active, recommended, start, end);
143     }
144 
145     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
146         boolean active, boolean recommended, int start, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException {
149         return getPersistence().findByA_R(active, recommended, start, end, obc);
150     }
151 
152     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_First(
153         boolean active, boolean recommended,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
157         return getPersistence().findByA_R_First(active, recommended, obc);
158     }
159 
160     public static com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_Last(
161         boolean active, boolean recommended,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
165         return getPersistence().findByA_R_Last(active, recommended, obc);
166     }
167 
168     public static com.liferay.portlet.softwarecatalog.model.SCLicense[] findByA_R_PrevAndNext(
169         long licenseId, boolean active, boolean recommended,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
173         return getPersistence()
174                    .findByA_R_PrevAndNext(licenseId, active, recommended, obc);
175     }
176 
177     public static java.util.List<Object> findWithDynamicQuery(
178         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().findWithDynamicQuery(dynamicQuery);
181     }
182 
183     public static java.util.List<Object> findWithDynamicQuery(
184         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
185         int end) throws com.liferay.portal.SystemException {
186         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
187     }
188 
189     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll()
190         throws com.liferay.portal.SystemException {
191         return getPersistence().findAll();
192     }
193 
194     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
195         int start, int end) throws com.liferay.portal.SystemException {
196         return getPersistence().findAll(start, end);
197     }
198 
199     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
200         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findAll(start, end, obc);
203     }
204 
205     public static void removeByActive(boolean active)
206         throws com.liferay.portal.SystemException {
207         getPersistence().removeByActive(active);
208     }
209 
210     public static void removeByA_R(boolean active, boolean recommended)
211         throws com.liferay.portal.SystemException {
212         getPersistence().removeByA_R(active, recommended);
213     }
214 
215     public static void removeAll() throws com.liferay.portal.SystemException {
216         getPersistence().removeAll();
217     }
218 
219     public static int countByActive(boolean active)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().countByActive(active);
222     }
223 
224     public static int countByA_R(boolean active, boolean recommended)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByA_R(active, recommended);
227     }
228 
229     public static int countAll() throws com.liferay.portal.SystemException {
230         return getPersistence().countAll();
231     }
232 
233     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
234         long pk) throws com.liferay.portal.SystemException {
235         return getPersistence().getSCProductEntries(pk);
236     }
237 
238     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
239         long pk, int start, int end) throws com.liferay.portal.SystemException {
240         return getPersistence().getSCProductEntries(pk, start, end);
241     }
242 
243     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
244         long pk, int start, int end,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().getSCProductEntries(pk, start, end, obc);
248     }
249 
250     public static int getSCProductEntriesSize(long pk)
251         throws com.liferay.portal.SystemException {
252         return getPersistence().getSCProductEntriesSize(pk);
253     }
254 
255     public static boolean containsSCProductEntry(long pk, long scProductEntryPK)
256         throws com.liferay.portal.SystemException {
257         return getPersistence().containsSCProductEntry(pk, scProductEntryPK);
258     }
259 
260     public static boolean containsSCProductEntries(long pk)
261         throws com.liferay.portal.SystemException {
262         return getPersistence().containsSCProductEntries(pk);
263     }
264 
265     public static void addSCProductEntry(long pk, long scProductEntryPK)
266         throws com.liferay.portal.SystemException {
267         getPersistence().addSCProductEntry(pk, scProductEntryPK);
268     }
269 
270     public static void addSCProductEntry(long pk,
271         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
272         throws com.liferay.portal.SystemException {
273         getPersistence().addSCProductEntry(pk, scProductEntry);
274     }
275 
276     public static void addSCProductEntries(long pk, long[] scProductEntryPKs)
277         throws com.liferay.portal.SystemException {
278         getPersistence().addSCProductEntries(pk, scProductEntryPKs);
279     }
280 
281     public static void addSCProductEntries(long pk,
282         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
283         throws com.liferay.portal.SystemException {
284         getPersistence().addSCProductEntries(pk, scProductEntries);
285     }
286 
287     public static void clearSCProductEntries(long pk)
288         throws com.liferay.portal.SystemException {
289         getPersistence().clearSCProductEntries(pk);
290     }
291 
292     public static void removeSCProductEntry(long pk, long scProductEntryPK)
293         throws com.liferay.portal.SystemException {
294         getPersistence().removeSCProductEntry(pk, scProductEntryPK);
295     }
296 
297     public static void removeSCProductEntry(long pk,
298         com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
299         throws com.liferay.portal.SystemException {
300         getPersistence().removeSCProductEntry(pk, scProductEntry);
301     }
302 
303     public static void removeSCProductEntries(long pk, long[] scProductEntryPKs)
304         throws com.liferay.portal.SystemException {
305         getPersistence().removeSCProductEntries(pk, scProductEntryPKs);
306     }
307 
308     public static void removeSCProductEntries(long pk,
309         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
310         throws com.liferay.portal.SystemException {
311         getPersistence().removeSCProductEntries(pk, scProductEntries);
312     }
313 
314     public static void setSCProductEntries(long pk, long[] scProductEntryPKs)
315         throws com.liferay.portal.SystemException {
316         getPersistence().setSCProductEntries(pk, scProductEntryPKs);
317     }
318 
319     public static void setSCProductEntries(long pk,
320         java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
321         throws com.liferay.portal.SystemException {
322         getPersistence().setSCProductEntries(pk, scProductEntries);
323     }
324 
325     public static SCLicensePersistence getPersistence() {
326         return _persistence;
327     }
328 
329     public void setPersistence(SCLicensePersistence persistence) {
330         _persistence = persistence;
331     }
332 
333     private static SCLicensePersistence _persistence;
334 }