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 LayoutRevision. This utility wraps
024     * {@link com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl} 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 LayoutRevisionLocalService
032     * @see com.liferay.portal.service.base.LayoutRevisionLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class LayoutRevisionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl} 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            * Adds the layout revision to the database. Also notifies the appropriate model listeners.
057            *
058            * @param layoutRevision the layout revision
059            * @return the layout revision that was added
060            */
061            public static com.liferay.portal.kernel.model.LayoutRevision addLayoutRevision(
062                    com.liferay.portal.kernel.model.LayoutRevision layoutRevision) {
063                    return getService().addLayoutRevision(layoutRevision);
064            }
065    
066            public static com.liferay.portal.kernel.model.LayoutRevision addLayoutRevision(
067                    long userId, long layoutSetBranchId, long layoutBranchId,
068                    long parentLayoutRevisionId, boolean head, long plid,
069                    long portletPreferencesPlid, boolean privateLayout,
070                    java.lang.String name, java.lang.String title,
071                    java.lang.String description, java.lang.String keywords,
072                    java.lang.String robots, java.lang.String typeSettings,
073                    boolean iconImage, long iconImageId, java.lang.String themeId,
074                    java.lang.String colorSchemeId, java.lang.String css,
075                    ServiceContext serviceContext)
076                    throws com.liferay.portal.kernel.exception.PortalException {
077                    return getService()
078                                       .addLayoutRevision(userId, layoutSetBranchId,
079                            layoutBranchId, parentLayoutRevisionId, head, plid,
080                            portletPreferencesPlid, privateLayout, name, title, description,
081                            keywords, robots, typeSettings, iconImage, iconImageId, themeId,
082                            colorSchemeId, css, serviceContext);
083            }
084    
085            /**
086            * Creates a new layout revision with the primary key. Does not add the layout revision to the database.
087            *
088            * @param layoutRevisionId the primary key for the new layout revision
089            * @return the new layout revision
090            */
091            public static com.liferay.portal.kernel.model.LayoutRevision createLayoutRevision(
092                    long layoutRevisionId) {
093                    return getService().createLayoutRevision(layoutRevisionId);
094            }
095    
096            /**
097            * Deletes the layout revision from the database. Also notifies the appropriate model listeners.
098            *
099            * @param layoutRevision the layout revision
100            * @return the layout revision that was removed
101            * @throws PortalException
102            */
103            public static com.liferay.portal.kernel.model.LayoutRevision deleteLayoutRevision(
104                    com.liferay.portal.kernel.model.LayoutRevision layoutRevision)
105                    throws com.liferay.portal.kernel.exception.PortalException {
106                    return getService().deleteLayoutRevision(layoutRevision);
107            }
108    
109            /**
110            * Deletes the layout revision with the primary key from the database. Also notifies the appropriate model listeners.
111            *
112            * @param layoutRevisionId the primary key of the layout revision
113            * @return the layout revision that was removed
114            * @throws PortalException if a layout revision with the primary key could not be found
115            */
116            public static com.liferay.portal.kernel.model.LayoutRevision deleteLayoutRevision(
117                    long layoutRevisionId)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    return getService().deleteLayoutRevision(layoutRevisionId);
120            }
121    
122            public static com.liferay.portal.kernel.model.LayoutRevision fetchLastLayoutRevision(
123                    long plid, boolean head) {
124                    return getService().fetchLastLayoutRevision(plid, head);
125            }
126    
127            public static com.liferay.portal.kernel.model.LayoutRevision fetchLatestLayoutRevision(
128                    long layoutSetBranchId, long plid) {
129                    return getService().fetchLatestLayoutRevision(layoutSetBranchId, plid);
130            }
131    
132            public static com.liferay.portal.kernel.model.LayoutRevision fetchLayoutRevision(
133                    long layoutRevisionId) {
134                    return getService().fetchLayoutRevision(layoutRevisionId);
135            }
136    
137            public static com.liferay.portal.kernel.model.LayoutRevision fetchLayoutRevision(
138                    long layoutSetBranchId, boolean head, long plid) {
139                    return getService().fetchLayoutRevision(layoutSetBranchId, head, plid);
140            }
141    
142            /**
143            * Returns the layout revision with the primary key.
144            *
145            * @param layoutRevisionId the primary key of the layout revision
146            * @return the layout revision
147            * @throws PortalException if a layout revision with the primary key could not be found
148            */
149            public static com.liferay.portal.kernel.model.LayoutRevision getLayoutRevision(
150                    long layoutRevisionId)
151                    throws com.liferay.portal.kernel.exception.PortalException {
152                    return getService().getLayoutRevision(layoutRevisionId);
153            }
154    
155            public static com.liferay.portal.kernel.model.LayoutRevision getLayoutRevision(
156                    long layoutSetBranchId, long layoutBranchId, long plid)
157                    throws com.liferay.portal.kernel.exception.PortalException {
158                    return getService()
159                                       .getLayoutRevision(layoutSetBranchId, layoutBranchId, plid);
160            }
161    
162            public static com.liferay.portal.kernel.model.LayoutRevision getLayoutRevision(
163                    long layoutSetBranchId, long plid, boolean head)
164                    throws com.liferay.portal.kernel.exception.PortalException {
165                    return getService().getLayoutRevision(layoutSetBranchId, plid, head);
166            }
167    
168            /**
169            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
170            *
171            * @param layoutRevision the layout revision
172            * @return the layout revision that was updated
173            */
174            public static com.liferay.portal.kernel.model.LayoutRevision updateLayoutRevision(
175                    com.liferay.portal.kernel.model.LayoutRevision layoutRevision) {
176                    return getService().updateLayoutRevision(layoutRevision);
177            }
178    
179            public static com.liferay.portal.kernel.model.LayoutRevision updateLayoutRevision(
180                    long userId, long layoutRevisionId, long layoutBranchId,
181                    java.lang.String name, java.lang.String title,
182                    java.lang.String description, java.lang.String keywords,
183                    java.lang.String robots, java.lang.String typeSettings,
184                    boolean iconImage, long iconImageId, java.lang.String themeId,
185                    java.lang.String colorSchemeId, java.lang.String css,
186                    ServiceContext serviceContext)
187                    throws com.liferay.portal.kernel.exception.PortalException {
188                    return getService()
189                                       .updateLayoutRevision(userId, layoutRevisionId,
190                            layoutBranchId, name, title, description, keywords, robots,
191                            typeSettings, iconImage, iconImageId, themeId, colorSchemeId, css,
192                            serviceContext);
193            }
194    
195            public static com.liferay.portal.kernel.model.LayoutRevision updateStatus(
196                    long userId, long layoutRevisionId, int status,
197                    ServiceContext serviceContext)
198                    throws com.liferay.portal.kernel.exception.PortalException {
199                    return getService()
200                                       .updateStatus(userId, layoutRevisionId, status,
201                            serviceContext);
202            }
203    
204            /**
205            * @throws PortalException
206            */
207            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
208                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
209                    throws com.liferay.portal.kernel.exception.PortalException {
210                    return getService().deletePersistedModel(persistedModel);
211            }
212    
213            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
214                    java.io.Serializable primaryKeyObj)
215                    throws com.liferay.portal.kernel.exception.PortalException {
216                    return getService().getPersistedModel(primaryKeyObj);
217            }
218    
219            public static int getChildLayoutRevisionsCount(long layoutSetBranchId,
220                    long parentLayoutRevision, long plid) {
221                    return getService()
222                                       .getChildLayoutRevisionsCount(layoutSetBranchId,
223                            parentLayoutRevision, plid);
224            }
225    
226            /**
227            * Returns the number of layout revisions.
228            *
229            * @return the number of layout revisions
230            */
231            public static int getLayoutRevisionsCount() {
232                    return getService().getLayoutRevisionsCount();
233            }
234    
235            public static int getLayoutRevisionsCount(long layoutSetBranchId,
236                    long layoutBranchId, long plid) {
237                    return getService()
238                                       .getLayoutRevisionsCount(layoutSetBranchId, layoutBranchId,
239                            plid);
240            }
241    
242            /**
243            * Returns the OSGi service identifier.
244            *
245            * @return the OSGi service identifier
246            */
247            public static java.lang.String getOSGiServiceIdentifier() {
248                    return getService().getOSGiServiceIdentifier();
249            }
250    
251            /**
252            * Performs a dynamic query on the database and returns the matching rows.
253            *
254            * @param dynamicQuery the dynamic query
255            * @return the matching rows
256            */
257            public static <T> java.util.List<T> dynamicQuery(
258                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
259                    return getService().dynamicQuery(dynamicQuery);
260            }
261    
262            /**
263            * Performs a dynamic query on the database and returns a range of the matching rows.
264            *
265            * <p>
266            * 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.LayoutRevisionModelImpl}. 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.
267            * </p>
268            *
269            * @param dynamicQuery the dynamic query
270            * @param start the lower bound of the range of model instances
271            * @param end the upper bound of the range of model instances (not inclusive)
272            * @return the range of matching rows
273            */
274            public static <T> java.util.List<T> dynamicQuery(
275                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
276                    int end) {
277                    return getService().dynamicQuery(dynamicQuery, start, end);
278            }
279    
280            /**
281            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
282            *
283            * <p>
284            * 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.LayoutRevisionModelImpl}. 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.
285            * </p>
286            *
287            * @param dynamicQuery the dynamic query
288            * @param start the lower bound of the range of model instances
289            * @param end the upper bound of the range of model instances (not inclusive)
290            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
291            * @return the ordered range of matching rows
292            */
293            public static <T> java.util.List<T> dynamicQuery(
294                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
295                    int end,
296                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
297                    return getService()
298                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
299            }
300    
301            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getChildLayoutRevisions(
302                    long layoutSetBranchId, long parentLayoutRevision, long plid,
303                    int start, int end,
304                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutRevision> orderByComparator) {
305                    return getService()
306                                       .getChildLayoutRevisions(layoutSetBranchId,
307                            parentLayoutRevision, plid, start, end, orderByComparator);
308            }
309    
310            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getChildLayoutRevisions(
311                    long layoutSetBranchId, long parentLayoutRevisionId, long plid) {
312                    return getService()
313                                       .getChildLayoutRevisions(layoutSetBranchId,
314                            parentLayoutRevisionId, plid);
315            }
316    
317            /**
318            * Returns a range of all the layout revisions.
319            *
320            * <p>
321            * 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.LayoutRevisionModelImpl}. 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.
322            * </p>
323            *
324            * @param start the lower bound of the range of layout revisions
325            * @param end the upper bound of the range of layout revisions (not inclusive)
326            * @return the range of layout revisions
327            */
328            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
329                    int start, int end) {
330                    return getService().getLayoutRevisions(start, end);
331            }
332    
333            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
334                    long layoutSetBranchId, boolean head) {
335                    return getService().getLayoutRevisions(layoutSetBranchId, head);
336            }
337    
338            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
339                    long layoutSetBranchId, int status) {
340                    return getService().getLayoutRevisions(layoutSetBranchId, status);
341            }
342    
343            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
344                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
345                    int end,
346                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutRevision> orderByComparator) {
347                    return getService()
348                                       .getLayoutRevisions(layoutSetBranchId, layoutBranchId, plid,
349                            start, end, orderByComparator);
350            }
351    
352            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
353                    long layoutSetBranchId, long plid) {
354                    return getService().getLayoutRevisions(layoutSetBranchId, plid);
355            }
356    
357            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
358                    long layoutSetBranchId, long plid, int start, int end,
359                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutRevision> orderByComparator) {
360                    return getService()
361                                       .getLayoutRevisions(layoutSetBranchId, plid, start, end,
362                            orderByComparator);
363            }
364    
365            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
366                    long layoutSetBranchId, long plid, int status) {
367                    return getService().getLayoutRevisions(layoutSetBranchId, plid, status);
368            }
369    
370            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
371                    long plid) {
372                    return getService().getLayoutRevisions(plid);
373            }
374    
375            /**
376            * Returns the number of rows matching the dynamic query.
377            *
378            * @param dynamicQuery the dynamic query
379            * @return the number of rows matching the dynamic query
380            */
381            public static long dynamicQueryCount(
382                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
383                    return getService().dynamicQueryCount(dynamicQuery);
384            }
385    
386            /**
387            * Returns the number of rows matching the dynamic query.
388            *
389            * @param dynamicQuery the dynamic query
390            * @param projection the projection to apply to the query
391            * @return the number of rows matching the dynamic query
392            */
393            public static long dynamicQueryCount(
394                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
395                    com.liferay.portal.kernel.dao.orm.Projection projection) {
396                    return getService().dynamicQueryCount(dynamicQuery, projection);
397            }
398    
399            public static void deleteLayoutLayoutRevisions(long plid)
400                    throws com.liferay.portal.kernel.exception.PortalException {
401                    getService().deleteLayoutLayoutRevisions(plid);
402            }
403    
404            public static void deleteLayoutRevisions(long layoutSetBranchId,
405                    long layoutBranchId, long plid)
406                    throws com.liferay.portal.kernel.exception.PortalException {
407                    getService()
408                            .deleteLayoutRevisions(layoutSetBranchId, layoutBranchId, plid);
409            }
410    
411            public static void deleteLayoutRevisions(long layoutSetBranchId, long plid)
412                    throws com.liferay.portal.kernel.exception.PortalException {
413                    getService().deleteLayoutRevisions(layoutSetBranchId, plid);
414            }
415    
416            public static void deleteLayoutSetBranchLayoutRevisions(
417                    long layoutSetBranchId)
418                    throws com.liferay.portal.kernel.exception.PortalException {
419                    getService().deleteLayoutSetBranchLayoutRevisions(layoutSetBranchId);
420            }
421    
422            public static LayoutRevisionLocalService getService() {
423                    if (_service == null) {
424                            _service = (LayoutRevisionLocalService)PortalBeanLocatorUtil.locate(LayoutRevisionLocalService.class.getName());
425    
426                            ReferenceRegistry.registerReference(LayoutRevisionLocalServiceUtil.class,
427                                    "_service");
428                    }
429    
430                    return _service;
431            }
432    
433            private static LayoutRevisionLocalService _service;
434    }