1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.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.PortalException,
53              com.liferay.portal.SystemException {
54          getService().deletePortletPreferences(portletPreferencesId);
55      }
56  
57      public static void deletePortletPreferences(
58          com.liferay.portal.model.PortletPreferences portletPreferences)
59          throws com.liferay.portal.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.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.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.PortalException,
78              com.liferay.portal.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) throws com.liferay.portal.SystemException {
84          return getService().getPortletPreferenceses(start, end);
85      }
86  
87      public static int getPortletPreferencesesCount()
88          throws com.liferay.portal.SystemException {
89          return getService().getPortletPreferencesesCount();
90      }
91  
92      public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
93          com.liferay.portal.model.PortletPreferences portletPreferences)
94          throws com.liferay.portal.SystemException {
95          return getService().updatePortletPreferences(portletPreferences);
96      }
97  
98      public static com.liferay.portal.model.PortletPreferences updatePortletPreferences(
99          com.liferay.portal.model.PortletPreferences portletPreferences,
100         boolean merge) throws com.liferay.portal.SystemException {
101         return getService().updatePortletPreferences(portletPreferences, merge);
102     }
103 
104     public static com.liferay.portal.model.PortletPreferences addPortletPreferences(
105         long companyId, long ownerId, int ownerType, long plid,
106         java.lang.String portletId, com.liferay.portal.model.Portlet portlet,
107         java.lang.String defaultPreferences)
108         throws com.liferay.portal.SystemException {
109         return getService()
110                    .addPortletPreferences(companyId, ownerId, ownerType, plid,
111             portletId, portlet, defaultPreferences);
112     }
113 
114     public static void deletePortletPreferences(long ownerId, int ownerType,
115         long plid) throws com.liferay.portal.SystemException {
116         getService().deletePortletPreferences(ownerId, ownerType, plid);
117     }
118 
119     public static void deletePortletPreferences(long ownerId, int ownerType,
120         long plid, java.lang.String portletId)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         getService()
124             .deletePortletPreferences(ownerId, ownerType, plid, portletId);
125     }
126 
127     public static javax.portlet.PortletPreferences getDefaultPreferences(
128         long companyId, java.lang.String portletId)
129         throws com.liferay.portal.SystemException {
130         return getService().getDefaultPreferences(companyId, portletId);
131     }
132 
133     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences()
134         throws com.liferay.portal.SystemException {
135         return getService().getPortletPreferences();
136     }
137 
138     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
139         long plid, java.lang.String portletId)
140         throws com.liferay.portal.SystemException {
141         return getService().getPortletPreferences(plid, portletId);
142     }
143 
144     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
145         long ownerId, int ownerType, long plid)
146         throws com.liferay.portal.SystemException {
147         return getService().getPortletPreferences(ownerId, ownerType, plid);
148     }
149 
150     public static com.liferay.portal.model.PortletPreferences getPortletPreferences(
151         long ownerId, int ownerType, long plid, java.lang.String portletId)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         return getService()
155                    .getPortletPreferences(ownerId, ownerType, plid, portletId);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferencesByPlid(
159         long plid) throws com.liferay.portal.SystemException {
160         return getService().getPortletPreferencesByPlid(plid);
161     }
162 
163     public static javax.portlet.PortletPreferences getPreferences(
164         com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
165         throws com.liferay.portal.SystemException {
166         return getService().getPreferences(portletPreferencesIds);
167     }
168 
169     public static javax.portlet.PortletPreferences getPreferences(
170         long companyId, long ownerId, int ownerType, long plid,
171         java.lang.String portletId) throws com.liferay.portal.SystemException {
172         return getService()
173                    .getPreferences(companyId, ownerId, ownerType, plid,
174             portletId);
175     }
176 
177     public static javax.portlet.PortletPreferences getPreferences(
178         long companyId, long ownerId, int ownerType, long plid,
179         java.lang.String portletId, java.lang.String defaultPreferences)
180         throws com.liferay.portal.SystemException {
181         return getService()
182                    .getPreferences(companyId, ownerId, ownerType, plid,
183             portletId, defaultPreferences);
184     }
185 
186     public static com.liferay.portal.model.PortletPreferences updatePreferences(
187         long ownerId, int ownerType, long plid, java.lang.String portletId,
188         javax.portlet.PortletPreferences preferences)
189         throws com.liferay.portal.SystemException {
190         return getService()
191                    .updatePreferences(ownerId, ownerType, plid, portletId,
192             preferences);
193     }
194 
195     public static com.liferay.portal.model.PortletPreferences updatePreferences(
196         long ownerId, int ownerType, long plid, java.lang.String portletId,
197         java.lang.String xml) throws com.liferay.portal.SystemException {
198         return getService()
199                    .updatePreferences(ownerId, ownerType, plid, portletId, xml);
200     }
201 
202     public static PortletPreferencesLocalService getService() {
203         if (_service == null) {
204             _service = (PortletPreferencesLocalService)PortalBeanLocatorUtil.locate(PortletPreferencesLocalService.class.getName());
205         }
206 
207         return _service;
208     }
209 
210     public void setService(PortletPreferencesLocalService service) {
211         _service = service;
212     }
213 
214     private static PortletPreferencesLocalService _service;
215 }