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.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.Website;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="WebsiteUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       WebsitePersistence
34   * @see       WebsitePersistenceImpl
35   * @generated
36   */
37  public class WebsiteUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Website)
47       */
48      public static void clearCache(Website website) {
49          getPersistence().clearCache(website);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Website> findWithDynamicQuery(DynamicQuery dynamicQuery)
64          throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Website> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Website remove(Website website) throws SystemException {
81          return getPersistence().remove(website);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static Website update(Website website, boolean merge)
88          throws SystemException {
89          return getPersistence().update(website, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.Website website) {
93          getPersistence().cacheResult(website);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.Website> websites) {
98          getPersistence().cacheResult(websites);
99      }
100 
101     public static com.liferay.portal.model.Website create(long websiteId) {
102         return getPersistence().create(websiteId);
103     }
104 
105     public static com.liferay.portal.model.Website remove(long websiteId)
106         throws com.liferay.portal.NoSuchWebsiteException,
107             com.liferay.portal.kernel.exception.SystemException {
108         return getPersistence().remove(websiteId);
109     }
110 
111     public static com.liferay.portal.model.Website updateImpl(
112         com.liferay.portal.model.Website website, boolean merge)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getPersistence().updateImpl(website, merge);
115     }
116 
117     public static com.liferay.portal.model.Website findByPrimaryKey(
118         long websiteId)
119         throws com.liferay.portal.NoSuchWebsiteException,
120             com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByPrimaryKey(websiteId);
122     }
123 
124     public static com.liferay.portal.model.Website fetchByPrimaryKey(
125         long websiteId)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().fetchByPrimaryKey(websiteId);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
131         long companyId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().findByCompanyId(companyId);
134     }
135 
136     public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
137         long companyId, int start, int end)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByCompanyId(companyId, start, end);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
143         long companyId, int start, int end,
144         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145         throws com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence()
147                    .findByCompanyId(companyId, start, end, orderByComparator);
148     }
149 
150     public static com.liferay.portal.model.Website findByCompanyId_First(
151         long companyId,
152         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153         throws com.liferay.portal.NoSuchWebsiteException,
154             com.liferay.portal.kernel.exception.SystemException {
155         return getPersistence()
156                    .findByCompanyId_First(companyId, orderByComparator);
157     }
158 
159     public static com.liferay.portal.model.Website findByCompanyId_Last(
160         long companyId,
161         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162         throws com.liferay.portal.NoSuchWebsiteException,
163             com.liferay.portal.kernel.exception.SystemException {
164         return getPersistence()
165                    .findByCompanyId_Last(companyId, orderByComparator);
166     }
167 
168     public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext(
169         long websiteId, long companyId,
170         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171         throws com.liferay.portal.NoSuchWebsiteException,
172             com.liferay.portal.kernel.exception.SystemException {
173         return getPersistence()
174                    .findByCompanyId_PrevAndNext(websiteId, companyId,
175             orderByComparator);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.Website> findByUserId(
179         long userId) throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence().findByUserId(userId);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.Website> findByUserId(
184         long userId, int start, int end)
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().findByUserId(userId, start, end);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.Website> findByUserId(
190         long userId, int start, int end,
191         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
192         throws com.liferay.portal.kernel.exception.SystemException {
193         return getPersistence()
194                    .findByUserId(userId, start, end, orderByComparator);
195     }
196 
197     public static com.liferay.portal.model.Website findByUserId_First(
198         long userId,
199         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
200         throws com.liferay.portal.NoSuchWebsiteException,
201             com.liferay.portal.kernel.exception.SystemException {
202         return getPersistence().findByUserId_First(userId, orderByComparator);
203     }
204 
205     public static com.liferay.portal.model.Website findByUserId_Last(
206         long userId,
207         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208         throws com.liferay.portal.NoSuchWebsiteException,
209             com.liferay.portal.kernel.exception.SystemException {
210         return getPersistence().findByUserId_Last(userId, orderByComparator);
211     }
212 
213     public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext(
214         long websiteId, long userId,
215         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
216         throws com.liferay.portal.NoSuchWebsiteException,
217             com.liferay.portal.kernel.exception.SystemException {
218         return getPersistence()
219                    .findByUserId_PrevAndNext(websiteId, userId,
220             orderByComparator);
221     }
222 
223     public static java.util.List<com.liferay.portal.model.Website> findByC_C(
224         long companyId, long classNameId)
225         throws com.liferay.portal.kernel.exception.SystemException {
226         return getPersistence().findByC_C(companyId, classNameId);
227     }
228 
229     public static java.util.List<com.liferay.portal.model.Website> findByC_C(
230         long companyId, long classNameId, int start, int end)
231         throws com.liferay.portal.kernel.exception.SystemException {
232         return getPersistence().findByC_C(companyId, classNameId, start, end);
233     }
234 
235     public static java.util.List<com.liferay.portal.model.Website> findByC_C(
236         long companyId, long classNameId, int start, int end,
237         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         return getPersistence()
240                    .findByC_C(companyId, classNameId, start, end,
241             orderByComparator);
242     }
243 
244     public static com.liferay.portal.model.Website findByC_C_First(
245         long companyId, long classNameId,
246         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247         throws com.liferay.portal.NoSuchWebsiteException,
248             com.liferay.portal.kernel.exception.SystemException {
249         return getPersistence()
250                    .findByC_C_First(companyId, classNameId, orderByComparator);
251     }
252 
253     public static com.liferay.portal.model.Website findByC_C_Last(
254         long companyId, long classNameId,
255         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
256         throws com.liferay.portal.NoSuchWebsiteException,
257             com.liferay.portal.kernel.exception.SystemException {
258         return getPersistence()
259                    .findByC_C_Last(companyId, classNameId, orderByComparator);
260     }
261 
262     public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext(
263         long websiteId, long companyId, long classNameId,
264         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265         throws com.liferay.portal.NoSuchWebsiteException,
266             com.liferay.portal.kernel.exception.SystemException {
267         return getPersistence()
268                    .findByC_C_PrevAndNext(websiteId, companyId, classNameId,
269             orderByComparator);
270     }
271 
272     public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
273         long companyId, long classNameId, long classPK)
274         throws com.liferay.portal.kernel.exception.SystemException {
275         return getPersistence().findByC_C_C(companyId, classNameId, classPK);
276     }
277 
278     public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
279         long companyId, long classNameId, long classPK, int start, int end)
280         throws com.liferay.portal.kernel.exception.SystemException {
281         return getPersistence()
282                    .findByC_C_C(companyId, classNameId, classPK, start, end);
283     }
284 
285     public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
286         long companyId, long classNameId, long classPK, int start, int end,
287         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288         throws com.liferay.portal.kernel.exception.SystemException {
289         return getPersistence()
290                    .findByC_C_C(companyId, classNameId, classPK, start, end,
291             orderByComparator);
292     }
293 
294     public static com.liferay.portal.model.Website findByC_C_C_First(
295         long companyId, long classNameId, long classPK,
296         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
297         throws com.liferay.portal.NoSuchWebsiteException,
298             com.liferay.portal.kernel.exception.SystemException {
299         return getPersistence()
300                    .findByC_C_C_First(companyId, classNameId, classPK,
301             orderByComparator);
302     }
303 
304     public static com.liferay.portal.model.Website findByC_C_C_Last(
305         long companyId, long classNameId, long classPK,
306         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307         throws com.liferay.portal.NoSuchWebsiteException,
308             com.liferay.portal.kernel.exception.SystemException {
309         return getPersistence()
310                    .findByC_C_C_Last(companyId, classNameId, classPK,
311             orderByComparator);
312     }
313 
314     public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext(
315         long websiteId, long companyId, long classNameId, long classPK,
316         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317         throws com.liferay.portal.NoSuchWebsiteException,
318             com.liferay.portal.kernel.exception.SystemException {
319         return getPersistence()
320                    .findByC_C_C_PrevAndNext(websiteId, companyId, classNameId,
321             classPK, orderByComparator);
322     }
323 
324     public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
325         long companyId, long classNameId, long classPK, boolean primary)
326         throws com.liferay.portal.kernel.exception.SystemException {
327         return getPersistence()
328                    .findByC_C_C_P(companyId, classNameId, classPK, primary);
329     }
330 
331     public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
332         long companyId, long classNameId, long classPK, boolean primary,
333         int start, int end)
334         throws com.liferay.portal.kernel.exception.SystemException {
335         return getPersistence()
336                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
337             start, end);
338     }
339 
340     public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
341         long companyId, long classNameId, long classPK, boolean primary,
342         int start, int end,
343         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
344         throws com.liferay.portal.kernel.exception.SystemException {
345         return getPersistence()
346                    .findByC_C_C_P(companyId, classNameId, classPK, primary,
347             start, end, orderByComparator);
348     }
349 
350     public static com.liferay.portal.model.Website findByC_C_C_P_First(
351         long companyId, long classNameId, long classPK, boolean primary,
352         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
353         throws com.liferay.portal.NoSuchWebsiteException,
354             com.liferay.portal.kernel.exception.SystemException {
355         return getPersistence()
356                    .findByC_C_C_P_First(companyId, classNameId, classPK,
357             primary, orderByComparator);
358     }
359 
360     public static com.liferay.portal.model.Website findByC_C_C_P_Last(
361         long companyId, long classNameId, long classPK, boolean primary,
362         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363         throws com.liferay.portal.NoSuchWebsiteException,
364             com.liferay.portal.kernel.exception.SystemException {
365         return getPersistence()
366                    .findByC_C_C_P_Last(companyId, classNameId, classPK,
367             primary, orderByComparator);
368     }
369 
370     public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext(
371         long websiteId, long companyId, long classNameId, long classPK,
372         boolean primary,
373         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
374         throws com.liferay.portal.NoSuchWebsiteException,
375             com.liferay.portal.kernel.exception.SystemException {
376         return getPersistence()
377                    .findByC_C_C_P_PrevAndNext(websiteId, companyId,
378             classNameId, classPK, primary, orderByComparator);
379     }
380 
381     public static java.util.List<com.liferay.portal.model.Website> findAll()
382         throws com.liferay.portal.kernel.exception.SystemException {
383         return getPersistence().findAll();
384     }
385 
386     public static java.util.List<com.liferay.portal.model.Website> findAll(
387         int start, int end)
388         throws com.liferay.portal.kernel.exception.SystemException {
389         return getPersistence().findAll(start, end);
390     }
391 
392     public static java.util.List<com.liferay.portal.model.Website> findAll(
393         int start, int end,
394         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
395         throws com.liferay.portal.kernel.exception.SystemException {
396         return getPersistence().findAll(start, end, orderByComparator);
397     }
398 
399     public static void removeByCompanyId(long companyId)
400         throws com.liferay.portal.kernel.exception.SystemException {
401         getPersistence().removeByCompanyId(companyId);
402     }
403 
404     public static void removeByUserId(long userId)
405         throws com.liferay.portal.kernel.exception.SystemException {
406         getPersistence().removeByUserId(userId);
407     }
408 
409     public static void removeByC_C(long companyId, long classNameId)
410         throws com.liferay.portal.kernel.exception.SystemException {
411         getPersistence().removeByC_C(companyId, classNameId);
412     }
413 
414     public static void removeByC_C_C(long companyId, long classNameId,
415         long classPK)
416         throws com.liferay.portal.kernel.exception.SystemException {
417         getPersistence().removeByC_C_C(companyId, classNameId, classPK);
418     }
419 
420     public static void removeByC_C_C_P(long companyId, long classNameId,
421         long classPK, boolean primary)
422         throws com.liferay.portal.kernel.exception.SystemException {
423         getPersistence()
424             .removeByC_C_C_P(companyId, classNameId, classPK, primary);
425     }
426 
427     public static void removeAll()
428         throws com.liferay.portal.kernel.exception.SystemException {
429         getPersistence().removeAll();
430     }
431 
432     public static int countByCompanyId(long companyId)
433         throws com.liferay.portal.kernel.exception.SystemException {
434         return getPersistence().countByCompanyId(companyId);
435     }
436 
437     public static int countByUserId(long userId)
438         throws com.liferay.portal.kernel.exception.SystemException {
439         return getPersistence().countByUserId(userId);
440     }
441 
442     public static int countByC_C(long companyId, long classNameId)
443         throws com.liferay.portal.kernel.exception.SystemException {
444         return getPersistence().countByC_C(companyId, classNameId);
445     }
446 
447     public static int countByC_C_C(long companyId, long classNameId,
448         long classPK)
449         throws com.liferay.portal.kernel.exception.SystemException {
450         return getPersistence().countByC_C_C(companyId, classNameId, classPK);
451     }
452 
453     public static int countByC_C_C_P(long companyId, long classNameId,
454         long classPK, boolean primary)
455         throws com.liferay.portal.kernel.exception.SystemException {
456         return getPersistence()
457                    .countByC_C_C_P(companyId, classNameId, classPK, primary);
458     }
459 
460     public static int countAll()
461         throws com.liferay.portal.kernel.exception.SystemException {
462         return getPersistence().countAll();
463     }
464 
465     public static WebsitePersistence getPersistence() {
466         if (_persistence == null) {
467             _persistence = (WebsitePersistence)PortalBeanLocatorUtil.locate(WebsitePersistence.class.getName());
468         }
469 
470         return _persistence;
471     }
472 
473     public void setPersistence(WebsitePersistence persistence) {
474         _persistence = persistence;
475     }
476 
477     private static WebsitePersistence _persistence;
478 }