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