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