1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="PortletPreferencesUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class PortletPreferencesUtil {
32      public static com.liferay.portal.model.PortletPreferences create(
33          long portletPreferencesId) {
34          return getPersistence().create(portletPreferencesId);
35      }
36  
37      public static com.liferay.portal.model.PortletPreferences remove(
38          long portletPreferencesId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portal.NoSuchPortletPreferencesException {
41          return getPersistence().remove(portletPreferencesId);
42      }
43  
44      public static com.liferay.portal.model.PortletPreferences remove(
45          com.liferay.portal.model.PortletPreferences portletPreferences)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(portletPreferences);
48      }
49  
50      public static com.liferay.portal.model.PortletPreferences update(
51          com.liferay.portal.model.PortletPreferences portletPreferences)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(portletPreferences);
54      }
55  
56      public static com.liferay.portal.model.PortletPreferences update(
57          com.liferay.portal.model.PortletPreferences portletPreferences,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(portletPreferences, merge);
60      }
61  
62      public static com.liferay.portal.model.PortletPreferences updateImpl(
63          com.liferay.portal.model.PortletPreferences portletPreferences,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(portletPreferences, merge);
66      }
67  
68      public static com.liferay.portal.model.PortletPreferences findByPrimaryKey(
69          long portletPreferencesId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchPortletPreferencesException {
72          return getPersistence().findByPrimaryKey(portletPreferencesId);
73      }
74  
75      public static com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
76          long portletPreferencesId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(portletPreferencesId);
78      }
79  
80      public static java.util.List findByPlid(long plid)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByPlid(plid);
83      }
84  
85      public static java.util.List findByPlid(long plid, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByPlid(plid, begin, end);
88      }
89  
90      public static java.util.List findByPlid(long plid, int begin, int end,
91          com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByPlid(plid, begin, end, obc);
94      }
95  
96      public static com.liferay.portal.model.PortletPreferences findByPlid_First(
97          long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portal.NoSuchPortletPreferencesException {
100         return getPersistence().findByPlid_First(plid, obc);
101     }
102 
103     public static com.liferay.portal.model.PortletPreferences findByPlid_Last(
104         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchPortletPreferencesException {
107         return getPersistence().findByPlid_Last(plid, obc);
108     }
109 
110     public static com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
111         long portletPreferencesId, long plid,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portal.NoSuchPortletPreferencesException {
115         return getPersistence().findByPlid_PrevAndNext(portletPreferencesId,
116             plid, obc);
117     }
118 
119     public static java.util.List findByO_O_P(long ownerId, int ownerType,
120         long plid) throws com.liferay.portal.SystemException {
121         return getPersistence().findByO_O_P(ownerId, ownerType, plid);
122     }
123 
124     public static java.util.List findByO_O_P(long ownerId, int ownerType,
125         long plid, int begin, int end)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().findByO_O_P(ownerId, ownerType, plid, begin, end);
128     }
129 
130     public static java.util.List findByO_O_P(long ownerId, int ownerType,
131         long plid, int begin, int end,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().findByO_O_P(ownerId, ownerType, plid, begin,
135             end, obc);
136     }
137 
138     public static com.liferay.portal.model.PortletPreferences findByO_O_P_First(
139         long ownerId, int ownerType, long plid,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException, 
142             com.liferay.portal.NoSuchPortletPreferencesException {
143         return getPersistence().findByO_O_P_First(ownerId, ownerType, plid, obc);
144     }
145 
146     public static com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
147         long ownerId, int ownerType, long plid,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException, 
150             com.liferay.portal.NoSuchPortletPreferencesException {
151         return getPersistence().findByO_O_P_Last(ownerId, ownerType, plid, obc);
152     }
153 
154     public static com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
155         long portletPreferencesId, long ownerId, int ownerType, long plid,
156         com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException, 
158             com.liferay.portal.NoSuchPortletPreferencesException {
159         return getPersistence().findByO_O_P_PrevAndNext(portletPreferencesId,
160             ownerId, ownerType, plid, obc);
161     }
162 
163     public static com.liferay.portal.model.PortletPreferences findByO_O_P_P(
164         long ownerId, int ownerType, long plid, java.lang.String portletId)
165         throws com.liferay.portal.SystemException, 
166             com.liferay.portal.NoSuchPortletPreferencesException {
167         return getPersistence().findByO_O_P_P(ownerId, ownerType, plid,
168             portletId);
169     }
170 
171     public static com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
172         long ownerId, int ownerType, long plid, java.lang.String portletId)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().fetchByO_O_P_P(ownerId, ownerType, plid,
175             portletId);
176     }
177 
178     public static java.util.List findWithDynamicQuery(
179         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findWithDynamicQuery(queryInitializer);
182     }
183 
184     public static java.util.List findWithDynamicQuery(
185         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
186         int begin, int end) throws com.liferay.portal.SystemException {
187         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
188             end);
189     }
190 
191     public static java.util.List findAll()
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findAll();
194     }
195 
196     public static java.util.List findAll(int begin, int end)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().findAll(begin, end);
199     }
200 
201     public static java.util.List findAll(int begin, int end,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findAll(begin, end, obc);
205     }
206 
207     public static void removeByPlid(long plid)
208         throws com.liferay.portal.SystemException {
209         getPersistence().removeByPlid(plid);
210     }
211 
212     public static void removeByO_O_P(long ownerId, int ownerType, long plid)
213         throws com.liferay.portal.SystemException {
214         getPersistence().removeByO_O_P(ownerId, ownerType, plid);
215     }
216 
217     public static void removeByO_O_P_P(long ownerId, int ownerType, long plid,
218         java.lang.String portletId)
219         throws com.liferay.portal.SystemException, 
220             com.liferay.portal.NoSuchPortletPreferencesException {
221         getPersistence().removeByO_O_P_P(ownerId, ownerType, plid, portletId);
222     }
223 
224     public static void removeAll() throws com.liferay.portal.SystemException {
225         getPersistence().removeAll();
226     }
227 
228     public static int countByPlid(long plid)
229         throws com.liferay.portal.SystemException {
230         return getPersistence().countByPlid(plid);
231     }
232 
233     public static int countByO_O_P(long ownerId, int ownerType, long plid)
234         throws com.liferay.portal.SystemException {
235         return getPersistence().countByO_O_P(ownerId, ownerType, plid);
236     }
237 
238     public static int countByO_O_P_P(long ownerId, int ownerType, long plid,
239         java.lang.String portletId) throws com.liferay.portal.SystemException {
240         return getPersistence().countByO_O_P_P(ownerId, ownerType, plid,
241             portletId);
242     }
243 
244     public static int countAll() throws com.liferay.portal.SystemException {
245         return getPersistence().countAll();
246     }
247 
248     public static PortletPreferencesPersistence getPersistence() {
249         return _getUtil()._persistence;
250     }
251 
252     public void setPersistence(PortletPreferencesPersistence persistence) {
253         _persistence = persistence;
254     }
255 
256     private static PortletPreferencesUtil _getUtil() {
257         if (_util == null) {
258             _util = (PortletPreferencesUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
259         }
260 
261         return _util;
262     }
263 
264     private static final String _UTIL = PortletPreferencesUtil.class.getName();
265     private static PortletPreferencesUtil _util;
266     private PortletPreferencesPersistence _persistence;
267 }