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