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="WebsiteUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class WebsiteUtil {
32      public static com.liferay.portal.model.Website create(long websiteId) {
33          return getPersistence().create(websiteId);
34      }
35  
36      public static com.liferay.portal.model.Website remove(long websiteId)
37          throws com.liferay.portal.SystemException, 
38              com.liferay.portal.NoSuchWebsiteException {
39          return getPersistence().remove(websiteId);
40      }
41  
42      public static com.liferay.portal.model.Website remove(
43          com.liferay.portal.model.Website website)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(website);
46      }
47  
48      public static com.liferay.portal.model.Website update(
49          com.liferay.portal.model.Website website)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(website);
52      }
53  
54      public static com.liferay.portal.model.Website update(
55          com.liferay.portal.model.Website website, boolean merge)
56          throws com.liferay.portal.SystemException {
57          return getPersistence().update(website, merge);
58      }
59  
60      public static com.liferay.portal.model.Website updateImpl(
61          com.liferay.portal.model.Website website, boolean merge)
62          throws com.liferay.portal.SystemException {
63          return getPersistence().updateImpl(website, merge);
64      }
65  
66      public static com.liferay.portal.model.Website findByPrimaryKey(
67          long websiteId)
68          throws com.liferay.portal.SystemException, 
69              com.liferay.portal.NoSuchWebsiteException {
70          return getPersistence().findByPrimaryKey(websiteId);
71      }
72  
73      public static com.liferay.portal.model.Website fetchByPrimaryKey(
74          long websiteId) throws com.liferay.portal.SystemException {
75          return getPersistence().fetchByPrimaryKey(websiteId);
76      }
77  
78      public static java.util.List findByCompanyId(long companyId)
79          throws com.liferay.portal.SystemException {
80          return getPersistence().findByCompanyId(companyId);
81      }
82  
83      public static java.util.List findByCompanyId(long companyId, int begin,
84          int end) throws com.liferay.portal.SystemException {
85          return getPersistence().findByCompanyId(companyId, begin, end);
86      }
87  
88      public static java.util.List findByCompanyId(long companyId, int begin,
89          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
90          throws com.liferay.portal.SystemException {
91          return getPersistence().findByCompanyId(companyId, begin, end, obc);
92      }
93  
94      public static com.liferay.portal.model.Website findByCompanyId_First(
95          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException, 
97              com.liferay.portal.NoSuchWebsiteException {
98          return getPersistence().findByCompanyId_First(companyId, obc);
99      }
100 
101     public static com.liferay.portal.model.Website findByCompanyId_Last(
102         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException, 
104             com.liferay.portal.NoSuchWebsiteException {
105         return getPersistence().findByCompanyId_Last(companyId, obc);
106     }
107 
108     public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext(
109         long websiteId, long companyId,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portal.NoSuchWebsiteException {
113         return getPersistence().findByCompanyId_PrevAndNext(websiteId,
114             companyId, obc);
115     }
116 
117     public static java.util.List findByUserId(long userId)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().findByUserId(userId);
120     }
121 
122     public static java.util.List findByUserId(long userId, int begin, int end)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().findByUserId(userId, begin, end);
125     }
126 
127     public static java.util.List findByUserId(long userId, int begin, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException {
130         return getPersistence().findByUserId(userId, begin, end, obc);
131     }
132 
133     public static com.liferay.portal.model.Website findByUserId_First(
134         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException, 
136             com.liferay.portal.NoSuchWebsiteException {
137         return getPersistence().findByUserId_First(userId, obc);
138     }
139 
140     public static com.liferay.portal.model.Website findByUserId_Last(
141         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException, 
143             com.liferay.portal.NoSuchWebsiteException {
144         return getPersistence().findByUserId_Last(userId, obc);
145     }
146 
147     public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext(
148         long websiteId, long userId,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException, 
151             com.liferay.portal.NoSuchWebsiteException {
152         return getPersistence().findByUserId_PrevAndNext(websiteId, userId, obc);
153     }
154 
155     public static java.util.List findByC_C(long companyId, long classNameId)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().findByC_C(companyId, classNameId);
158     }
159 
160     public static java.util.List findByC_C(long companyId, long classNameId,
161         int begin, int end) throws com.liferay.portal.SystemException {
162         return getPersistence().findByC_C(companyId, classNameId, begin, end);
163     }
164 
165     public static java.util.List findByC_C(long companyId, long classNameId,
166         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().findByC_C(companyId, classNameId, begin, end,
169             obc);
170     }
171 
172     public static com.liferay.portal.model.Website findByC_C_First(
173         long companyId, long classNameId,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException, 
176             com.liferay.portal.NoSuchWebsiteException {
177         return getPersistence().findByC_C_First(companyId, classNameId, obc);
178     }
179 
180     public static com.liferay.portal.model.Website findByC_C_Last(
181         long companyId, long classNameId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException, 
184             com.liferay.portal.NoSuchWebsiteException {
185         return getPersistence().findByC_C_Last(companyId, classNameId, obc);
186     }
187 
188     public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext(
189         long websiteId, long companyId, long classNameId,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException, 
192             com.liferay.portal.NoSuchWebsiteException {
193         return getPersistence().findByC_C_PrevAndNext(websiteId, companyId,
194             classNameId, obc);
195     }
196 
197     public static java.util.List findByC_C_C(long companyId, long classNameId,
198         long classPK) throws com.liferay.portal.SystemException {
199         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
200     }
201 
202     public static java.util.List findByC_C_C(long companyId, long classNameId,
203         long classPK, int begin, int end)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
206             begin, end);
207     }
208 
209     public static java.util.List findByC_C_C(long companyId, long classNameId,
210         long classPK, int begin, int end,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException {
213         return getPersistence().findByC_C_C(companyId, classNameId, classPK,
214             begin, end, obc);
215     }
216 
217     public static com.liferay.portal.model.Website findByC_C_C_First(
218         long companyId, long classNameId, long classPK,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException, 
221             com.liferay.portal.NoSuchWebsiteException {
222         return getPersistence().findByC_C_C_First(companyId, classNameId,
223             classPK, obc);
224     }
225 
226     public static com.liferay.portal.model.Website findByC_C_C_Last(
227         long companyId, long classNameId, long classPK,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException, 
230             com.liferay.portal.NoSuchWebsiteException {
231         return getPersistence().findByC_C_C_Last(companyId, classNameId,
232             classPK, obc);
233     }
234 
235     public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext(
236         long websiteId, long companyId, long classNameId, long classPK,
237         com.liferay.portal.kernel.util.OrderByComparator obc)
238         throws com.liferay.portal.SystemException, 
239             com.liferay.portal.NoSuchWebsiteException {
240         return getPersistence().findByC_C_C_PrevAndNext(websiteId, companyId,
241             classNameId, classPK, obc);
242     }
243 
244     public static java.util.List findByC_C_C_P(long companyId,
245         long classNameId, long classPK, boolean primary)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
248             primary);
249     }
250 
251     public static java.util.List findByC_C_C_P(long companyId,
252         long classNameId, long classPK, boolean primary, int begin, int end)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
255             primary, begin, end);
256     }
257 
258     public static java.util.List findByC_C_C_P(long companyId,
259         long classNameId, long classPK, boolean primary, int begin, int end,
260         com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException {
262         return getPersistence().findByC_C_C_P(companyId, classNameId, classPK,
263             primary, begin, end, obc);
264     }
265 
266     public static com.liferay.portal.model.Website findByC_C_C_P_First(
267         long companyId, long classNameId, long classPK, boolean primary,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException, 
270             com.liferay.portal.NoSuchWebsiteException {
271         return getPersistence().findByC_C_C_P_First(companyId, classNameId,
272             classPK, primary, obc);
273     }
274 
275     public static com.liferay.portal.model.Website findByC_C_C_P_Last(
276         long companyId, long classNameId, long classPK, boolean primary,
277         com.liferay.portal.kernel.util.OrderByComparator obc)
278         throws com.liferay.portal.SystemException, 
279             com.liferay.portal.NoSuchWebsiteException {
280         return getPersistence().findByC_C_C_P_Last(companyId, classNameId,
281             classPK, primary, obc);
282     }
283 
284     public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext(
285         long websiteId, long companyId, long classNameId, long classPK,
286         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
287         throws com.liferay.portal.SystemException, 
288             com.liferay.portal.NoSuchWebsiteException {
289         return getPersistence().findByC_C_C_P_PrevAndNext(websiteId, companyId,
290             classNameId, classPK, primary, obc);
291     }
292 
293     public static java.util.List findWithDynamicQuery(
294         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().findWithDynamicQuery(queryInitializer);
297     }
298 
299     public static java.util.List findWithDynamicQuery(
300         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
301         int begin, int end) throws com.liferay.portal.SystemException {
302         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
303             end);
304     }
305 
306     public static java.util.List findAll()
307         throws com.liferay.portal.SystemException {
308         return getPersistence().findAll();
309     }
310 
311     public static java.util.List findAll(int begin, int end)
312         throws com.liferay.portal.SystemException {
313         return getPersistence().findAll(begin, end);
314     }
315 
316     public static java.util.List findAll(int begin, int end,
317         com.liferay.portal.kernel.util.OrderByComparator obc)
318         throws com.liferay.portal.SystemException {
319         return getPersistence().findAll(begin, end, obc);
320     }
321 
322     public static void removeByCompanyId(long companyId)
323         throws com.liferay.portal.SystemException {
324         getPersistence().removeByCompanyId(companyId);
325     }
326 
327     public static void removeByUserId(long userId)
328         throws com.liferay.portal.SystemException {
329         getPersistence().removeByUserId(userId);
330     }
331 
332     public static void removeByC_C(long companyId, long classNameId)
333         throws com.liferay.portal.SystemException {
334         getPersistence().removeByC_C(companyId, classNameId);
335     }
336 
337     public static void removeByC_C_C(long companyId, long classNameId,
338         long classPK) throws com.liferay.portal.SystemException {
339         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
340     }
341 
342     public static void removeByC_C_C_P(long companyId, long classNameId,
343         long classPK, boolean primary)
344         throws com.liferay.portal.SystemException {
345         getPersistence().removeByC_C_C_P(companyId, classNameId, classPK,
346             primary);
347     }
348 
349     public static void removeAll() throws com.liferay.portal.SystemException {
350         getPersistence().removeAll();
351     }
352 
353     public static int countByCompanyId(long companyId)
354         throws com.liferay.portal.SystemException {
355         return getPersistence().countByCompanyId(companyId);
356     }
357 
358     public static int countByUserId(long userId)
359         throws com.liferay.portal.SystemException {
360         return getPersistence().countByUserId(userId);
361     }
362 
363     public static int countByC_C(long companyId, long classNameId)
364         throws com.liferay.portal.SystemException {
365         return getPersistence().countByC_C(companyId, classNameId);
366     }
367 
368     public static int countByC_C_C(long companyId, long classNameId,
369         long classPK) throws com.liferay.portal.SystemException {
370         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
371     }
372 
373     public static int countByC_C_C_P(long companyId, long classNameId,
374         long classPK, boolean primary)
375         throws com.liferay.portal.SystemException {
376         return getPersistence().countByC_C_C_P(companyId, classNameId, classPK,
377             primary);
378     }
379 
380     public static int countAll() throws com.liferay.portal.SystemException {
381         return getPersistence().countAll();
382     }
383 
384     public static WebsitePersistence getPersistence() {
385         return _getUtil()._persistence;
386     }
387 
388     public void setPersistence(WebsitePersistence persistence) {
389         _persistence = persistence;
390     }
391 
392     private static WebsiteUtil _getUtil() {
393         if (_util == null) {
394             _util = (WebsiteUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
395         }
396 
397         return _util;
398     }
399 
400     private static final String _UTIL = WebsiteUtil.class.getName();
401     private static WebsiteUtil _util;
402     private WebsitePersistence _persistence;
403 }