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