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