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 SCProductVersion. This utility wraps
024     * {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionLocalServiceImpl} 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 SCProductVersionLocalService
032     * @see com.liferay.portlet.softwarecatalog.service.base.SCProductVersionLocalServiceBaseImpl
033     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SCProductVersionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
044                    long userId, long productEntryId, java.lang.String version,
045                    java.lang.String changeLog, java.lang.String downloadPageURL,
046                    java.lang.String directDownloadURL, boolean testDirectDownloadURL,
047                    boolean repoStoreArtifact, long[] frameworkVersionIds,
048                    com.liferay.portal.service.ServiceContext serviceContext)
049                    throws com.liferay.portal.kernel.exception.PortalException {
050                    return getService()
051                                       .addProductVersion(userId, productEntryId, version,
052                            changeLog, downloadPageURL, directDownloadURL,
053                            testDirectDownloadURL, repoStoreArtifact, frameworkVersionIds,
054                            serviceContext);
055            }
056    
057            public static void addSCFrameworkVersionSCProductVersion(
058                    long frameworkVersionId, long productVersionId) {
059                    getService()
060                            .addSCFrameworkVersionSCProductVersion(frameworkVersionId,
061                            productVersionId);
062            }
063    
064            public static void addSCFrameworkVersionSCProductVersion(
065                    long frameworkVersionId,
066                    com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion) {
067                    getService()
068                            .addSCFrameworkVersionSCProductVersion(frameworkVersionId,
069                            scProductVersion);
070            }
071    
072            public static void addSCFrameworkVersionSCProductVersions(
073                    long frameworkVersionId,
074                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> SCProductVersions) {
075                    getService()
076                            .addSCFrameworkVersionSCProductVersions(frameworkVersionId,
077                            SCProductVersions);
078            }
079    
080            public static void addSCFrameworkVersionSCProductVersions(
081                    long frameworkVersionId, long[] productVersionIds) {
082                    getService()
083                            .addSCFrameworkVersionSCProductVersions(frameworkVersionId,
084                            productVersionIds);
085            }
086    
087            /**
088            * Adds the s c product version to the database. Also notifies the appropriate model listeners.
089            *
090            * @param scProductVersion the s c product version
091            * @return the s c product version that was added
092            */
093            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addSCProductVersion(
094                    com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion) {
095                    return getService().addSCProductVersion(scProductVersion);
096            }
097    
098            public static void clearSCFrameworkVersionSCProductVersions(
099                    long frameworkVersionId) {
100                    getService().clearSCFrameworkVersionSCProductVersions(frameworkVersionId);
101            }
102    
103            /**
104            * Creates a new s c product version with the primary key. Does not add the s c product version to the database.
105            *
106            * @param productVersionId the primary key for the new s c product version
107            * @return the new s c product version
108            */
109            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion createSCProductVersion(
110                    long productVersionId) {
111                    return getService().createSCProductVersion(productVersionId);
112            }
113    
114            /**
115            * @throws PortalException
116            */
117            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
118                    com.liferay.portal.model.PersistedModel persistedModel)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    return getService().deletePersistedModel(persistedModel);
121            }
122    
123            public static void deleteProductVersion(
124                    com.liferay.portlet.softwarecatalog.model.SCProductVersion productVersion) {
125                    getService().deleteProductVersion(productVersion);
126            }
127    
128            public static void deleteProductVersion(long productVersionId)
129                    throws com.liferay.portal.kernel.exception.PortalException {
130                    getService().deleteProductVersion(productVersionId);
131            }
132    
133            public static void deleteProductVersions(long productEntryId) {
134                    getService().deleteProductVersions(productEntryId);
135            }
136    
137            public static void deleteSCFrameworkVersionSCProductVersion(
138                    long frameworkVersionId, long productVersionId) {
139                    getService()
140                            .deleteSCFrameworkVersionSCProductVersion(frameworkVersionId,
141                            productVersionId);
142            }
143    
144            public static void deleteSCFrameworkVersionSCProductVersion(
145                    long frameworkVersionId,
146                    com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion) {
147                    getService()
148                            .deleteSCFrameworkVersionSCProductVersion(frameworkVersionId,
149                            scProductVersion);
150            }
151    
152            public static void deleteSCFrameworkVersionSCProductVersions(
153                    long frameworkVersionId,
154                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> SCProductVersions) {
155                    getService()
156                            .deleteSCFrameworkVersionSCProductVersions(frameworkVersionId,
157                            SCProductVersions);
158            }
159    
160            public static void deleteSCFrameworkVersionSCProductVersions(
161                    long frameworkVersionId, long[] productVersionIds) {
162                    getService()
163                            .deleteSCFrameworkVersionSCProductVersions(frameworkVersionId,
164                            productVersionIds);
165            }
166    
167            /**
168            * Deletes the s c product version with the primary key from the database. Also notifies the appropriate model listeners.
169            *
170            * @param productVersionId the primary key of the s c product version
171            * @return the s c product version that was removed
172            * @throws PortalException if a s c product version with the primary key could not be found
173            */
174            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion deleteSCProductVersion(
175                    long productVersionId)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    return getService().deleteSCProductVersion(productVersionId);
178            }
179    
180            /**
181            * Deletes the s c product version from the database. Also notifies the appropriate model listeners.
182            *
183            * @param scProductVersion the s c product version
184            * @return the s c product version that was removed
185            */
186            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion deleteSCProductVersion(
187                    com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion) {
188                    return getService().deleteSCProductVersion(scProductVersion);
189            }
190    
191            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
192                    return getService().dynamicQuery();
193            }
194    
195            /**
196            * Performs a dynamic query on the database and returns the matching rows.
197            *
198            * @param dynamicQuery the dynamic query
199            * @return the matching rows
200            */
201            public static <T> java.util.List<T> dynamicQuery(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
203                    return getService().dynamicQuery(dynamicQuery);
204            }
205    
206            /**
207            * Performs a dynamic query on the database and returns a range of the matching rows.
208            *
209            * <p>
210            * 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.SCProductVersionModelImpl}. 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.
211            * </p>
212            *
213            * @param dynamicQuery the dynamic query
214            * @param start the lower bound of the range of model instances
215            * @param end the upper bound of the range of model instances (not inclusive)
216            * @return the range of matching rows
217            */
218            public static <T> java.util.List<T> dynamicQuery(
219                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
220                    int end) {
221                    return getService().dynamicQuery(dynamicQuery, start, end);
222            }
223    
224            /**
225            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
226            *
227            * <p>
228            * 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.SCProductVersionModelImpl}. 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.
229            * </p>
230            *
231            * @param dynamicQuery the dynamic query
232            * @param start the lower bound of the range of model instances
233            * @param end the upper bound of the range of model instances (not inclusive)
234            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235            * @return the ordered range of matching rows
236            */
237            public static <T> java.util.List<T> dynamicQuery(
238                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
239                    int end,
240                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
241                    return getService()
242                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
243            }
244    
245            /**
246            * Returns the number of rows matching the dynamic query.
247            *
248            * @param dynamicQuery the dynamic query
249            * @return the number of rows matching the dynamic query
250            */
251            public static long dynamicQueryCount(
252                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
253                    return getService().dynamicQueryCount(dynamicQuery);
254            }
255    
256            /**
257            * Returns the number of rows matching the dynamic query.
258            *
259            * @param dynamicQuery the dynamic query
260            * @param projection the projection to apply to the query
261            * @return the number of rows matching the dynamic query
262            */
263            public static long dynamicQueryCount(
264                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
265                    com.liferay.portal.kernel.dao.orm.Projection projection) {
266                    return getService().dynamicQueryCount(dynamicQuery, projection);
267            }
268    
269            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion fetchSCProductVersion(
270                    long productVersionId) {
271                    return getService().fetchSCProductVersion(productVersionId);
272            }
273    
274            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
275                    return getService().getActionableDynamicQuery();
276            }
277    
278            /**
279            * Returns the OSGi service identifier.
280            *
281            * @return the OSGi service identifier
282            */
283            public static java.lang.String getOSGiServiceIdentifier() {
284                    return getService().getOSGiServiceIdentifier();
285            }
286    
287            public static com.liferay.portal.model.PersistedModel getPersistedModel(
288                    java.io.Serializable primaryKeyObj)
289                    throws com.liferay.portal.kernel.exception.PortalException {
290                    return getService().getPersistedModel(primaryKeyObj);
291            }
292    
293            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersion(
294                    long productVersionId)
295                    throws com.liferay.portal.kernel.exception.PortalException {
296                    return getService().getProductVersion(productVersionId);
297            }
298    
299            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersionByDirectDownloadURL(
300                    java.lang.String directDownloadURL)
301                    throws com.liferay.portal.kernel.exception.PortalException {
302                    return getService()
303                                       .getProductVersionByDirectDownloadURL(directDownloadURL);
304            }
305    
306            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getProductVersions(
307                    long productEntryId, int start, int end) {
308                    return getService().getProductVersions(productEntryId, start, end);
309            }
310    
311            public static int getProductVersionsCount(long productEntryId) {
312                    return getService().getProductVersionsCount(productEntryId);
313            }
314    
315            /**
316            * Returns the frameworkVersionIds of the s c framework versions associated with the s c product version.
317            *
318            * @param productVersionId the productVersionId of the s c product version
319            * @return long[] the frameworkVersionIds of s c framework versions associated with the s c product version
320            */
321            public static long[] getSCFrameworkVersionPrimaryKeys(long productVersionId) {
322                    return getService().getSCFrameworkVersionPrimaryKeys(productVersionId);
323            }
324    
325            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCFrameworkVersionSCProductVersions(
326                    long frameworkVersionId) {
327                    return getService()
328                                       .getSCFrameworkVersionSCProductVersions(frameworkVersionId);
329            }
330    
331            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCFrameworkVersionSCProductVersions(
332                    long frameworkVersionId, int start, int end) {
333                    return getService()
334                                       .getSCFrameworkVersionSCProductVersions(frameworkVersionId,
335                            start, end);
336            }
337    
338            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCFrameworkVersionSCProductVersions(
339                    long frameworkVersionId, int start, int end,
340                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductVersion> orderByComparator) {
341                    return getService()
342                                       .getSCFrameworkVersionSCProductVersions(frameworkVersionId,
343                            start, end, orderByComparator);
344            }
345    
346            public static int getSCFrameworkVersionSCProductVersionsCount(
347                    long frameworkVersionId) {
348                    return getService()
349                                       .getSCFrameworkVersionSCProductVersionsCount(frameworkVersionId);
350            }
351    
352            /**
353            * Returns the s c product version with the primary key.
354            *
355            * @param productVersionId the primary key of the s c product version
356            * @return the s c product version
357            * @throws PortalException if a s c product version with the primary key could not be found
358            */
359            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getSCProductVersion(
360                    long productVersionId)
361                    throws com.liferay.portal.kernel.exception.PortalException {
362                    return getService().getSCProductVersion(productVersionId);
363            }
364    
365            /**
366            * Returns a range of all the s c product versions.
367            *
368            * <p>
369            * 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.SCProductVersionModelImpl}. 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.
370            * </p>
371            *
372            * @param start the lower bound of the range of s c product versions
373            * @param end the upper bound of the range of s c product versions (not inclusive)
374            * @return the range of s c product versions
375            */
376            public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductVersion> getSCProductVersions(
377                    int start, int end) {
378                    return getService().getSCProductVersions(start, end);
379            }
380    
381            /**
382            * Returns the number of s c product versions.
383            *
384            * @return the number of s c product versions
385            */
386            public static int getSCProductVersionsCount() {
387                    return getService().getSCProductVersionsCount();
388            }
389    
390            public static boolean hasSCFrameworkVersionSCProductVersion(
391                    long frameworkVersionId, long productVersionId) {
392                    return getService()
393                                       .hasSCFrameworkVersionSCProductVersion(frameworkVersionId,
394                            productVersionId);
395            }
396    
397            public static boolean hasSCFrameworkVersionSCProductVersions(
398                    long frameworkVersionId) {
399                    return getService()
400                                       .hasSCFrameworkVersionSCProductVersions(frameworkVersionId);
401            }
402    
403            public static void setSCFrameworkVersionSCProductVersions(
404                    long frameworkVersionId, long[] productVersionIds) {
405                    getService()
406                            .setSCFrameworkVersionSCProductVersions(frameworkVersionId,
407                            productVersionIds);
408            }
409    
410            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateProductVersion(
411                    long productVersionId, java.lang.String version,
412                    java.lang.String changeLog, java.lang.String downloadPageURL,
413                    java.lang.String directDownloadURL, boolean testDirectDownloadURL,
414                    boolean repoStoreArtifact, long[] frameworkVersionIds)
415                    throws com.liferay.portal.kernel.exception.PortalException {
416                    return getService()
417                                       .updateProductVersion(productVersionId, version, changeLog,
418                            downloadPageURL, directDownloadURL, testDirectDownloadURL,
419                            repoStoreArtifact, frameworkVersionIds);
420            }
421    
422            /**
423            * Updates the s c product version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
424            *
425            * @param scProductVersion the s c product version
426            * @return the s c product version that was updated
427            */
428            public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateSCProductVersion(
429                    com.liferay.portlet.softwarecatalog.model.SCProductVersion scProductVersion) {
430                    return getService().updateSCProductVersion(scProductVersion);
431            }
432    
433            public static SCProductVersionLocalService getService() {
434                    if (_service == null) {
435                            _service = (SCProductVersionLocalService)PortalBeanLocatorUtil.locate(SCProductVersionLocalService.class.getName());
436    
437                            ReferenceRegistry.registerReference(SCProductVersionLocalServiceUtil.class,
438                                    "_service");
439                    }
440    
441                    return _service;
442            }
443    
444            /**
445             * @deprecated As of 6.2.0
446             */
447            @Deprecated
448            public void setService(SCProductVersionLocalService service) {
449            }
450    
451            private static SCProductVersionLocalService _service;
452    }