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 SCProductEntry. This utility wraps
024     * {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl} 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 SCProductEntryLocalService
032     * @see com.liferay.portlet.softwarecatalog.service.base.SCProductEntryLocalServiceBaseImpl
033     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SCProductEntryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
044                    long userId, java.lang.String name, java.lang.String type,
045                    java.lang.String tags, java.lang.String shortDescription,
046                    java.lang.String longDescription, java.lang.String pageURL,
047                    java.lang.String author, java.lang.String repoGroupId,
048                    java.lang.String repoArtifactId, long[] licenseIds,
049                    java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService()
053                                       .addProductEntry(userId, name, type, tags, shortDescription,
054                            longDescription, pageURL, author, repoGroupId, repoArtifactId,
055                            licenseIds, thumbnails, fullImages, serviceContext);
056            }
057    
058            public static void addProductEntryResources(
059                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
060                    boolean addGroupPermissions, boolean addGuestPermissions)
061                    throws com.liferay.portal.kernel.exception.PortalException {
062                    getService()
063                            .addProductEntryResources(productEntry, addGroupPermissions,
064                            addGuestPermissions);
065            }
066    
067            public static void addProductEntryResources(
068                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
069                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
070                    throws com.liferay.portal.kernel.exception.PortalException {
071                    getService()
072                            .addProductEntryResources(productEntry, groupPermissions,
073                            guestPermissions);
074            }
075    
076            public static void addProductEntryResources(long productEntryId,
077                    boolean addGroupPermissions, boolean addGuestPermissions)
078                    throws com.liferay.portal.kernel.exception.PortalException {
079                    getService()
080                            .addProductEntryResources(productEntryId, addGroupPermissions,
081                            addGuestPermissions);
082            }
083    
084            public static void addProductEntryResources(long productEntryId,
085                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    getService()
088                            .addProductEntryResources(productEntryId, groupPermissions,
089                            guestPermissions);
090            }
091    
092            public static void addSCLicenseSCProductEntries(long licenseId,
093                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> SCProductEntries) {
094                    getService().addSCLicenseSCProductEntries(licenseId, SCProductEntries);
095            }
096    
097            public static void addSCLicenseSCProductEntries(long licenseId,
098                    long[] productEntryIds) {
099                    getService().addSCLicenseSCProductEntries(licenseId, productEntryIds);
100            }
101    
102            public static void addSCLicenseSCProductEntry(long licenseId,
103                    long productEntryId) {
104                    getService().addSCLicenseSCProductEntry(licenseId, productEntryId);
105            }
106    
107            public static void addSCLicenseSCProductEntry(long licenseId,
108                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
109                    getService().addSCLicenseSCProductEntry(licenseId, scProductEntry);
110            }
111    
112            /**
113            * Adds the s c product entry to the database. Also notifies the appropriate model listeners.
114            *
115            * @param scProductEntry the s c product entry
116            * @return the s c product entry that was added
117            */
118            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry addSCProductEntry(
119                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
120                    return getService().addSCProductEntry(scProductEntry);
121            }
122    
123            public static void clearSCLicenseSCProductEntries(long licenseId) {
124                    getService().clearSCLicenseSCProductEntries(licenseId);
125            }
126    
127            /**
128            * Creates a new s c product entry with the primary key. Does not add the s c product entry to the database.
129            *
130            * @param productEntryId the primary key for the new s c product entry
131            * @return the new s c product entry
132            */
133            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry createSCProductEntry(
134                    long productEntryId) {
135                    return getService().createSCProductEntry(productEntryId);
136            }
137    
138            /**
139            * @throws PortalException
140            */
141            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
142                    com.liferay.portal.model.PersistedModel persistedModel)
143                    throws com.liferay.portal.kernel.exception.PortalException {
144                    return getService().deletePersistedModel(persistedModel);
145            }
146    
147            public static void deleteProductEntries(long groupId)
148                    throws com.liferay.portal.kernel.exception.PortalException {
149                    getService().deleteProductEntries(groupId);
150            }
151    
152            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteProductEntry(
153                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    return getService().deleteProductEntry(productEntry);
156            }
157    
158            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteProductEntry(
159                    long productEntryId)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    return getService().deleteProductEntry(productEntryId);
162            }
163    
164            public static void deleteSCLicenseSCProductEntries(long licenseId,
165                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> SCProductEntries) {
166                    getService().deleteSCLicenseSCProductEntries(licenseId, SCProductEntries);
167            }
168    
169            public static void deleteSCLicenseSCProductEntries(long licenseId,
170                    long[] productEntryIds) {
171                    getService().deleteSCLicenseSCProductEntries(licenseId, productEntryIds);
172            }
173    
174            public static void deleteSCLicenseSCProductEntry(long licenseId,
175                    long productEntryId) {
176                    getService().deleteSCLicenseSCProductEntry(licenseId, productEntryId);
177            }
178    
179            public static void deleteSCLicenseSCProductEntry(long licenseId,
180                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
181                    getService().deleteSCLicenseSCProductEntry(licenseId, scProductEntry);
182            }
183    
184            /**
185            * Deletes the s c product entry with the primary key from the database. Also notifies the appropriate model listeners.
186            *
187            * @param productEntryId the primary key of the s c product entry
188            * @return the s c product entry that was removed
189            * @throws PortalException if a s c product entry with the primary key could not be found
190            */
191            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteSCProductEntry(
192                    long productEntryId)
193                    throws com.liferay.portal.kernel.exception.PortalException {
194                    return getService().deleteSCProductEntry(productEntryId);
195            }
196    
197            /**
198            * Deletes the s c product entry from the database. Also notifies the appropriate model listeners.
199            *
200            * @param scProductEntry the s c product entry
201            * @return the s c product entry that was removed
202            */
203            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteSCProductEntry(
204                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
205                    return getService().deleteSCProductEntry(scProductEntry);
206            }
207    
208            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
209                    return getService().dynamicQuery();
210            }
211    
212            /**
213            * Performs a dynamic query on the database and returns the matching rows.
214            *
215            * @param dynamicQuery the dynamic query
216            * @return the matching rows
217            */
218            public static <T> java.util.List<T> dynamicQuery(
219                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
220                    return getService().dynamicQuery(dynamicQuery);
221            }
222    
223            /**
224            * Performs a dynamic query on the database and returns a range of the matching rows.
225            *
226            * <p>
227            * 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.SCProductEntryModelImpl}. 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.
228            * </p>
229            *
230            * @param dynamicQuery the dynamic query
231            * @param start the lower bound of the range of model instances
232            * @param end the upper bound of the range of model instances (not inclusive)
233            * @return the range of matching rows
234            */
235            public static <T> java.util.List<T> dynamicQuery(
236                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
237                    int end) {
238                    return getService().dynamicQuery(dynamicQuery, start, end);
239            }
240    
241            /**
242            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
243            *
244            * <p>
245            * 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.SCProductEntryModelImpl}. 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.
246            * </p>
247            *
248            * @param dynamicQuery the dynamic query
249            * @param start the lower bound of the range of model instances
250            * @param end the upper bound of the range of model instances (not inclusive)
251            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
252            * @return the ordered range of matching rows
253            */
254            public static <T> java.util.List<T> dynamicQuery(
255                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
256                    int end,
257                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
258                    return getService()
259                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
260            }
261    
262            /**
263            * Returns the number of rows matching the dynamic query.
264            *
265            * @param dynamicQuery the dynamic query
266            * @return the number of rows matching the dynamic query
267            */
268            public static long dynamicQueryCount(
269                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
270                    return getService().dynamicQueryCount(dynamicQuery);
271            }
272    
273            /**
274            * Returns the number of rows matching the dynamic query.
275            *
276            * @param dynamicQuery the dynamic query
277            * @param projection the projection to apply to the query
278            * @return the number of rows matching the dynamic query
279            */
280            public static long dynamicQueryCount(
281                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
282                    com.liferay.portal.kernel.dao.orm.Projection projection) {
283                    return getService().dynamicQueryCount(dynamicQuery, projection);
284            }
285    
286            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchSCProductEntry(
287                    long productEntryId) {
288                    return getService().fetchSCProductEntry(productEntryId);
289            }
290    
291            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
292                    return getService().getActionableDynamicQuery();
293            }
294    
295            /**
296            * Returns the Spring bean ID for this bean.
297            *
298            * @return the Spring bean ID for this bean
299            */
300            public static java.lang.String getBeanIdentifier() {
301                    return getService().getBeanIdentifier();
302            }
303    
304            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getCompanyProductEntries(
305                    long companyId, int start, int end) {
306                    return getService().getCompanyProductEntries(companyId, start, end);
307            }
308    
309            public static int getCompanyProductEntriesCount(long companyId) {
310                    return getService().getCompanyProductEntriesCount(companyId);
311            }
312    
313            public static com.liferay.portal.model.PersistedModel getPersistedModel(
314                    java.io.Serializable primaryKeyObj)
315                    throws com.liferay.portal.kernel.exception.PortalException {
316                    return getService().getPersistedModel(primaryKeyObj);
317            }
318    
319            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
320                    long groupId, int start, int end) {
321                    return getService().getProductEntries(groupId, start, end);
322            }
323    
324            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
325                    long groupId, int start, int end,
326                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> obc) {
327                    return getService().getProductEntries(groupId, start, end, obc);
328            }
329    
330            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
331                    long groupId, long userId, int start, int end) {
332                    return getService().getProductEntries(groupId, userId, start, end);
333            }
334    
335            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
336                    long groupId, long userId, int start, int end,
337                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> obc) {
338                    return getService().getProductEntries(groupId, userId, start, end, obc);
339            }
340    
341            public static int getProductEntriesCount(long groupId) {
342                    return getService().getProductEntriesCount(groupId);
343            }
344    
345            public static int getProductEntriesCount(long groupId, long userId) {
346                    return getService().getProductEntriesCount(groupId, userId);
347            }
348    
349            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
350                    long productEntryId)
351                    throws com.liferay.portal.kernel.exception.PortalException {
352                    return getService().getProductEntry(productEntryId);
353            }
354    
355            public static java.lang.String getRepositoryXML(long groupId,
356                    java.lang.String baseImageURL, java.util.Date oldestDate,
357                    int maxNumOfVersions, java.util.Properties repoSettings) {
358                    return getService()
359                                       .getRepositoryXML(groupId, baseImageURL, oldestDate,
360                            maxNumOfVersions, repoSettings);
361            }
362    
363            public static java.lang.String getRepositoryXML(long groupId,
364                    java.lang.String version, java.lang.String baseImageURL,
365                    java.util.Date oldestDate, int maxNumOfVersions,
366                    java.util.Properties repoSettings) {
367                    return getService()
368                                       .getRepositoryXML(groupId, version, baseImageURL,
369                            oldestDate, maxNumOfVersions, repoSettings);
370            }
371    
372            /**
373            * Returns the licenseIds of the s c licenses associated with the s c product entry.
374            *
375            * @param productEntryId the productEntryId of the s c product entry
376            * @return long[] the licenseIds of s c licenses associated with the s c product entry
377            */
378            public static long[] getSCLicensePrimaryKeys(long productEntryId) {
379                    return getService().getSCLicensePrimaryKeys(productEntryId);
380            }
381    
382            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
383                    long licenseId) {
384                    return getService().getSCLicenseSCProductEntries(licenseId);
385            }
386    
387            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
388                    long licenseId, int start, int end) {
389                    return getService().getSCLicenseSCProductEntries(licenseId, start, end);
390            }
391    
392            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
393                    long licenseId, int start, int end,
394                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> orderByComparator) {
395                    return getService()
396                                       .getSCLicenseSCProductEntries(licenseId, start, end,
397                            orderByComparator);
398            }
399    
400            public static int getSCLicenseSCProductEntriesCount(long licenseId) {
401                    return getService().getSCLicenseSCProductEntriesCount(licenseId);
402            }
403    
404            /**
405            * Returns a range of all the s c product entries.
406            *
407            * <p>
408            * 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.SCProductEntryModelImpl}. 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.
409            * </p>
410            *
411            * @param start the lower bound of the range of s c product entries
412            * @param end the upper bound of the range of s c product entries (not inclusive)
413            * @return the range of s c product entries
414            */
415            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
416                    int start, int end) {
417                    return getService().getSCProductEntries(start, end);
418            }
419    
420            /**
421            * Returns the number of s c product entries.
422            *
423            * @return the number of s c product entries
424            */
425            public static int getSCProductEntriesCount() {
426                    return getService().getSCProductEntriesCount();
427            }
428    
429            /**
430            * Returns the s c product entry with the primary key.
431            *
432            * @param productEntryId the primary key of the s c product entry
433            * @return the s c product entry
434            * @throws PortalException if a s c product entry with the primary key could not be found
435            */
436            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry getSCProductEntry(
437                    long productEntryId)
438                    throws com.liferay.portal.kernel.exception.PortalException {
439                    return getService().getSCProductEntry(productEntryId);
440            }
441    
442            public static boolean hasSCLicenseSCProductEntries(long licenseId) {
443                    return getService().hasSCLicenseSCProductEntries(licenseId);
444            }
445    
446            public static boolean hasSCLicenseSCProductEntry(long licenseId,
447                    long productEntryId) {
448                    return getService().hasSCLicenseSCProductEntry(licenseId, productEntryId);
449            }
450    
451            /**
452            * Sets the Spring bean ID for this bean.
453            *
454            * @param beanIdentifier the Spring bean ID for this bean
455            */
456            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
457                    getService().setBeanIdentifier(beanIdentifier);
458            }
459    
460            public static void setSCLicenseSCProductEntries(long licenseId,
461                    long[] productEntryIds) {
462                    getService().setSCLicenseSCProductEntries(licenseId, productEntryIds);
463            }
464    
465            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
466                    long productEntryId, java.lang.String name, java.lang.String type,
467                    java.lang.String tags, java.lang.String shortDescription,
468                    java.lang.String longDescription, java.lang.String pageURL,
469                    java.lang.String author, java.lang.String repoGroupId,
470                    java.lang.String repoArtifactId, long[] licenseIds,
471                    java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages)
472                    throws com.liferay.portal.kernel.exception.PortalException {
473                    return getService()
474                                       .updateProductEntry(productEntryId, name, type, tags,
475                            shortDescription, longDescription, pageURL, author, repoGroupId,
476                            repoArtifactId, licenseIds, thumbnails, fullImages);
477            }
478    
479            /**
480            * Updates the s c product entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
481            *
482            * @param scProductEntry the s c product entry
483            * @return the s c product entry that was updated
484            */
485            public static com.liferay.portlet.softwarecatalog.model.SCProductEntry updateSCProductEntry(
486                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) {
487                    return getService().updateSCProductEntry(scProductEntry);
488            }
489    
490            public static SCProductEntryLocalService getService() {
491                    if (_service == null) {
492                            _service = (SCProductEntryLocalService)PortalBeanLocatorUtil.locate(SCProductEntryLocalService.class.getName());
493    
494                            ReferenceRegistry.registerReference(SCProductEntryLocalServiceUtil.class,
495                                    "_service");
496                    }
497    
498                    return _service;
499            }
500    
501            /**
502             * @deprecated As of 6.2.0
503             */
504            @Deprecated
505            public void setService(SCProductEntryLocalService service) {
506            }
507    
508            private static SCProductEntryLocalService _service;
509    }