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 com.liferay.portal.model.PortletPreferences getPortletPreferences(
76          long portletPreferencesId)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService().getPortletPreferences(portletPreferencesId);
80      }
81  
82      public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferenceses(
83          int start, int end)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().getPortletPreferenceses(start, end);
86      }
87  
88      public static int getPortletPreferencesesCount()
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().getPortletPreferencesesCount();
91      }
92  
93      public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
94          com.liferay.portal.model.PortletPreferences portletPreferences)
95          throws com.liferay.portal.kernel.exception.SystemException {
96          return getService().updatePortletPreferences(portletPreferences);
97      }
98  
99      public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
100         com.liferay.portal.model.PortletPreferences portletPreferences,
101         boolean merge)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getService().updatePortletPreferences(portletPreferences, merge);
104     }
105 
106     public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
107         long companyId, long ownerId, int ownerType, long plid,
108         java.lang.String portletId, com.liferay.portal.model.Portlet portlet,
109         java.lang.String defaultPreferences)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService()
112                    .addPortletPreferences(companyId, ownerId, ownerType, plid,
113             portletId, portlet, defaultPreferences);
114     }
115 
116     public static void deletePortletPreferences(long ownerId, int ownerType,
117         long plid) throws com.liferay.portal.kernel.exception.SystemException {
118         getService().deletePortletPreferences(ownerId, ownerType, plid);
119     }
120 
121     public static void deletePortletPreferences(long ownerId, int ownerType,
122         long plid, java.lang.String portletId)
123         throws com.liferay.portal.kernel.exception.PortalException,
124             com.liferay.portal.kernel.exception.SystemException {
125         getService()
126             .deletePortletPreferences(ownerId, ownerType, plid, portletId);
127     }
128 
129     public static javax.portlet.PortletPreferences getDefaultPreferences(
130         long companyId, java.lang.String portletId)
131         throws com.liferay.portal.kernel.exception.SystemException {
132         return getService().getDefaultPreferences(companyId, portletId);
133     }
134 
135     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences()
136         throws com.liferay.portal.kernel.exception.SystemException {
137         return getService().getPortletPreferences();
138     }
139 
140     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
141         long plid, java.lang.String portletId)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         return getService().getPortletPreferences(plid, portletId);
144     }
145 
146     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
147         long ownerId, int ownerType, long plid)
148         throws com.liferay.portal.kernel.exception.SystemException {
149         return getService().getPortletPreferences(ownerId, ownerType, plid);
150     }
151 
152     public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
153         long ownerId, int ownerType, long plid, java.lang.String portletId)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException {
156         return getService()
157                    .getPortletPreferences(ownerId, ownerType, plid, portletId);
158     }
159 
160     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferencesByPlid(
161         long plid) throws com.liferay.portal.kernel.exception.SystemException {
162         return getService().getPortletPreferencesByPlid(plid);
163     }
164 
165     public static javax.portlet.PortletPreferences getPreferences(
166         com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
167         throws com.liferay.portal.kernel.exception.SystemException {
168         return getService().getPreferences(portletPreferencesIds);
169     }
170 
171     public static javax.portlet.PortletPreferences getPreferences(
172         long companyId, long ownerId, int ownerType, long plid,
173         java.lang.String portletId)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getService()
176                    .getPreferences(companyId, ownerId, ownerType, plid,
177             portletId);
178     }
179 
180     public static javax.portlet.PortletPreferences getPreferences(
181         long companyId, long ownerId, int ownerType, long plid,
182         java.lang.String portletId, java.lang.String defaultPreferences)
183         throws com.liferay.portal.kernel.exception.SystemException {
184         return getService()
185                    .getPreferences(companyId, ownerId, ownerType, plid,
186             portletId, defaultPreferences);
187     }
188 
189     public static com.liferay.portal.model.PortletPreferences updatePreferences(
190         long ownerId, int ownerType, long plid, java.lang.String portletId,
191         javax.portlet.PortletPreferences preferences)
192         throws com.liferay.portal.kernel.exception.SystemException {
193         return getService()
194                    .updatePreferences(ownerId, ownerType, plid, portletId,
195             preferences);
196     }
197 
198     public static com.liferay.portal.model.PortletPreferences updatePreferences(
199         long ownerId, int ownerType, long plid, java.lang.String portletId,
200         java.lang.String xml)
201         throws com.liferay.portal.kernel.exception.SystemException {
202         return getService()
203                    .updatePreferences(ownerId, ownerType, plid, portletId, xml);
204     }
205 
206     public static PortletPreferencesLocalService getService() {
207         if (_service == null) {
208             _service = (PortletPreferencesLocalService)PortalBeanLocatorUtil.locate(PortletPreferencesLocalService.class.getName());
209         }
210 
211         return _service;
212     }
213 
214     public void setService(PortletPreferencesLocalService service) {
215         _service = service;
216     }
217 
218     private static PortletPreferencesLocalService _service;
219 }