001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link PortletPreferencesLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       PortletPreferencesLocalService
030     * @generated
031     */
032    public class PortletPreferencesLocalServiceUtil {
033            public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
034                    com.liferay.portal.model.PortletPreferences portletPreferences)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addPortletPreferences(portletPreferences);
037            }
038    
039            public static com.liferay.portal.model.PortletPreferences createPortletPreferences(
040                    long portletPreferencesId) {
041                    return getService().createPortletPreferences(portletPreferencesId);
042            }
043    
044            public static void deletePortletPreferences(long portletPreferencesId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deletePortletPreferences(portletPreferencesId);
048            }
049    
050            public static void deletePortletPreferences(
051                    com.liferay.portal.model.PortletPreferences portletPreferences)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deletePortletPreferences(portletPreferences);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
087                    long portletPreferencesId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getPortletPreferences(portletPreferencesId);
091            }
092    
093            public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferenceses(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getPortletPreferenceses(start, end);
097            }
098    
099            public static int getPortletPreferencesesCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getPortletPreferencesesCount();
102            }
103    
104            public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
105                    com.liferay.portal.model.PortletPreferences portletPreferences)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updatePortletPreferences(portletPreferences);
108            }
109    
110            public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
111                    com.liferay.portal.model.PortletPreferences portletPreferences,
112                    boolean merge)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updatePortletPreferences(portletPreferences, merge);
115            }
116    
117            public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
118                    long companyId, long ownerId, int ownerType, long plid,
119                    java.lang.String portletId, com.liferay.portal.model.Portlet portlet,
120                    java.lang.String defaultPreferences)
121                    throws com.liferay.portal.kernel.exception.SystemException {
122                    return getService()
123                                       .addPortletPreferences(companyId, ownerId, ownerType, plid,
124                            portletId, portlet, defaultPreferences);
125            }
126    
127            public static void deletePortletPreferences(long ownerId, int ownerType,
128                    long plid) throws com.liferay.portal.kernel.exception.SystemException {
129                    getService().deletePortletPreferences(ownerId, ownerType, plid);
130            }
131    
132            public static void deletePortletPreferences(long ownerId, int ownerType,
133                    long plid, java.lang.String portletId)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    getService()
137                            .deletePortletPreferences(ownerId, ownerType, plid, portletId);
138            }
139    
140            public static javax.portlet.PortletPreferences getDefaultPreferences(
141                    long companyId, java.lang.String portletId)
142                    throws com.liferay.portal.kernel.exception.SystemException {
143                    return getService().getDefaultPreferences(companyId, portletId);
144            }
145    
146            public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences()
147                    throws com.liferay.portal.kernel.exception.SystemException {
148                    return getService().getPortletPreferences();
149            }
150    
151            public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
152                    long plid, java.lang.String portletId)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getService().getPortletPreferences(plid, portletId);
155            }
156    
157            public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
158                    long ownerId, int ownerType, long plid)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getService().getPortletPreferences(ownerId, ownerType, plid);
161            }
162    
163            public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
164                    long ownerId, int ownerType, long plid, java.lang.String portletId)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    return getService()
168                                       .getPortletPreferences(ownerId, ownerType, plid, portletId);
169            }
170    
171            public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferencesByPlid(
172                    long plid) throws com.liferay.portal.kernel.exception.SystemException {
173                    return getService().getPortletPreferencesByPlid(plid);
174            }
175    
176            public static javax.portlet.PortletPreferences getPreferences(
177                    com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
178                    throws com.liferay.portal.kernel.exception.SystemException {
179                    return getService().getPreferences(portletPreferencesIds);
180            }
181    
182            public static javax.portlet.PortletPreferences getPreferences(
183                    long companyId, long ownerId, int ownerType, long plid,
184                    java.lang.String portletId)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return getService()
187                                       .getPreferences(companyId, ownerId, ownerType, plid,
188                            portletId);
189            }
190    
191            public static javax.portlet.PortletPreferences getPreferences(
192                    long companyId, long ownerId, int ownerType, long plid,
193                    java.lang.String portletId, java.lang.String defaultPreferences)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getService()
196                                       .getPreferences(companyId, ownerId, ownerType, plid,
197                            portletId, defaultPreferences);
198            }
199    
200            public static com.liferay.portal.model.PortletPreferences updatePreferences(
201                    long ownerId, int ownerType, long plid, java.lang.String portletId,
202                    javax.portlet.PortletPreferences preferences)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getService()
205                                       .updatePreferences(ownerId, ownerType, plid, portletId,
206                            preferences);
207            }
208    
209            public static com.liferay.portal.model.PortletPreferences updatePreferences(
210                    long ownerId, int ownerType, long plid, java.lang.String portletId,
211                    java.lang.String xml)
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    return getService()
214                                       .updatePreferences(ownerId, ownerType, plid, portletId, xml);
215            }
216    
217            public static PortletPreferencesLocalService getService() {
218                    if (_service == null) {
219                            _service = (PortletPreferencesLocalService)PortalBeanLocatorUtil.locate(PortletPreferencesLocalService.class.getName());
220                    }
221    
222                    return _service;
223            }
224    
225            public void setService(PortletPreferencesLocalService service) {
226                    _service = service;
227            }
228    
229            private static PortletPreferencesLocalService _service;
230    }