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