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.portal.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 Release. This utility wraps
024     * {@link com.liferay.portal.service.impl.ReleaseLocalServiceImpl} 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 ReleaseLocalService
032     * @see com.liferay.portal.service.base.ReleaseLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ReleaseLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ReleaseLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ReleaseLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the release to the database. Also notifies the appropriate model listeners.
046            *
047            * @param release the release
048            * @return the release that was added
049            */
050            public static com.liferay.portal.model.Release addRelease(
051                    com.liferay.portal.model.Release release) {
052                    return getService().addRelease(release);
053            }
054    
055            public static com.liferay.portal.model.Release addRelease(
056                    java.lang.String servletContextName, int buildNumber) {
057                    return getService().addRelease(servletContextName, buildNumber);
058            }
059    
060            /**
061            * Creates a new release with the primary key. Does not add the release to the database.
062            *
063            * @param releaseId the primary key for the new release
064            * @return the new release
065            */
066            public static com.liferay.portal.model.Release createRelease(long releaseId) {
067                    return getService().createRelease(releaseId);
068            }
069    
070            public static void createTablesAndPopulate() {
071                    getService().createTablesAndPopulate();
072            }
073    
074            /**
075            * @throws PortalException
076            */
077            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
078                    com.liferay.portal.model.PersistedModel persistedModel)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    return getService().deletePersistedModel(persistedModel);
081            }
082    
083            /**
084            * Deletes the release from the database. Also notifies the appropriate model listeners.
085            *
086            * @param release the release
087            * @return the release that was removed
088            */
089            public static com.liferay.portal.model.Release deleteRelease(
090                    com.liferay.portal.model.Release release) {
091                    return getService().deleteRelease(release);
092            }
093    
094            /**
095            * Deletes the release with the primary key from the database. Also notifies the appropriate model listeners.
096            *
097            * @param releaseId the primary key of the release
098            * @return the release that was removed
099            * @throws PortalException if a release with the primary key could not be found
100            */
101            public static com.liferay.portal.model.Release deleteRelease(long releaseId)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    return getService().deleteRelease(releaseId);
104            }
105    
106            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
107                    return getService().dynamicQuery();
108            }
109    
110            /**
111            * Performs a dynamic query on the database and returns the matching rows.
112            *
113            * @param dynamicQuery the dynamic query
114            * @return the matching rows
115            */
116            public static <T> java.util.List<T> dynamicQuery(
117                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
118                    return getService().dynamicQuery(dynamicQuery);
119            }
120    
121            /**
122            * Performs a dynamic query on the database and returns a range of the matching rows.
123            *
124            * <p>
125            * 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.portal.model.impl.ReleaseModelImpl}. 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.
126            * </p>
127            *
128            * @param dynamicQuery the dynamic query
129            * @param start the lower bound of the range of model instances
130            * @param end the upper bound of the range of model instances (not inclusive)
131            * @return the range of matching rows
132            */
133            public static <T> java.util.List<T> dynamicQuery(
134                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
135                    int end) {
136                    return getService().dynamicQuery(dynamicQuery, start, end);
137            }
138    
139            /**
140            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
141            *
142            * <p>
143            * 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.portal.model.impl.ReleaseModelImpl}. 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.
144            * </p>
145            *
146            * @param dynamicQuery the dynamic query
147            * @param start the lower bound of the range of model instances
148            * @param end the upper bound of the range of model instances (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching rows
151            */
152            public static <T> java.util.List<T> dynamicQuery(
153                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
154                    int end,
155                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
156                    return getService()
157                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the number of rows matching the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @return the number of rows matching the dynamic query
165            */
166            public static long dynamicQueryCount(
167                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
168                    return getService().dynamicQueryCount(dynamicQuery);
169            }
170    
171            /**
172            * Returns the number of rows matching the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @param projection the projection to apply to the query
176            * @return the number of rows matching the dynamic query
177            */
178            public static long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
180                    com.liferay.portal.kernel.dao.orm.Projection projection) {
181                    return getService().dynamicQueryCount(dynamicQuery, projection);
182            }
183    
184            public static com.liferay.portal.model.Release fetchRelease(long releaseId) {
185                    return getService().fetchRelease(releaseId);
186            }
187    
188            public static com.liferay.portal.model.Release fetchRelease(
189                    java.lang.String servletContextName) {
190                    return getService().fetchRelease(servletContextName);
191            }
192    
193            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
194                    return getService().getActionableDynamicQuery();
195            }
196    
197            /**
198            * Returns the Spring bean ID for this bean.
199            *
200            * @return the Spring bean ID for this bean
201            */
202            public static java.lang.String getBeanIdentifier() {
203                    return getService().getBeanIdentifier();
204            }
205    
206            public static int getBuildNumberOrCreate()
207                    throws com.liferay.portal.kernel.exception.PortalException {
208                    return getService().getBuildNumberOrCreate();
209            }
210    
211            public static com.liferay.portal.model.PersistedModel getPersistedModel(
212                    java.io.Serializable primaryKeyObj)
213                    throws com.liferay.portal.kernel.exception.PortalException {
214                    return getService().getPersistedModel(primaryKeyObj);
215            }
216    
217            /**
218            * Returns the release with the primary key.
219            *
220            * @param releaseId the primary key of the release
221            * @return the release
222            * @throws PortalException if a release with the primary key could not be found
223            */
224            public static com.liferay.portal.model.Release getRelease(long releaseId)
225                    throws com.liferay.portal.kernel.exception.PortalException {
226                    return getService().getRelease(releaseId);
227            }
228    
229            /**
230            * Returns a range of all the releases.
231            *
232            * <p>
233            * 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.portal.model.impl.ReleaseModelImpl}. 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.
234            * </p>
235            *
236            * @param start the lower bound of the range of releases
237            * @param end the upper bound of the range of releases (not inclusive)
238            * @return the range of releases
239            */
240            public static java.util.List<com.liferay.portal.model.Release> getReleases(
241                    int start, int end) {
242                    return getService().getReleases(start, end);
243            }
244    
245            /**
246            * Returns the number of releases.
247            *
248            * @return the number of releases
249            */
250            public static int getReleasesCount() {
251                    return getService().getReleasesCount();
252            }
253    
254            /**
255            * Sets the Spring bean ID for this bean.
256            *
257            * @param beanIdentifier the Spring bean ID for this bean
258            */
259            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
260                    getService().setBeanIdentifier(beanIdentifier);
261            }
262    
263            /**
264            * Updates the release in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
265            *
266            * @param release the release
267            * @return the release that was updated
268            */
269            public static com.liferay.portal.model.Release updateRelease(
270                    com.liferay.portal.model.Release release) {
271                    return getService().updateRelease(release);
272            }
273    
274            public static com.liferay.portal.model.Release updateRelease(
275                    long releaseId, int buildNumber, java.util.Date buildDate,
276                    boolean verified)
277                    throws com.liferay.portal.kernel.exception.PortalException {
278                    return getService()
279                                       .updateRelease(releaseId, buildNumber, buildDate, verified);
280            }
281    
282            public static void updateRelease(java.lang.String servletContextName,
283                    java.util.List<com.liferay.portal.kernel.upgrade.UpgradeProcess> upgradeProcesses,
284                    int buildNumber, int previousBuildNumber, boolean indexOnUpgrade)
285                    throws com.liferay.portal.kernel.exception.PortalException {
286                    getService()
287                            .updateRelease(servletContextName, upgradeProcesses, buildNumber,
288                            previousBuildNumber, indexOnUpgrade);
289            }
290    
291            public static void updateRelease(java.lang.String servletContextName,
292                    java.util.List<com.liferay.portal.kernel.upgrade.UpgradeProcess> upgradeProcesses,
293                    java.util.Properties unfilteredPortalProperties)
294                    throws java.lang.Exception {
295                    getService()
296                            .updateRelease(servletContextName, upgradeProcesses,
297                            unfilteredPortalProperties);
298            }
299    
300            public static ReleaseLocalService getService() {
301                    if (_service == null) {
302                            _service = (ReleaseLocalService)PortalBeanLocatorUtil.locate(ReleaseLocalService.class.getName());
303    
304                            ReferenceRegistry.registerReference(ReleaseLocalServiceUtil.class,
305                                    "_service");
306                    }
307    
308                    return _service;
309            }
310    
311            /**
312             * @deprecated As of 6.2.0
313             */
314            @Deprecated
315            public void setService(ReleaseLocalService service) {
316            }
317    
318            private static ReleaseLocalService _service;
319    }