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 RecentLayoutRevision. This utility wraps
024     * {@link com.liferay.portal.service.impl.RecentLayoutRevisionLocalServiceImpl} 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 RecentLayoutRevisionLocalService
032     * @see com.liferay.portal.service.base.RecentLayoutRevisionLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.RecentLayoutRevisionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class RecentLayoutRevisionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RecentLayoutRevisionLocalServiceImpl} 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 recent layout revision to the database. Also notifies the appropriate model listeners.
072            *
073            * @param recentLayoutRevision the recent layout revision
074            * @return the recent layout revision that was added
075            */
076            public static com.liferay.portal.kernel.model.RecentLayoutRevision addRecentLayoutRevision(
077                    com.liferay.portal.kernel.model.RecentLayoutRevision recentLayoutRevision) {
078                    return getService().addRecentLayoutRevision(recentLayoutRevision);
079            }
080    
081            public static com.liferay.portal.kernel.model.RecentLayoutRevision addRecentLayoutRevision(
082                    long userId, long layoutRevisionId, long layoutSetBranchId, long plid)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    return getService()
085                                       .addRecentLayoutRevision(userId, layoutRevisionId,
086                            layoutSetBranchId, plid);
087            }
088    
089            /**
090            * Creates a new recent layout revision with the primary key. Does not add the recent layout revision to the database.
091            *
092            * @param recentLayoutRevisionId the primary key for the new recent layout revision
093            * @return the new recent layout revision
094            */
095            public static com.liferay.portal.kernel.model.RecentLayoutRevision createRecentLayoutRevision(
096                    long recentLayoutRevisionId) {
097                    return getService().createRecentLayoutRevision(recentLayoutRevisionId);
098            }
099    
100            /**
101            * Deletes the recent layout revision from the database. Also notifies the appropriate model listeners.
102            *
103            * @param recentLayoutRevision the recent layout revision
104            * @return the recent layout revision that was removed
105            */
106            public static com.liferay.portal.kernel.model.RecentLayoutRevision deleteRecentLayoutRevision(
107                    com.liferay.portal.kernel.model.RecentLayoutRevision recentLayoutRevision) {
108                    return getService().deleteRecentLayoutRevision(recentLayoutRevision);
109            }
110    
111            /**
112            * Deletes the recent layout revision with the primary key from the database. Also notifies the appropriate model listeners.
113            *
114            * @param recentLayoutRevisionId the primary key of the recent layout revision
115            * @return the recent layout revision that was removed
116            * @throws PortalException if a recent layout revision with the primary key could not be found
117            */
118            public static com.liferay.portal.kernel.model.RecentLayoutRevision deleteRecentLayoutRevision(
119                    long recentLayoutRevisionId)
120                    throws com.liferay.portal.kernel.exception.PortalException {
121                    return getService().deleteRecentLayoutRevision(recentLayoutRevisionId);
122            }
123    
124            public static com.liferay.portal.kernel.model.RecentLayoutRevision fetchRecentLayoutRevision(
125                    long recentLayoutRevisionId) {
126                    return getService().fetchRecentLayoutRevision(recentLayoutRevisionId);
127            }
128    
129            public static com.liferay.portal.kernel.model.RecentLayoutRevision fetchRecentLayoutRevision(
130                    long userId, long layoutSetBranchId, long plid) {
131                    return getService()
132                                       .fetchRecentLayoutRevision(userId, layoutSetBranchId, plid);
133            }
134    
135            /**
136            * Returns the recent layout revision with the primary key.
137            *
138            * @param recentLayoutRevisionId the primary key of the recent layout revision
139            * @return the recent layout revision
140            * @throws PortalException if a recent layout revision with the primary key could not be found
141            */
142            public static com.liferay.portal.kernel.model.RecentLayoutRevision getRecentLayoutRevision(
143                    long recentLayoutRevisionId)
144                    throws com.liferay.portal.kernel.exception.PortalException {
145                    return getService().getRecentLayoutRevision(recentLayoutRevisionId);
146            }
147    
148            /**
149            * Updates the recent layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
150            *
151            * @param recentLayoutRevision the recent layout revision
152            * @return the recent layout revision that was updated
153            */
154            public static com.liferay.portal.kernel.model.RecentLayoutRevision updateRecentLayoutRevision(
155                    com.liferay.portal.kernel.model.RecentLayoutRevision recentLayoutRevision) {
156                    return getService().updateRecentLayoutRevision(recentLayoutRevision);
157            }
158    
159            /**
160            * Returns the number of recent layout revisions.
161            *
162            * @return the number of recent layout revisions
163            */
164            public static int getRecentLayoutRevisionsCount() {
165                    return getService().getRecentLayoutRevisionsCount();
166            }
167    
168            /**
169            * Returns the OSGi service identifier.
170            *
171            * @return the OSGi service identifier
172            */
173            public static java.lang.String getOSGiServiceIdentifier() {
174                    return getService().getOSGiServiceIdentifier();
175            }
176    
177            /**
178            * Performs a dynamic query on the database and returns the matching rows.
179            *
180            * @param dynamicQuery the dynamic query
181            * @return the matching rows
182            */
183            public static <T> java.util.List<T> dynamicQuery(
184                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
185                    return getService().dynamicQuery(dynamicQuery);
186            }
187    
188            /**
189            * Performs a dynamic query on the database and returns a range of the matching rows.
190            *
191            * <p>
192            * 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.RecentLayoutRevisionModelImpl}. 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.
193            * </p>
194            *
195            * @param dynamicQuery the dynamic query
196            * @param start the lower bound of the range of model instances
197            * @param end the upper bound of the range of model instances (not inclusive)
198            * @return the range of matching rows
199            */
200            public static <T> java.util.List<T> dynamicQuery(
201                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
202                    int end) {
203                    return getService().dynamicQuery(dynamicQuery, start, end);
204            }
205    
206            /**
207            * Performs a dynamic query on the database and returns an ordered 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.portal.model.impl.RecentLayoutRevisionModelImpl}. 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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
217            * @return the ordered range of matching rows
218            */
219            public static <T> java.util.List<T> dynamicQuery(
220                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
221                    int end,
222                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
223                    return getService()
224                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
225            }
226    
227            /**
228            * Returns a range of all the recent layout revisions.
229            *
230            * <p>
231            * 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.RecentLayoutRevisionModelImpl}. 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.
232            * </p>
233            *
234            * @param start the lower bound of the range of recent layout revisions
235            * @param end the upper bound of the range of recent layout revisions (not inclusive)
236            * @return the range of recent layout revisions
237            */
238            public static java.util.List<com.liferay.portal.kernel.model.RecentLayoutRevision> getRecentLayoutRevisions(
239                    int start, int end) {
240                    return getService().getRecentLayoutRevisions(start, end);
241            }
242    
243            /**
244            * Returns the number of rows matching the dynamic query.
245            *
246            * @param dynamicQuery the dynamic query
247            * @return the number of rows matching the dynamic query
248            */
249            public static long dynamicQueryCount(
250                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
251                    return getService().dynamicQueryCount(dynamicQuery);
252            }
253    
254            /**
255            * Returns the number of rows matching the dynamic query.
256            *
257            * @param dynamicQuery the dynamic query
258            * @param projection the projection to apply to the query
259            * @return the number of rows matching the dynamic query
260            */
261            public static long dynamicQueryCount(
262                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
263                    com.liferay.portal.kernel.dao.orm.Projection projection) {
264                    return getService().dynamicQueryCount(dynamicQuery, projection);
265            }
266    
267            public static void deleteRecentLayoutRevisions(long layoutRevisionId) {
268                    getService().deleteRecentLayoutRevisions(layoutRevisionId);
269            }
270    
271            public static void deleteUserRecentLayoutRevisions(long userId) {
272                    getService().deleteUserRecentLayoutRevisions(userId);
273            }
274    
275            public static RecentLayoutRevisionLocalService getService() {
276                    if (_service == null) {
277                            _service = (RecentLayoutRevisionLocalService)PortalBeanLocatorUtil.locate(RecentLayoutRevisionLocalService.class.getName());
278    
279                            ReferenceRegistry.registerReference(RecentLayoutRevisionLocalServiceUtil.class,
280                                    "_service");
281                    }
282    
283                    return _service;
284            }
285    
286            private static RecentLayoutRevisionLocalService _service;
287    }