001    /**
002     * Copyright (c) 2000-present 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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for SCLicense. This utility wraps
024     * {@link com.liferay.portlet.softwarecatalog.service.impl.SCLicenseLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see SCLicenseLocalService
032     * @see com.liferay.portlet.softwarecatalog.service.base.SCLicenseLocalServiceBaseImpl
033     * @see com.liferay.portlet.softwarecatalog.service.impl.SCLicenseLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SCLicenseLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCLicenseLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.softwarecatalog.model.SCLicense addLicense(
044                    java.lang.String name, java.lang.String url, boolean openSource,
045                    boolean active, boolean recommended)
046                    throws com.liferay.portal.kernel.exception.PortalException {
047                    return getService()
048                                       .addLicense(name, url, openSource, active, recommended);
049            }
050    
051            /**
052            * Adds the s c license to the database. Also notifies the appropriate model listeners.
053            *
054            * @param scLicense the s c license
055            * @return the s c license that was added
056            */
057            public static com.liferay.portlet.softwarecatalog.model.SCLicense addSCLicense(
058                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
059                    return getService().addSCLicense(scLicense);
060            }
061    
062            public static void addSCProductEntrySCLicense(long productEntryId,
063                    long licenseId) {
064                    getService().addSCProductEntrySCLicense(productEntryId, licenseId);
065            }
066    
067            public static void addSCProductEntrySCLicense(long productEntryId,
068                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
069                    getService().addSCProductEntrySCLicense(productEntryId, scLicense);
070            }
071    
072            public static void addSCProductEntrySCLicenses(long productEntryId,
073                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> SCLicenses) {
074                    getService().addSCProductEntrySCLicenses(productEntryId, SCLicenses);
075            }
076    
077            public static void addSCProductEntrySCLicenses(long productEntryId,
078                    long[] licenseIds) {
079                    getService().addSCProductEntrySCLicenses(productEntryId, licenseIds);
080            }
081    
082            public static void clearSCProductEntrySCLicenses(long productEntryId) {
083                    getService().clearSCProductEntrySCLicenses(productEntryId);
084            }
085    
086            /**
087            * Creates a new s c license with the primary key. Does not add the s c license to the database.
088            *
089            * @param licenseId the primary key for the new s c license
090            * @return the new s c license
091            */
092            public static com.liferay.portlet.softwarecatalog.model.SCLicense createSCLicense(
093                    long licenseId) {
094                    return getService().createSCLicense(licenseId);
095            }
096    
097            public static void deleteLicense(
098                    com.liferay.portlet.softwarecatalog.model.SCLicense license) {
099                    getService().deleteLicense(license);
100            }
101    
102            public static void deleteLicense(long licenseId)
103                    throws com.liferay.portal.kernel.exception.PortalException {
104                    getService().deleteLicense(licenseId);
105            }
106    
107            /**
108            * @throws PortalException
109            */
110            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
111                    com.liferay.portal.model.PersistedModel persistedModel)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    return getService().deletePersistedModel(persistedModel);
114            }
115    
116            /**
117            * Deletes the s c license with the primary key from the database. Also notifies the appropriate model listeners.
118            *
119            * @param licenseId the primary key of the s c license
120            * @return the s c license that was removed
121            * @throws PortalException if a s c license with the primary key could not be found
122            */
123            public static com.liferay.portlet.softwarecatalog.model.SCLicense deleteSCLicense(
124                    long licenseId)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    return getService().deleteSCLicense(licenseId);
127            }
128    
129            /**
130            * Deletes the s c license from the database. Also notifies the appropriate model listeners.
131            *
132            * @param scLicense the s c license
133            * @return the s c license that was removed
134            */
135            public static com.liferay.portlet.softwarecatalog.model.SCLicense deleteSCLicense(
136                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
137                    return getService().deleteSCLicense(scLicense);
138            }
139    
140            public static void deleteSCProductEntrySCLicense(long productEntryId,
141                    long licenseId) {
142                    getService().deleteSCProductEntrySCLicense(productEntryId, licenseId);
143            }
144    
145            public static void deleteSCProductEntrySCLicense(long productEntryId,
146                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
147                    getService().deleteSCProductEntrySCLicense(productEntryId, scLicense);
148            }
149    
150            public static void deleteSCProductEntrySCLicenses(long productEntryId,
151                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> SCLicenses) {
152                    getService().deleteSCProductEntrySCLicenses(productEntryId, SCLicenses);
153            }
154    
155            public static void deleteSCProductEntrySCLicenses(long productEntryId,
156                    long[] licenseIds) {
157                    getService().deleteSCProductEntrySCLicenses(productEntryId, licenseIds);
158            }
159    
160            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
161                    return getService().dynamicQuery();
162            }
163    
164            /**
165            * Performs a dynamic query on the database and returns the matching rows.
166            *
167            * @param dynamicQuery the dynamic query
168            * @return the matching rows
169            */
170            public static <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
172                    return getService().dynamicQuery(dynamicQuery);
173            }
174    
175            /**
176            * Performs a dynamic query on the database and returns a range of the matching rows.
177            *
178            * <p>
179            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCLicenseModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
180            * </p>
181            *
182            * @param dynamicQuery the dynamic query
183            * @param start the lower bound of the range of model instances
184            * @param end the upper bound of the range of model instances (not inclusive)
185            * @return the range of matching rows
186            */
187            public static <T> java.util.List<T> dynamicQuery(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
189                    int end) {
190                    return getService().dynamicQuery(dynamicQuery, start, end);
191            }
192    
193            /**
194            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
195            *
196            * <p>
197            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCLicenseModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
198            * </p>
199            *
200            * @param dynamicQuery the dynamic query
201            * @param start the lower bound of the range of model instances
202            * @param end the upper bound of the range of model instances (not inclusive)
203            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
204            * @return the ordered range of matching rows
205            */
206            public static <T> java.util.List<T> dynamicQuery(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
208                    int end,
209                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
210                    return getService()
211                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
212            }
213    
214            /**
215            * Returns the number of rows matching the dynamic query.
216            *
217            * @param dynamicQuery the dynamic query
218            * @return the number of rows matching the dynamic query
219            */
220            public static long dynamicQueryCount(
221                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
222                    return getService().dynamicQueryCount(dynamicQuery);
223            }
224    
225            /**
226            * Returns the number of rows matching the dynamic query.
227            *
228            * @param dynamicQuery the dynamic query
229            * @param projection the projection to apply to the query
230            * @return the number of rows matching the dynamic query
231            */
232            public static long dynamicQueryCount(
233                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
234                    com.liferay.portal.kernel.dao.orm.Projection projection) {
235                    return getService().dynamicQueryCount(dynamicQuery, projection);
236            }
237    
238            public static com.liferay.portlet.softwarecatalog.model.SCLicense fetchSCLicense(
239                    long licenseId) {
240                    return getService().fetchSCLicense(licenseId);
241            }
242    
243            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
244                    return getService().getActionableDynamicQuery();
245            }
246    
247            /**
248            * Returns the Spring bean ID for this bean.
249            *
250            * @return the Spring bean ID for this bean
251            */
252            public static java.lang.String getBeanIdentifier() {
253                    return getService().getBeanIdentifier();
254            }
255    
256            public static com.liferay.portlet.softwarecatalog.model.SCLicense getLicense(
257                    long licenseId)
258                    throws com.liferay.portal.kernel.exception.PortalException {
259                    return getService().getLicense(licenseId);
260            }
261    
262            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses() {
263                    return getService().getLicenses();
264            }
265    
266            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
267                    boolean active, boolean recommended) {
268                    return getService().getLicenses(active, recommended);
269            }
270    
271            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
272                    boolean active, boolean recommended, int start, int end) {
273                    return getService().getLicenses(active, recommended, start, end);
274            }
275    
276            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
277                    int start, int end) {
278                    return getService().getLicenses(start, end);
279            }
280    
281            public static int getLicensesCount() {
282                    return getService().getLicensesCount();
283            }
284    
285            public static int getLicensesCount(boolean active, boolean recommended) {
286                    return getService().getLicensesCount(active, recommended);
287            }
288    
289            public static com.liferay.portal.model.PersistedModel getPersistedModel(
290                    java.io.Serializable primaryKeyObj)
291                    throws com.liferay.portal.kernel.exception.PortalException {
292                    return getService().getPersistedModel(primaryKeyObj);
293            }
294    
295            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getProductEntryLicenses(
296                    long productEntryId) {
297                    return getService().getProductEntryLicenses(productEntryId);
298            }
299    
300            /**
301            * Returns the s c license with the primary key.
302            *
303            * @param licenseId the primary key of the s c license
304            * @return the s c license
305            * @throws PortalException if a s c license with the primary key could not be found
306            */
307            public static com.liferay.portlet.softwarecatalog.model.SCLicense getSCLicense(
308                    long licenseId)
309                    throws com.liferay.portal.kernel.exception.PortalException {
310                    return getService().getSCLicense(licenseId);
311            }
312    
313            /**
314            * Returns a range of all the s c licenses.
315            *
316            * <p>
317            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCLicenseModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
318            * </p>
319            *
320            * @param start the lower bound of the range of s c licenses
321            * @param end the upper bound of the range of s c licenses (not inclusive)
322            * @return the range of s c licenses
323            */
324            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
325                    int start, int end) {
326                    return getService().getSCLicenses(start, end);
327            }
328    
329            /**
330            * Returns the number of s c licenses.
331            *
332            * @return the number of s c licenses
333            */
334            public static int getSCLicensesCount() {
335                    return getService().getSCLicensesCount();
336            }
337    
338            /**
339            * Returns the productEntryIds of the s c product entries associated with the s c license.
340            *
341            * @param licenseId the licenseId of the s c license
342            * @return long[] the productEntryIds of s c product entries associated with the s c license
343            */
344            public static long[] getSCProductEntryPrimaryKeys(long licenseId) {
345                    return getService().getSCProductEntryPrimaryKeys(licenseId);
346            }
347    
348            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
349                    long productEntryId) {
350                    return getService().getSCProductEntrySCLicenses(productEntryId);
351            }
352    
353            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
354                    long productEntryId, int start, int end) {
355                    return getService()
356                                       .getSCProductEntrySCLicenses(productEntryId, start, end);
357            }
358    
359            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCProductEntrySCLicenses(
360                    long productEntryId, int start, int end,
361                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCLicense> orderByComparator) {
362                    return getService()
363                                       .getSCProductEntrySCLicenses(productEntryId, start, end,
364                            orderByComparator);
365            }
366    
367            public static int getSCProductEntrySCLicensesCount(long productEntryId) {
368                    return getService().getSCProductEntrySCLicensesCount(productEntryId);
369            }
370    
371            public static boolean hasSCProductEntrySCLicense(long productEntryId,
372                    long licenseId) {
373                    return getService().hasSCProductEntrySCLicense(productEntryId, licenseId);
374            }
375    
376            public static boolean hasSCProductEntrySCLicenses(long productEntryId) {
377                    return getService().hasSCProductEntrySCLicenses(productEntryId);
378            }
379    
380            /**
381            * Sets the Spring bean ID for this bean.
382            *
383            * @param beanIdentifier the Spring bean ID for this bean
384            */
385            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
386                    getService().setBeanIdentifier(beanIdentifier);
387            }
388    
389            public static void setSCProductEntrySCLicenses(long productEntryId,
390                    long[] licenseIds) {
391                    getService().setSCProductEntrySCLicenses(productEntryId, licenseIds);
392            }
393    
394            public static com.liferay.portlet.softwarecatalog.model.SCLicense updateLicense(
395                    long licenseId, java.lang.String name, java.lang.String url,
396                    boolean openSource, boolean active, boolean recommended)
397                    throws com.liferay.portal.kernel.exception.PortalException {
398                    return getService()
399                                       .updateLicense(licenseId, name, url, openSource, active,
400                            recommended);
401            }
402    
403            /**
404            * Updates the s c license in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
405            *
406            * @param scLicense the s c license
407            * @return the s c license that was updated
408            */
409            public static com.liferay.portlet.softwarecatalog.model.SCLicense updateSCLicense(
410                    com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
411                    return getService().updateSCLicense(scLicense);
412            }
413    
414            public static SCLicenseLocalService getService() {
415                    if (_service == null) {
416                            _service = (SCLicenseLocalService)PortalBeanLocatorUtil.locate(SCLicenseLocalService.class.getName());
417    
418                            ReferenceRegistry.registerReference(SCLicenseLocalServiceUtil.class,
419                                    "_service");
420                    }
421    
422                    return _service;
423            }
424    
425            /**
426             * @deprecated As of 6.2.0
427             */
428            @Deprecated
429            public void setService(SCLicenseLocalService service) {
430            }
431    
432            private static SCLicenseLocalService _service;
433    }