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            public static com.liferay.portal.model.Release addRelease(
061                    java.lang.String servletContextName, java.lang.String schemaVersion) {
062                    return getService().addRelease(servletContextName, schemaVersion);
063            }
064    
065            /**
066            * Creates a new release with the primary key. Does not add the release to the database.
067            *
068            * @param releaseId the primary key for the new release
069            * @return the new release
070            */
071            public static com.liferay.portal.model.Release createRelease(long releaseId) {
072                    return getService().createRelease(releaseId);
073            }
074    
075            public static void createTablesAndPopulate() {
076                    getService().createTablesAndPopulate();
077            }
078    
079            /**
080            * @throws PortalException
081            */
082            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
083                    com.liferay.portal.model.PersistedModel persistedModel)
084                    throws com.liferay.portal.kernel.exception.PortalException {
085                    return getService().deletePersistedModel(persistedModel);
086            }
087    
088            /**
089            * Deletes the release from the database. Also notifies the appropriate model listeners.
090            *
091            * @param release the release
092            * @return the release that was removed
093            */
094            public static com.liferay.portal.model.Release deleteRelease(
095                    com.liferay.portal.model.Release release) {
096                    return getService().deleteRelease(release);
097            }
098    
099            /**
100            * Deletes the release with the primary key from the database. Also notifies the appropriate model listeners.
101            *
102            * @param releaseId the primary key of the release
103            * @return the release that was removed
104            * @throws PortalException if a release with the primary key could not be found
105            */
106            public static com.liferay.portal.model.Release deleteRelease(long releaseId)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    return getService().deleteRelease(releaseId);
109            }
110    
111            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
112                    return getService().dynamicQuery();
113            }
114    
115            /**
116            * Performs a dynamic query on the database and returns the matching rows.
117            *
118            * @param dynamicQuery the dynamic query
119            * @return the matching rows
120            */
121            public static <T> java.util.List<T> dynamicQuery(
122                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
123                    return getService().dynamicQuery(dynamicQuery);
124            }
125    
126            /**
127            * Performs a dynamic query on the database and returns a range of the matching rows.
128            *
129            * <p>
130            * 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.
131            * </p>
132            *
133            * @param dynamicQuery the dynamic query
134            * @param start the lower bound of the range of model instances
135            * @param end the upper bound of the range of model instances (not inclusive)
136            * @return the range of matching rows
137            */
138            public static <T> java.util.List<T> dynamicQuery(
139                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
140                    int end) {
141                    return getService().dynamicQuery(dynamicQuery, start, end);
142            }
143    
144            /**
145            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
146            *
147            * <p>
148            * 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.
149            * </p>
150            *
151            * @param dynamicQuery the dynamic query
152            * @param start the lower bound of the range of model instances
153            * @param end the upper bound of the range of model instances (not inclusive)
154            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
155            * @return the ordered range of matching rows
156            */
157            public static <T> java.util.List<T> dynamicQuery(
158                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
159                    int end,
160                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
161                    return getService()
162                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
163            }
164    
165            /**
166            * Returns the number of rows matching the dynamic query.
167            *
168            * @param dynamicQuery the dynamic query
169            * @return the number of rows matching the dynamic query
170            */
171            public static long dynamicQueryCount(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
173                    return getService().dynamicQueryCount(dynamicQuery);
174            }
175    
176            /**
177            * Returns the number of rows matching the dynamic query.
178            *
179            * @param dynamicQuery the dynamic query
180            * @param projection the projection to apply to the query
181            * @return the number of rows matching the dynamic query
182            */
183            public static long dynamicQueryCount(
184                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
185                    com.liferay.portal.kernel.dao.orm.Projection projection) {
186                    return getService().dynamicQueryCount(dynamicQuery, projection);
187            }
188    
189            public static com.liferay.portal.model.Release fetchRelease(long releaseId) {
190                    return getService().fetchRelease(releaseId);
191            }
192    
193            public static com.liferay.portal.model.Release fetchRelease(
194                    java.lang.String servletContextName) {
195                    return getService().fetchRelease(servletContextName);
196            }
197    
198            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
199                    return getService().getActionableDynamicQuery();
200            }
201    
202            public static int getBuildNumberOrCreate()
203                    throws com.liferay.portal.kernel.exception.PortalException {
204                    return getService().getBuildNumberOrCreate();
205            }
206    
207            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
208                    return getService().getIndexableActionableDynamicQuery();
209            }
210    
211            /**
212            * Returns the OSGi service identifier.
213            *
214            * @return the OSGi service identifier
215            */
216            public static java.lang.String getOSGiServiceIdentifier() {
217                    return getService().getOSGiServiceIdentifier();
218            }
219    
220            public static com.liferay.portal.model.PersistedModel getPersistedModel(
221                    java.io.Serializable primaryKeyObj)
222                    throws com.liferay.portal.kernel.exception.PortalException {
223                    return getService().getPersistedModel(primaryKeyObj);
224            }
225    
226            /**
227            * Returns the release with the primary key.
228            *
229            * @param releaseId the primary key of the release
230            * @return the release
231            * @throws PortalException if a release with the primary key could not be found
232            */
233            public static com.liferay.portal.model.Release getRelease(long releaseId)
234                    throws com.liferay.portal.kernel.exception.PortalException {
235                    return getService().getRelease(releaseId);
236            }
237    
238            /**
239            * Returns a range of all the releases.
240            *
241            * <p>
242            * 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.
243            * </p>
244            *
245            * @param start the lower bound of the range of releases
246            * @param end the upper bound of the range of releases (not inclusive)
247            * @return the range of releases
248            */
249            public static java.util.List<com.liferay.portal.model.Release> getReleases(
250                    int start, int end) {
251                    return getService().getReleases(start, end);
252            }
253    
254            /**
255            * Returns the number of releases.
256            *
257            * @return the number of releases
258            */
259            public static int getReleasesCount() {
260                    return getService().getReleasesCount();
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.lang.String schemaVersion, java.lang.String previousSchemaVersion) {
284                    getService()
285                            .updateRelease(servletContextName, schemaVersion,
286                            previousSchemaVersion);
287            }
288    
289            public static void updateRelease(java.lang.String servletContextName,
290                    java.util.List<com.liferay.portal.kernel.upgrade.UpgradeProcess> upgradeProcesses,
291                    int buildNumber, int previousBuildNumber, boolean indexOnUpgrade)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    getService()
294                            .updateRelease(servletContextName, upgradeProcesses, buildNumber,
295                            previousBuildNumber, indexOnUpgrade);
296            }
297    
298            public static void updateRelease(java.lang.String servletContextName,
299                    java.util.List<com.liferay.portal.kernel.upgrade.UpgradeProcess> upgradeProcesses,
300                    java.util.Properties unfilteredPortalProperties)
301                    throws java.lang.Exception {
302                    getService()
303                            .updateRelease(servletContextName, upgradeProcesses,
304                            unfilteredPortalProperties);
305            }
306    
307            public static ReleaseLocalService getService() {
308                    if (_service == null) {
309                            _service = (ReleaseLocalService)PortalBeanLocatorUtil.locate(ReleaseLocalService.class.getName());
310    
311                            ReferenceRegistry.registerReference(ReleaseLocalServiceUtil.class,
312                                    "_service");
313                    }
314    
315                    return _service;
316            }
317    
318            private static ReleaseLocalService _service;
319    }