1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="PortletPreferencesLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link PortletPreferencesLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       PortletPreferencesLocalService
37   * @generated
38   */
39  public class PortletPreferencesLocalServiceUtil {
40      public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
41          com.liferay.portal.model.PortletPreferences portletPreferences)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addPortletPreferences(portletPreferences);
44      }
45  
46      public static com.liferay.portal.model.PortletPreferences createPortletPreferences(
47          long portletPreferencesId) {
48          return getService().createPortletPreferences(portletPreferencesId);
49      }
50  
51      public static void deletePortletPreferences(long portletPreferencesId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deletePortletPreferences(portletPreferencesId);
55      }
56  
57      public static void deletePortletPreferences(
58          com.liferay.portal.model.PortletPreferences portletPreferences)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deletePortletPreferences(portletPreferences);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
91          long portletPreferencesId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getPortletPreferences(portletPreferencesId);
95      }
96  
97      public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferenceses(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getPortletPreferenceses(start, end);
101     }
102 
103     public static int getPortletPreferencesesCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getPortletPreferencesesCount();
106     }
107 
108     public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
109         com.liferay.portal.model.PortletPreferences portletPreferences)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updatePortletPreferences(portletPreferences);
112     }
113 
114     public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
115         com.liferay.portal.model.PortletPreferences portletPreferences,
116         boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getService().updatePortletPreferences(portletPreferences, merge);
119     }
120 
121     public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
122         long companyId, long ownerId, int ownerType, long plid,
123         java.lang.String portletId, com.liferay.portal.model.Portlet portlet,
124         java.lang.String defaultPreferences)
125         throws com.liferay.portal.kernel.exception.SystemException {
126         return getService()
127                    .addPortletPreferences(companyId, ownerId, ownerType, plid,
128             portletId, portlet, defaultPreferences);
129     }
130 
131     public static void deletePortletPreferences(long ownerId, int ownerType,
132         long plid) throws com.liferay.portal.kernel.exception.SystemException {
133         getService().deletePortletPreferences(ownerId, ownerType, plid);
134     }
135 
136     public static void deletePortletPreferences(long ownerId, int ownerType,
137         long plid, java.lang.String portletId)
138         throws com.liferay.portal.kernel.exception.PortalException,
139             com.liferay.portal.kernel.exception.SystemException {
140         getService()
141             .deletePortletPreferences(ownerId, ownerType, plid, portletId);
142     }
143 
144     public static javax.portlet.PortletPreferences getDefaultPreferences(
145         long companyId, java.lang.String portletId)
146         throws com.liferay.portal.kernel.exception.SystemException {
147         return getService().getDefaultPreferences(companyId, portletId);
148     }
149 
150     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences()
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getService().getPortletPreferences();
153     }
154 
155     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
156         long plid, java.lang.String portletId)
157         throws com.liferay.portal.kernel.exception.SystemException {
158         return getService().getPortletPreferences(plid, portletId);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
162         long ownerId, int ownerType, long plid)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getService().getPortletPreferences(ownerId, ownerType, plid);
165     }
166 
167     public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
168         long ownerId, int ownerType, long plid, java.lang.String portletId)
169         throws com.liferay.portal.kernel.exception.PortalException,
170             com.liferay.portal.kernel.exception.SystemException {
171         return getService()
172                    .getPortletPreferences(ownerId, ownerType, plid, portletId);
173     }
174 
175     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferencesByPlid(
176         long plid) throws com.liferay.portal.kernel.exception.SystemException {
177         return getService().getPortletPreferencesByPlid(plid);
178     }
179 
180     public static javax.portlet.PortletPreferences getPreferences(
181         com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
182         throws com.liferay.portal.kernel.exception.SystemException {
183         return getService().getPreferences(portletPreferencesIds);
184     }
185 
186     public static javax.portlet.PortletPreferences getPreferences(
187         long companyId, long ownerId, int ownerType, long plid,
188         java.lang.String portletId)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getService()
191                    .getPreferences(companyId, ownerId, ownerType, plid,
192             portletId);
193     }
194 
195     public static javax.portlet.PortletPreferences getPreferences(
196         long companyId, long ownerId, int ownerType, long plid,
197         java.lang.String portletId, java.lang.String defaultPreferences)
198         throws com.liferay.portal.kernel.exception.SystemException {
199         return getService()
200                    .getPreferences(companyId, ownerId, ownerType, plid,
201             portletId, defaultPreferences);
202     }
203 
204     public static com.liferay.portal.model.PortletPreferences updatePreferences(
205         long ownerId, int ownerType, long plid, java.lang.String portletId,
206         javax.portlet.PortletPreferences preferences)
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getService()
209                    .updatePreferences(ownerId, ownerType, plid, portletId,
210             preferences);
211     }
212 
213     public static com.liferay.portal.model.PortletPreferences updatePreferences(
214         long ownerId, int ownerType, long plid, java.lang.String portletId,
215         java.lang.String xml)
216         throws com.liferay.portal.kernel.exception.SystemException {
217         return getService()
218                    .updatePreferences(ownerId, ownerType, plid, portletId, xml);
219     }
220 
221     public static PortletPreferencesLocalService getService() {
222         if (_service == null) {
223             _service = (PortletPreferencesLocalService)PortalBeanLocatorUtil.locate(PortletPreferencesLocalService.class.getName());
224         }
225 
226         return _service;
227     }
228 
229     public void setService(PortletPreferencesLocalService service) {
230         _service = service;
231     }
232 
233     private static PortletPreferencesLocalService _service;
234 }