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