001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.softwarecatalog.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.softwarecatalog.model.SCLicense;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the s c license service. This utility wraps {@link SCLicensePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see SCLicensePersistence
037     * @see SCLicensePersistenceImpl
038     * @generated
039     */
040    public class SCLicenseUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(SCLicense scLicense) {
058                    getPersistence().clearCache(scLicense);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<SCLicense> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<SCLicense> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<SCLicense> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static SCLicense update(SCLicense scLicense, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(scLicense, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static SCLicense update(SCLicense scLicense, boolean merge,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(scLicense, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the s c license in the entity cache if it is enabled.
115            *
116            * @param scLicense the s c license
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
120                    getPersistence().cacheResult(scLicense);
121            }
122    
123            /**
124            * Caches the s c licenses in the entity cache if it is enabled.
125            *
126            * @param scLicenses the s c licenses
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> scLicenses) {
130                    getPersistence().cacheResult(scLicenses);
131            }
132    
133            /**
134            * Creates a new s c license with the primary key. Does not add the s c license to the database.
135            *
136            * @param licenseId the primary key for the new s c license
137            * @return the new s c license
138            */
139            public static com.liferay.portlet.softwarecatalog.model.SCLicense create(
140                    long licenseId) {
141                    return getPersistence().create(licenseId);
142            }
143    
144            /**
145            * Removes the s c license with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param licenseId the primary key of the s c license
148            * @return the s c license that was removed
149            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a s c license with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.softwarecatalog.model.SCLicense remove(
153                    long licenseId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
156                    return getPersistence().remove(licenseId);
157            }
158    
159            public static com.liferay.portlet.softwarecatalog.model.SCLicense updateImpl(
160                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(scLicense, merge);
164            }
165    
166            /**
167            * Returns the s c license with the primary key or throws a {@link com.liferay.portlet.softwarecatalog.NoSuchLicenseException} if it could not be found.
168            *
169            * @param licenseId the primary key of the s c license
170            * @return the s c license
171            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a s c license with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.softwarecatalog.model.SCLicense findByPrimaryKey(
175                    long licenseId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
178                    return getPersistence().findByPrimaryKey(licenseId);
179            }
180    
181            /**
182            * Returns the s c license with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param licenseId the primary key of the s c license
185            * @return the s c license, or <code>null</code> if a s c license with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.softwarecatalog.model.SCLicense fetchByPrimaryKey(
189                    long licenseId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(licenseId);
192            }
193    
194            /**
195            * Returns all the s c licenses where active = &#63;.
196            *
197            * @param active the active
198            * @return the matching s c licenses
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
202                    boolean active)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByActive(active);
205            }
206    
207            /**
208            * Returns a range of all the s c licenses where active = &#63;.
209            *
210            * <p>
211            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
212            * </p>
213            *
214            * @param active the active
215            * @param start the lower bound of the range of s c licenses
216            * @param end the upper bound of the range of s c licenses (not inclusive)
217            * @return the range of matching s c licenses
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
221                    boolean active, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByActive(active, start, end);
224            }
225    
226            /**
227            * Returns an ordered range of all the s c licenses where active = &#63;.
228            *
229            * <p>
230            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
231            * </p>
232            *
233            * @param active the active
234            * @param start the lower bound of the range of s c licenses
235            * @param end the upper bound of the range of s c licenses (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching s c licenses
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByActive(
241                    boolean active, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByActive(active, start, end, orderByComparator);
246            }
247    
248            /**
249            * Returns the first s c license in the ordered set where active = &#63;.
250            *
251            * <p>
252            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
253            * </p>
254            *
255            * @param active the active
256            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
257            * @return the first matching s c license
258            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a matching s c license could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_First(
262                    boolean active,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
266                    return getPersistence().findByActive_First(active, orderByComparator);
267            }
268    
269            /**
270            * Returns the last s c license in the ordered set where active = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param active the active
277            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
278            * @return the last matching s c license
279            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a matching s c license could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portlet.softwarecatalog.model.SCLicense findByActive_Last(
283                    boolean active,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.kernel.exception.SystemException,
286                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
287                    return getPersistence().findByActive_Last(active, orderByComparator);
288            }
289    
290            /**
291            * Returns the s c licenses before and after the current s c license in the ordered set where active = &#63;.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
295            * </p>
296            *
297            * @param licenseId the primary key of the current s c license
298            * @param active the active
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the previous, current, and next s c license
301            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a s c license with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portlet.softwarecatalog.model.SCLicense[] findByActive_PrevAndNext(
305                    long licenseId, boolean active,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
309                    return getPersistence()
310                                       .findByActive_PrevAndNext(licenseId, active,
311                            orderByComparator);
312            }
313    
314            /**
315            * Returns all the s c licenses that the user has permission to view where active = &#63;.
316            *
317            * @param active the active
318            * @return the matching s c licenses that the user has permission to view
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> filterFindByActive(
322                    boolean active)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence().filterFindByActive(active);
325            }
326    
327            /**
328            * Returns a range of all the s c licenses that the user has permission to view where active = &#63;.
329            *
330            * <p>
331            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
332            * </p>
333            *
334            * @param active the active
335            * @param start the lower bound of the range of s c licenses
336            * @param end the upper bound of the range of s c licenses (not inclusive)
337            * @return the range of matching s c licenses that the user has permission to view
338            * @throws SystemException if a system exception occurred
339            */
340            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> filterFindByActive(
341                    boolean active, int start, int end)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().filterFindByActive(active, start, end);
344            }
345    
346            /**
347            * Returns an ordered range of all the s c licenses that the user has permissions to view where active = &#63;.
348            *
349            * <p>
350            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
351            * </p>
352            *
353            * @param active the active
354            * @param start the lower bound of the range of s c licenses
355            * @param end the upper bound of the range of s c licenses (not inclusive)
356            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
357            * @return the ordered range of matching s c licenses that the user has permission to view
358            * @throws SystemException if a system exception occurred
359            */
360            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> filterFindByActive(
361                    boolean active, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return getPersistence()
365                                       .filterFindByActive(active, start, end, orderByComparator);
366            }
367    
368            /**
369            * Returns the s c licenses before and after the current s c license in the ordered set of s c licenses that the user has permission to view where active = &#63;.
370            *
371            * @param licenseId the primary key of the current s c license
372            * @param active the active
373            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
374            * @return the previous, current, and next s c license
375            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a s c license with the primary key could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            public static com.liferay.portlet.softwarecatalog.model.SCLicense[] filterFindByActive_PrevAndNext(
379                    long licenseId, boolean active,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException,
382                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
383                    return getPersistence()
384                                       .filterFindByActive_PrevAndNext(licenseId, active,
385                            orderByComparator);
386            }
387    
388            /**
389            * Returns all the s c licenses where active = &#63; and recommended = &#63;.
390            *
391            * @param active the active
392            * @param recommended the recommended
393            * @return the matching s c licenses
394            * @throws SystemException if a system exception occurred
395            */
396            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
397                    boolean active, boolean recommended)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence().findByA_R(active, recommended);
400            }
401    
402            /**
403            * Returns a range of all the s c licenses where active = &#63; and recommended = &#63;.
404            *
405            * <p>
406            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
407            * </p>
408            *
409            * @param active the active
410            * @param recommended the recommended
411            * @param start the lower bound of the range of s c licenses
412            * @param end the upper bound of the range of s c licenses (not inclusive)
413            * @return the range of matching s c licenses
414            * @throws SystemException if a system exception occurred
415            */
416            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
417                    boolean active, boolean recommended, int start, int end)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    return getPersistence().findByA_R(active, recommended, start, end);
420            }
421    
422            /**
423            * Returns an ordered range of all the s c licenses where active = &#63; and recommended = &#63;.
424            *
425            * <p>
426            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
427            * </p>
428            *
429            * @param active the active
430            * @param recommended the recommended
431            * @param start the lower bound of the range of s c licenses
432            * @param end the upper bound of the range of s c licenses (not inclusive)
433            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
434            * @return the ordered range of matching s c licenses
435            * @throws SystemException if a system exception occurred
436            */
437            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findByA_R(
438                    boolean active, boolean recommended, int start, int end,
439                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence()
442                                       .findByA_R(active, recommended, start, end, orderByComparator);
443            }
444    
445            /**
446            * Returns the first s c license in the ordered set where active = &#63; and recommended = &#63;.
447            *
448            * <p>
449            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
450            * </p>
451            *
452            * @param active the active
453            * @param recommended the recommended
454            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
455            * @return the first matching s c license
456            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a matching s c license could not be found
457            * @throws SystemException if a system exception occurred
458            */
459            public static com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_First(
460                    boolean active, boolean recommended,
461                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
462                    throws com.liferay.portal.kernel.exception.SystemException,
463                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
464                    return getPersistence()
465                                       .findByA_R_First(active, recommended, orderByComparator);
466            }
467    
468            /**
469            * Returns the last s c license in the ordered set where active = &#63; and recommended = &#63;.
470            *
471            * <p>
472            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
473            * </p>
474            *
475            * @param active the active
476            * @param recommended the recommended
477            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
478            * @return the last matching s c license
479            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a matching s c license could not be found
480            * @throws SystemException if a system exception occurred
481            */
482            public static com.liferay.portlet.softwarecatalog.model.SCLicense findByA_R_Last(
483                    boolean active, boolean recommended,
484                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
485                    throws com.liferay.portal.kernel.exception.SystemException,
486                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
487                    return getPersistence()
488                                       .findByA_R_Last(active, recommended, orderByComparator);
489            }
490    
491            /**
492            * Returns the s c licenses before and after the current s c license in the ordered set where active = &#63; and recommended = &#63;.
493            *
494            * <p>
495            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
496            * </p>
497            *
498            * @param licenseId the primary key of the current s c license
499            * @param active the active
500            * @param recommended the recommended
501            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
502            * @return the previous, current, and next s c license
503            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a s c license with the primary key could not be found
504            * @throws SystemException if a system exception occurred
505            */
506            public static com.liferay.portlet.softwarecatalog.model.SCLicense[] findByA_R_PrevAndNext(
507                    long licenseId, boolean active, boolean recommended,
508                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
509                    throws com.liferay.portal.kernel.exception.SystemException,
510                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
511                    return getPersistence()
512                                       .findByA_R_PrevAndNext(licenseId, active, recommended,
513                            orderByComparator);
514            }
515    
516            /**
517            * Returns all the s c licenses that the user has permission to view where active = &#63; and recommended = &#63;.
518            *
519            * @param active the active
520            * @param recommended the recommended
521            * @return the matching s c licenses that the user has permission to view
522            * @throws SystemException if a system exception occurred
523            */
524            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> filterFindByA_R(
525                    boolean active, boolean recommended)
526                    throws com.liferay.portal.kernel.exception.SystemException {
527                    return getPersistence().filterFindByA_R(active, recommended);
528            }
529    
530            /**
531            * Returns a range of all the s c licenses that the user has permission to view where active = &#63; and recommended = &#63;.
532            *
533            * <p>
534            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
535            * </p>
536            *
537            * @param active the active
538            * @param recommended the recommended
539            * @param start the lower bound of the range of s c licenses
540            * @param end the upper bound of the range of s c licenses (not inclusive)
541            * @return the range of matching s c licenses that the user has permission to view
542            * @throws SystemException if a system exception occurred
543            */
544            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> filterFindByA_R(
545                    boolean active, boolean recommended, int start, int end)
546                    throws com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().filterFindByA_R(active, recommended, start, end);
548            }
549    
550            /**
551            * Returns an ordered range of all the s c licenses that the user has permissions to view where active = &#63; and recommended = &#63;.
552            *
553            * <p>
554            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
555            * </p>
556            *
557            * @param active the active
558            * @param recommended the recommended
559            * @param start the lower bound of the range of s c licenses
560            * @param end the upper bound of the range of s c licenses (not inclusive)
561            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
562            * @return the ordered range of matching s c licenses that the user has permission to view
563            * @throws SystemException if a system exception occurred
564            */
565            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> filterFindByA_R(
566                    boolean active, boolean recommended, int start, int end,
567                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
568                    throws com.liferay.portal.kernel.exception.SystemException {
569                    return getPersistence()
570                                       .filterFindByA_R(active, recommended, start, end,
571                            orderByComparator);
572            }
573    
574            /**
575            * Returns the s c licenses before and after the current s c license in the ordered set of s c licenses that the user has permission to view where active = &#63; and recommended = &#63;.
576            *
577            * @param licenseId the primary key of the current s c license
578            * @param active the active
579            * @param recommended the recommended
580            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
581            * @return the previous, current, and next s c license
582            * @throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException if a s c license with the primary key could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public static com.liferay.portlet.softwarecatalog.model.SCLicense[] filterFindByA_R_PrevAndNext(
586                    long licenseId, boolean active, boolean recommended,
587                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
588                    throws com.liferay.portal.kernel.exception.SystemException,
589                            com.liferay.portlet.softwarecatalog.NoSuchLicenseException {
590                    return getPersistence()
591                                       .filterFindByA_R_PrevAndNext(licenseId, active, recommended,
592                            orderByComparator);
593            }
594    
595            /**
596            * Returns all the s c licenses.
597            *
598            * @return the s c licenses
599            * @throws SystemException if a system exception occurred
600            */
601            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll()
602                    throws com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence().findAll();
604            }
605    
606            /**
607            * Returns a range of all the s c licenses.
608            *
609            * <p>
610            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
611            * </p>
612            *
613            * @param start the lower bound of the range of s c licenses
614            * @param end the upper bound of the range of s c licenses (not inclusive)
615            * @return the range of s c licenses
616            * @throws SystemException if a system exception occurred
617            */
618            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
619                    int start, int end)
620                    throws com.liferay.portal.kernel.exception.SystemException {
621                    return getPersistence().findAll(start, end);
622            }
623    
624            /**
625            * Returns an ordered range of all the s c licenses.
626            *
627            * <p>
628            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
629            * </p>
630            *
631            * @param start the lower bound of the range of s c licenses
632            * @param end the upper bound of the range of s c licenses (not inclusive)
633            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
634            * @return the ordered range of s c licenses
635            * @throws SystemException if a system exception occurred
636            */
637            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> findAll(
638                    int start, int end,
639                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
640                    throws com.liferay.portal.kernel.exception.SystemException {
641                    return getPersistence().findAll(start, end, orderByComparator);
642            }
643    
644            /**
645            * Removes all the s c licenses where active = &#63; from the database.
646            *
647            * @param active the active
648            * @throws SystemException if a system exception occurred
649            */
650            public static void removeByActive(boolean active)
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    getPersistence().removeByActive(active);
653            }
654    
655            /**
656            * Removes all the s c licenses where active = &#63; and recommended = &#63; from the database.
657            *
658            * @param active the active
659            * @param recommended the recommended
660            * @throws SystemException if a system exception occurred
661            */
662            public static void removeByA_R(boolean active, boolean recommended)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    getPersistence().removeByA_R(active, recommended);
665            }
666    
667            /**
668            * Removes all the s c licenses from the database.
669            *
670            * @throws SystemException if a system exception occurred
671            */
672            public static void removeAll()
673                    throws com.liferay.portal.kernel.exception.SystemException {
674                    getPersistence().removeAll();
675            }
676    
677            /**
678            * Returns the number of s c licenses where active = &#63;.
679            *
680            * @param active the active
681            * @return the number of matching s c licenses
682            * @throws SystemException if a system exception occurred
683            */
684            public static int countByActive(boolean active)
685                    throws com.liferay.portal.kernel.exception.SystemException {
686                    return getPersistence().countByActive(active);
687            }
688    
689            /**
690            * Returns the number of s c licenses that the user has permission to view where active = &#63;.
691            *
692            * @param active the active
693            * @return the number of matching s c licenses that the user has permission to view
694            * @throws SystemException if a system exception occurred
695            */
696            public static int filterCountByActive(boolean active)
697                    throws com.liferay.portal.kernel.exception.SystemException {
698                    return getPersistence().filterCountByActive(active);
699            }
700    
701            /**
702            * Returns the number of s c licenses where active = &#63; and recommended = &#63;.
703            *
704            * @param active the active
705            * @param recommended the recommended
706            * @return the number of matching s c licenses
707            * @throws SystemException if a system exception occurred
708            */
709            public static int countByA_R(boolean active, boolean recommended)
710                    throws com.liferay.portal.kernel.exception.SystemException {
711                    return getPersistence().countByA_R(active, recommended);
712            }
713    
714            /**
715            * Returns the number of s c licenses that the user has permission to view where active = &#63; and recommended = &#63;.
716            *
717            * @param active the active
718            * @param recommended the recommended
719            * @return the number of matching s c licenses that the user has permission to view
720            * @throws SystemException if a system exception occurred
721            */
722            public static int filterCountByA_R(boolean active, boolean recommended)
723                    throws com.liferay.portal.kernel.exception.SystemException {
724                    return getPersistence().filterCountByA_R(active, recommended);
725            }
726    
727            /**
728            * Returns the number of s c licenses.
729            *
730            * @return the number of s c licenses
731            * @throws SystemException if a system exception occurred
732            */
733            public static int countAll()
734                    throws com.liferay.portal.kernel.exception.SystemException {
735                    return getPersistence().countAll();
736            }
737    
738            /**
739            * Returns all the s c product entries associated with the s c license.
740            *
741            * @param pk the primary key of the s c license
742            * @return the s c product entries associated with the s c license
743            * @throws SystemException if a system exception occurred
744            */
745            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
746                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
747                    return getPersistence().getSCProductEntries(pk);
748            }
749    
750            /**
751            * Returns a range of all the s c product entries associated with the s c license.
752            *
753            * <p>
754            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
755            * </p>
756            *
757            * @param pk the primary key of the s c license
758            * @param start the lower bound of the range of s c licenses
759            * @param end the upper bound of the range of s c licenses (not inclusive)
760            * @return the range of s c product entries associated with the s c license
761            * @throws SystemException if a system exception occurred
762            */
763            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
764                    long pk, int start, int end)
765                    throws com.liferay.portal.kernel.exception.SystemException {
766                    return getPersistence().getSCProductEntries(pk, start, end);
767            }
768    
769            /**
770            * Returns an ordered range of all the s c product entries associated with the s c license.
771            *
772            * <p>
773            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
774            * </p>
775            *
776            * @param pk the primary key of the s c license
777            * @param start the lower bound of the range of s c licenses
778            * @param end the upper bound of the range of s c licenses (not inclusive)
779            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
780            * @return the ordered range of s c product entries associated with the s c license
781            * @throws SystemException if a system exception occurred
782            */
783            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
784                    long pk, int start, int end,
785                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
786                    throws com.liferay.portal.kernel.exception.SystemException {
787                    return getPersistence()
788                                       .getSCProductEntries(pk, start, end, orderByComparator);
789            }
790    
791            /**
792            * Returns the number of s c product entries associated with the s c license.
793            *
794            * @param pk the primary key of the s c license
795            * @return the number of s c product entries associated with the s c license
796            * @throws SystemException if a system exception occurred
797            */
798            public static int getSCProductEntriesSize(long pk)
799                    throws com.liferay.portal.kernel.exception.SystemException {
800                    return getPersistence().getSCProductEntriesSize(pk);
801            }
802    
803            /**
804            * Returns <code>true</code> if the s c product entry is associated with the s c license.
805            *
806            * @param pk the primary key of the s c license
807            * @param scProductEntryPK the primary key of the s c product entry
808            * @return <code>true</code> if the s c product entry is associated with the s c license; <code>false</code> otherwise
809            * @throws SystemException if a system exception occurred
810            */
811            public static boolean containsSCProductEntry(long pk, long scProductEntryPK)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getPersistence().containsSCProductEntry(pk, scProductEntryPK);
814            }
815    
816            /**
817            * Returns <code>true</code> if the s c license has any s c product entries associated with it.
818            *
819            * @param pk the primary key of the s c license to check for associations with s c product entries
820            * @return <code>true</code> if the s c license has any s c product entries associated with it; <code>false</code> otherwise
821            * @throws SystemException if a system exception occurred
822            */
823            public static boolean containsSCProductEntries(long pk)
824                    throws com.liferay.portal.kernel.exception.SystemException {
825                    return getPersistence().containsSCProductEntries(pk);
826            }
827    
828            /**
829            * Adds an association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache.
830            *
831            * @param pk the primary key of the s c license
832            * @param scProductEntryPK the primary key of the s c product entry
833            * @throws SystemException if a system exception occurred
834            */
835            public static void addSCProductEntry(long pk, long scProductEntryPK)
836                    throws com.liferay.portal.kernel.exception.SystemException {
837                    getPersistence().addSCProductEntry(pk, scProductEntryPK);
838            }
839    
840            /**
841            * Adds an association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache.
842            *
843            * @param pk the primary key of the s c license
844            * @param scProductEntry the s c product entry
845            * @throws SystemException if a system exception occurred
846            */
847            public static void addSCProductEntry(long pk,
848                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
849                    throws com.liferay.portal.kernel.exception.SystemException {
850                    getPersistence().addSCProductEntry(pk, scProductEntry);
851            }
852    
853            /**
854            * Adds an association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache.
855            *
856            * @param pk the primary key of the s c license
857            * @param scProductEntryPKs the primary keys of the s c product entries
858            * @throws SystemException if a system exception occurred
859            */
860            public static void addSCProductEntries(long pk, long[] scProductEntryPKs)
861                    throws com.liferay.portal.kernel.exception.SystemException {
862                    getPersistence().addSCProductEntries(pk, scProductEntryPKs);
863            }
864    
865            /**
866            * Adds an association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache.
867            *
868            * @param pk the primary key of the s c license
869            * @param scProductEntries the s c product entries
870            * @throws SystemException if a system exception occurred
871            */
872            public static void addSCProductEntries(long pk,
873                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
874                    throws com.liferay.portal.kernel.exception.SystemException {
875                    getPersistence().addSCProductEntries(pk, scProductEntries);
876            }
877    
878            /**
879            * Clears all associations between the s c license and its s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache.
880            *
881            * @param pk the primary key of the s c license to clear the associated s c product entries from
882            * @throws SystemException if a system exception occurred
883            */
884            public static void clearSCProductEntries(long pk)
885                    throws com.liferay.portal.kernel.exception.SystemException {
886                    getPersistence().clearSCProductEntries(pk);
887            }
888    
889            /**
890            * Removes the association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache.
891            *
892            * @param pk the primary key of the s c license
893            * @param scProductEntryPK the primary key of the s c product entry
894            * @throws SystemException if a system exception occurred
895            */
896            public static void removeSCProductEntry(long pk, long scProductEntryPK)
897                    throws com.liferay.portal.kernel.exception.SystemException {
898                    getPersistence().removeSCProductEntry(pk, scProductEntryPK);
899            }
900    
901            /**
902            * Removes the association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache.
903            *
904            * @param pk the primary key of the s c license
905            * @param scProductEntry the s c product entry
906            * @throws SystemException if a system exception occurred
907            */
908            public static void removeSCProductEntry(long pk,
909                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry)
910                    throws com.liferay.portal.kernel.exception.SystemException {
911                    getPersistence().removeSCProductEntry(pk, scProductEntry);
912            }
913    
914            /**
915            * Removes the association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache.
916            *
917            * @param pk the primary key of the s c license
918            * @param scProductEntryPKs the primary keys of the s c product entries
919            * @throws SystemException if a system exception occurred
920            */
921            public static void removeSCProductEntries(long pk, long[] scProductEntryPKs)
922                    throws com.liferay.portal.kernel.exception.SystemException {
923                    getPersistence().removeSCProductEntries(pk, scProductEntryPKs);
924            }
925    
926            /**
927            * Removes the association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache.
928            *
929            * @param pk the primary key of the s c license
930            * @param scProductEntries the s c product entries
931            * @throws SystemException if a system exception occurred
932            */
933            public static void removeSCProductEntries(long pk,
934                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
935                    throws com.liferay.portal.kernel.exception.SystemException {
936                    getPersistence().removeSCProductEntries(pk, scProductEntries);
937            }
938    
939            /**
940            * Sets the s c product entries associated with the s c license, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
941            *
942            * @param pk the primary key of the s c license
943            * @param scProductEntryPKs the primary keys of the s c product entries to be associated with the s c license
944            * @throws SystemException if a system exception occurred
945            */
946            public static void setSCProductEntries(long pk, long[] scProductEntryPKs)
947                    throws com.liferay.portal.kernel.exception.SystemException {
948                    getPersistence().setSCProductEntries(pk, scProductEntryPKs);
949            }
950    
951            /**
952            * Sets the s c product entries associated with the s c license, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
953            *
954            * @param pk the primary key of the s c license
955            * @param scProductEntries the s c product entries to be associated with the s c license
956            * @throws SystemException if a system exception occurred
957            */
958            public static void setSCProductEntries(long pk,
959                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries)
960                    throws com.liferay.portal.kernel.exception.SystemException {
961                    getPersistence().setSCProductEntries(pk, scProductEntries);
962            }
963    
964            public static SCLicensePersistence getPersistence() {
965                    if (_persistence == null) {
966                            _persistence = (SCLicensePersistence)PortalBeanLocatorUtil.locate(SCLicensePersistence.class.getName());
967    
968                            ReferenceRegistry.registerReference(SCLicenseUtil.class,
969                                    "_persistence");
970                    }
971    
972                    return _persistence;
973            }
974    
975            public void setPersistence(SCLicensePersistence persistence) {
976                    _persistence = persistence;
977    
978                    ReferenceRegistry.registerReference(SCLicenseUtil.class, "_persistence");
979            }
980    
981            private static SCLicensePersistence _persistence;
982    }