001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Website;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * The persistence utility for the website service.
028     *
029     * <p>
030     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
031     * </p>
032     *
033     * @author Brian Wing Shun Chan
034     * @see WebsitePersistence
035     * @see WebsitePersistenceImpl
036     * @generated
037     */
038    public class WebsiteUtil {
039            /**
040             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
041             */
042            public static void clearCache() {
043                    getPersistence().clearCache();
044            }
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
048             */
049            public static void clearCache(Website website) {
050                    getPersistence().clearCache(website);
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
055             */
056            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
057                    throws SystemException {
058                    return getPersistence().countWithDynamicQuery(dynamicQuery);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
063             */
064            public static List<Website> findWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().findWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
071             */
072            public static List<Website> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery, int start, int end)
074                    throws SystemException {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
080             */
081            public static List<Website> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end,
083                    OrderByComparator orderByComparator) throws SystemException {
084                    return getPersistence()
085                                       .findWithDynamicQuery(dynamicQuery, start, end,
086                            orderByComparator);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
091             */
092            public static Website remove(Website website) throws SystemException {
093                    return getPersistence().remove(website);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static Website update(Website website, boolean merge)
100                    throws SystemException {
101                    return getPersistence().update(website, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static Website update(Website website, boolean merge,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(website, merge, serviceContext);
110            }
111    
112            /**
113            * Caches the website in the entity cache if it is enabled.
114            *
115            * @param website the website to cache
116            */
117            public static void cacheResult(com.liferay.portal.model.Website website) {
118                    getPersistence().cacheResult(website);
119            }
120    
121            /**
122            * Caches the websites in the entity cache if it is enabled.
123            *
124            * @param websites the websites to cache
125            */
126            public static void cacheResult(
127                    java.util.List<com.liferay.portal.model.Website> websites) {
128                    getPersistence().cacheResult(websites);
129            }
130    
131            /**
132            * Creates a new website with the primary key.
133            *
134            * @param websiteId the primary key for the new website
135            * @return the new website
136            */
137            public static com.liferay.portal.model.Website create(long websiteId) {
138                    return getPersistence().create(websiteId);
139            }
140    
141            /**
142            * Removes the website with the primary key from the database. Also notifies the appropriate model listeners.
143            *
144            * @param websiteId the primary key of the website to remove
145            * @return the website that was removed
146            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
147            * @throws SystemException if a system exception occurred
148            */
149            public static com.liferay.portal.model.Website remove(long websiteId)
150                    throws com.liferay.portal.NoSuchWebsiteException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getPersistence().remove(websiteId);
153            }
154    
155            public static com.liferay.portal.model.Website updateImpl(
156                    com.liferay.portal.model.Website website, boolean merge)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().updateImpl(website, merge);
159            }
160    
161            /**
162            * Finds the website with the primary key or throws a {@link com.liferay.portal.NoSuchWebsiteException} if it could not be found.
163            *
164            * @param websiteId the primary key of the website to find
165            * @return the website
166            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portal.model.Website findByPrimaryKey(
170                    long websiteId)
171                    throws com.liferay.portal.NoSuchWebsiteException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence().findByPrimaryKey(websiteId);
174            }
175    
176            /**
177            * Finds the website with the primary key or returns <code>null</code> if it could not be found.
178            *
179            * @param websiteId the primary key of the website to find
180            * @return the website, or <code>null</code> if a website with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.Website fetchByPrimaryKey(
184                    long websiteId)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return getPersistence().fetchByPrimaryKey(websiteId);
187            }
188    
189            /**
190            * Finds all the websites where companyId = &#63;.
191            *
192            * @param companyId the company id to search with
193            * @return the matching websites
194            * @throws SystemException if a system exception occurred
195            */
196            public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
197                    long companyId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().findByCompanyId(companyId);
200            }
201    
202            /**
203            * Finds a range of all the websites where companyId = &#63;.
204            *
205            * <p>
206            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
207            * </p>
208            *
209            * @param companyId the company id to search with
210            * @param start the lower bound of the range of websites to return
211            * @param end the upper bound of the range of websites to return (not inclusive)
212            * @return the range of matching websites
213            * @throws SystemException if a system exception occurred
214            */
215            public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
216                    long companyId, int start, int end)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence().findByCompanyId(companyId, start, end);
219            }
220    
221            /**
222            * Finds an ordered range of all the websites where companyId = &#63;.
223            *
224            * <p>
225            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
226            * </p>
227            *
228            * @param companyId the company id to search with
229            * @param start the lower bound of the range of websites to return
230            * @param end the upper bound of the range of websites to return (not inclusive)
231            * @param orderByComparator the comparator to order the results by
232            * @return the ordered range of matching websites
233            * @throws SystemException if a system exception occurred
234            */
235            public static java.util.List<com.liferay.portal.model.Website> findByCompanyId(
236                    long companyId, int start, int end,
237                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return getPersistence()
240                                       .findByCompanyId(companyId, start, end, orderByComparator);
241            }
242    
243            /**
244            * Finds the first website in the ordered set where companyId = &#63;.
245            *
246            * <p>
247            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
248            * </p>
249            *
250            * @param companyId the company id to search with
251            * @param orderByComparator the comparator to order the set by
252            * @return the first matching website
253            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.Website findByCompanyId_First(
257                    long companyId,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchWebsiteException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence()
262                                       .findByCompanyId_First(companyId, orderByComparator);
263            }
264    
265            /**
266            * Finds the last website in the ordered set where companyId = &#63;.
267            *
268            * <p>
269            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
270            * </p>
271            *
272            * @param companyId the company id to search with
273            * @param orderByComparator the comparator to order the set by
274            * @return the last matching website
275            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
276            * @throws SystemException if a system exception occurred
277            */
278            public static com.liferay.portal.model.Website findByCompanyId_Last(
279                    long companyId,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.NoSuchWebsiteException,
282                            com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence()
284                                       .findByCompanyId_Last(companyId, orderByComparator);
285            }
286    
287            /**
288            * Finds the websites before and after the current website in the ordered set where companyId = &#63;.
289            *
290            * <p>
291            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
292            * </p>
293            *
294            * @param websiteId the primary key of the current website
295            * @param companyId the company id to search with
296            * @param orderByComparator the comparator to order the set by
297            * @return the previous, current, and next website
298            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext(
302                    long websiteId, long companyId,
303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304                    throws com.liferay.portal.NoSuchWebsiteException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    return getPersistence()
307                                       .findByCompanyId_PrevAndNext(websiteId, companyId,
308                            orderByComparator);
309            }
310    
311            /**
312            * Finds all the websites where userId = &#63;.
313            *
314            * @param userId the user id to search with
315            * @return the matching websites
316            * @throws SystemException if a system exception occurred
317            */
318            public static java.util.List<com.liferay.portal.model.Website> findByUserId(
319                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
320                    return getPersistence().findByUserId(userId);
321            }
322    
323            /**
324            * Finds a range of all the websites where userId = &#63;.
325            *
326            * <p>
327            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
328            * </p>
329            *
330            * @param userId the user id to search with
331            * @param start the lower bound of the range of websites to return
332            * @param end the upper bound of the range of websites to return (not inclusive)
333            * @return the range of matching websites
334            * @throws SystemException if a system exception occurred
335            */
336            public static java.util.List<com.liferay.portal.model.Website> findByUserId(
337                    long userId, int start, int end)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getPersistence().findByUserId(userId, start, end);
340            }
341    
342            /**
343            * Finds an ordered range of all the websites where userId = &#63;.
344            *
345            * <p>
346            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
347            * </p>
348            *
349            * @param userId the user id to search with
350            * @param start the lower bound of the range of websites to return
351            * @param end the upper bound of the range of websites to return (not inclusive)
352            * @param orderByComparator the comparator to order the results by
353            * @return the ordered range of matching websites
354            * @throws SystemException if a system exception occurred
355            */
356            public static java.util.List<com.liferay.portal.model.Website> findByUserId(
357                    long userId, int start, int end,
358                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359                    throws com.liferay.portal.kernel.exception.SystemException {
360                    return getPersistence()
361                                       .findByUserId(userId, start, end, orderByComparator);
362            }
363    
364            /**
365            * Finds the first website in the ordered set where userId = &#63;.
366            *
367            * <p>
368            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
369            * </p>
370            *
371            * @param userId the user id to search with
372            * @param orderByComparator the comparator to order the set by
373            * @return the first matching website
374            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
375            * @throws SystemException if a system exception occurred
376            */
377            public static com.liferay.portal.model.Website findByUserId_First(
378                    long userId,
379                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380                    throws com.liferay.portal.NoSuchWebsiteException,
381                            com.liferay.portal.kernel.exception.SystemException {
382                    return getPersistence().findByUserId_First(userId, orderByComparator);
383            }
384    
385            /**
386            * Finds the last website in the ordered set where userId = &#63;.
387            *
388            * <p>
389            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
390            * </p>
391            *
392            * @param userId the user id to search with
393            * @param orderByComparator the comparator to order the set by
394            * @return the last matching website
395            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
396            * @throws SystemException if a system exception occurred
397            */
398            public static com.liferay.portal.model.Website findByUserId_Last(
399                    long userId,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.NoSuchWebsiteException,
402                            com.liferay.portal.kernel.exception.SystemException {
403                    return getPersistence().findByUserId_Last(userId, orderByComparator);
404            }
405    
406            /**
407            * Finds the websites before and after the current website in the ordered set where userId = &#63;.
408            *
409            * <p>
410            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
411            * </p>
412            *
413            * @param websiteId the primary key of the current website
414            * @param userId the user id to search with
415            * @param orderByComparator the comparator to order the set by
416            * @return the previous, current, and next website
417            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
418            * @throws SystemException if a system exception occurred
419            */
420            public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext(
421                    long websiteId, long userId,
422                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
423                    throws com.liferay.portal.NoSuchWebsiteException,
424                            com.liferay.portal.kernel.exception.SystemException {
425                    return getPersistence()
426                                       .findByUserId_PrevAndNext(websiteId, userId,
427                            orderByComparator);
428            }
429    
430            /**
431            * Finds all the websites where companyId = &#63; and classNameId = &#63;.
432            *
433            * @param companyId the company id to search with
434            * @param classNameId the class name id to search with
435            * @return the matching websites
436            * @throws SystemException if a system exception occurred
437            */
438            public static java.util.List<com.liferay.portal.model.Website> findByC_C(
439                    long companyId, long classNameId)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence().findByC_C(companyId, classNameId);
442            }
443    
444            /**
445            * Finds a range of all the websites where companyId = &#63; and classNameId = &#63;.
446            *
447            * <p>
448            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
449            * </p>
450            *
451            * @param companyId the company id to search with
452            * @param classNameId the class name id to search with
453            * @param start the lower bound of the range of websites to return
454            * @param end the upper bound of the range of websites to return (not inclusive)
455            * @return the range of matching websites
456            * @throws SystemException if a system exception occurred
457            */
458            public static java.util.List<com.liferay.portal.model.Website> findByC_C(
459                    long companyId, long classNameId, int start, int end)
460                    throws com.liferay.portal.kernel.exception.SystemException {
461                    return getPersistence().findByC_C(companyId, classNameId, start, end);
462            }
463    
464            /**
465            * Finds an ordered range of all the websites where companyId = &#63; and classNameId = &#63;.
466            *
467            * <p>
468            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
469            * </p>
470            *
471            * @param companyId the company id to search with
472            * @param classNameId the class name id to search with
473            * @param start the lower bound of the range of websites to return
474            * @param end the upper bound of the range of websites to return (not inclusive)
475            * @param orderByComparator the comparator to order the results by
476            * @return the ordered range of matching websites
477            * @throws SystemException if a system exception occurred
478            */
479            public static java.util.List<com.liferay.portal.model.Website> findByC_C(
480                    long companyId, long classNameId, int start, int end,
481                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence()
484                                       .findByC_C(companyId, classNameId, start, end,
485                            orderByComparator);
486            }
487    
488            /**
489            * Finds the first website in the ordered set where companyId = &#63; and classNameId = &#63;.
490            *
491            * <p>
492            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
493            * </p>
494            *
495            * @param companyId the company id to search with
496            * @param classNameId the class name id to search with
497            * @param orderByComparator the comparator to order the set by
498            * @return the first matching website
499            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
500            * @throws SystemException if a system exception occurred
501            */
502            public static com.liferay.portal.model.Website findByC_C_First(
503                    long companyId, long classNameId,
504                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
505                    throws com.liferay.portal.NoSuchWebsiteException,
506                            com.liferay.portal.kernel.exception.SystemException {
507                    return getPersistence()
508                                       .findByC_C_First(companyId, classNameId, orderByComparator);
509            }
510    
511            /**
512            * Finds the last website in the ordered set where companyId = &#63; and classNameId = &#63;.
513            *
514            * <p>
515            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
516            * </p>
517            *
518            * @param companyId the company id to search with
519            * @param classNameId the class name id to search with
520            * @param orderByComparator the comparator to order the set by
521            * @return the last matching website
522            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
523            * @throws SystemException if a system exception occurred
524            */
525            public static com.liferay.portal.model.Website findByC_C_Last(
526                    long companyId, long classNameId,
527                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
528                    throws com.liferay.portal.NoSuchWebsiteException,
529                            com.liferay.portal.kernel.exception.SystemException {
530                    return getPersistence()
531                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
532            }
533    
534            /**
535            * Finds the websites before and after the current website in the ordered set where companyId = &#63; and classNameId = &#63;.
536            *
537            * <p>
538            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
539            * </p>
540            *
541            * @param websiteId the primary key of the current website
542            * @param companyId the company id to search with
543            * @param classNameId the class name id to search with
544            * @param orderByComparator the comparator to order the set by
545            * @return the previous, current, and next website
546            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
547            * @throws SystemException if a system exception occurred
548            */
549            public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext(
550                    long websiteId, long companyId, long classNameId,
551                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
552                    throws com.liferay.portal.NoSuchWebsiteException,
553                            com.liferay.portal.kernel.exception.SystemException {
554                    return getPersistence()
555                                       .findByC_C_PrevAndNext(websiteId, companyId, classNameId,
556                            orderByComparator);
557            }
558    
559            /**
560            * Finds all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
561            *
562            * @param companyId the company id to search with
563            * @param classNameId the class name id to search with
564            * @param classPK the class p k to search with
565            * @return the matching websites
566            * @throws SystemException if a system exception occurred
567            */
568            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
569                    long companyId, long classNameId, long classPK)
570                    throws com.liferay.portal.kernel.exception.SystemException {
571                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
572            }
573    
574            /**
575            * Finds a range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
576            *
577            * <p>
578            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
579            * </p>
580            *
581            * @param companyId the company id to search with
582            * @param classNameId the class name id to search with
583            * @param classPK the class p k to search with
584            * @param start the lower bound of the range of websites to return
585            * @param end the upper bound of the range of websites to return (not inclusive)
586            * @return the range of matching websites
587            * @throws SystemException if a system exception occurred
588            */
589            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
590                    long companyId, long classNameId, long classPK, int start, int end)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    return getPersistence()
593                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
594            }
595    
596            /**
597            * Finds an ordered range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
598            *
599            * <p>
600            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
601            * </p>
602            *
603            * @param companyId the company id to search with
604            * @param classNameId the class name id to search with
605            * @param classPK the class p k to search with
606            * @param start the lower bound of the range of websites to return
607            * @param end the upper bound of the range of websites to return (not inclusive)
608            * @param orderByComparator the comparator to order the results by
609            * @return the ordered range of matching websites
610            * @throws SystemException if a system exception occurred
611            */
612            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
613                    long companyId, long classNameId, long classPK, int start, int end,
614                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence()
617                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
618                            orderByComparator);
619            }
620    
621            /**
622            * Finds the first website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
623            *
624            * <p>
625            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
626            * </p>
627            *
628            * @param companyId the company id to search with
629            * @param classNameId the class name id to search with
630            * @param classPK the class p k to search with
631            * @param orderByComparator the comparator to order the set by
632            * @return the first matching website
633            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
634            * @throws SystemException if a system exception occurred
635            */
636            public static com.liferay.portal.model.Website findByC_C_C_First(
637                    long companyId, long classNameId, long classPK,
638                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
639                    throws com.liferay.portal.NoSuchWebsiteException,
640                            com.liferay.portal.kernel.exception.SystemException {
641                    return getPersistence()
642                                       .findByC_C_C_First(companyId, classNameId, classPK,
643                            orderByComparator);
644            }
645    
646            /**
647            * Finds the last website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
648            *
649            * <p>
650            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
651            * </p>
652            *
653            * @param companyId the company id to search with
654            * @param classNameId the class name id to search with
655            * @param classPK the class p k to search with
656            * @param orderByComparator the comparator to order the set by
657            * @return the last matching website
658            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
659            * @throws SystemException if a system exception occurred
660            */
661            public static com.liferay.portal.model.Website findByC_C_C_Last(
662                    long companyId, long classNameId, long classPK,
663                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
664                    throws com.liferay.portal.NoSuchWebsiteException,
665                            com.liferay.portal.kernel.exception.SystemException {
666                    return getPersistence()
667                                       .findByC_C_C_Last(companyId, classNameId, classPK,
668                            orderByComparator);
669            }
670    
671            /**
672            * Finds the websites before and after the current website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
673            *
674            * <p>
675            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
676            * </p>
677            *
678            * @param websiteId the primary key of the current website
679            * @param companyId the company id to search with
680            * @param classNameId the class name id to search with
681            * @param classPK the class p k to search with
682            * @param orderByComparator the comparator to order the set by
683            * @return the previous, current, and next website
684            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
685            * @throws SystemException if a system exception occurred
686            */
687            public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext(
688                    long websiteId, long companyId, long classNameId, long classPK,
689                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
690                    throws com.liferay.portal.NoSuchWebsiteException,
691                            com.liferay.portal.kernel.exception.SystemException {
692                    return getPersistence()
693                                       .findByC_C_C_PrevAndNext(websiteId, companyId, classNameId,
694                            classPK, orderByComparator);
695            }
696    
697            /**
698            * Finds all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
699            *
700            * @param companyId the company id to search with
701            * @param classNameId the class name id to search with
702            * @param classPK the class p k to search with
703            * @param primary the primary to search with
704            * @return the matching websites
705            * @throws SystemException if a system exception occurred
706            */
707            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
708                    long companyId, long classNameId, long classPK, boolean primary)
709                    throws com.liferay.portal.kernel.exception.SystemException {
710                    return getPersistence()
711                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
712            }
713    
714            /**
715            * Finds a range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
716            *
717            * <p>
718            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
719            * </p>
720            *
721            * @param companyId the company id to search with
722            * @param classNameId the class name id to search with
723            * @param classPK the class p k to search with
724            * @param primary the primary to search with
725            * @param start the lower bound of the range of websites to return
726            * @param end the upper bound of the range of websites to return (not inclusive)
727            * @return the range of matching websites
728            * @throws SystemException if a system exception occurred
729            */
730            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
731                    long companyId, long classNameId, long classPK, boolean primary,
732                    int start, int end)
733                    throws com.liferay.portal.kernel.exception.SystemException {
734                    return getPersistence()
735                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
736                            start, end);
737            }
738    
739            /**
740            * Finds an ordered range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
741            *
742            * <p>
743            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
744            * </p>
745            *
746            * @param companyId the company id to search with
747            * @param classNameId the class name id to search with
748            * @param classPK the class p k to search with
749            * @param primary the primary to search with
750            * @param start the lower bound of the range of websites to return
751            * @param end the upper bound of the range of websites to return (not inclusive)
752            * @param orderByComparator the comparator to order the results by
753            * @return the ordered range of matching websites
754            * @throws SystemException if a system exception occurred
755            */
756            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
757                    long companyId, long classNameId, long classPK, boolean primary,
758                    int start, int end,
759                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
760                    throws com.liferay.portal.kernel.exception.SystemException {
761                    return getPersistence()
762                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
763                            start, end, orderByComparator);
764            }
765    
766            /**
767            * Finds the first website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
768            *
769            * <p>
770            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
771            * </p>
772            *
773            * @param companyId the company id to search with
774            * @param classNameId the class name id to search with
775            * @param classPK the class p k to search with
776            * @param primary the primary to search with
777            * @param orderByComparator the comparator to order the set by
778            * @return the first matching website
779            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
780            * @throws SystemException if a system exception occurred
781            */
782            public static com.liferay.portal.model.Website findByC_C_C_P_First(
783                    long companyId, long classNameId, long classPK, boolean primary,
784                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
785                    throws com.liferay.portal.NoSuchWebsiteException,
786                            com.liferay.portal.kernel.exception.SystemException {
787                    return getPersistence()
788                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
789                            primary, orderByComparator);
790            }
791    
792            /**
793            * Finds the last website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
794            *
795            * <p>
796            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
797            * </p>
798            *
799            * @param companyId the company id to search with
800            * @param classNameId the class name id to search with
801            * @param classPK the class p k to search with
802            * @param primary the primary to search with
803            * @param orderByComparator the comparator to order the set by
804            * @return the last matching website
805            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
806            * @throws SystemException if a system exception occurred
807            */
808            public static com.liferay.portal.model.Website findByC_C_C_P_Last(
809                    long companyId, long classNameId, long classPK, boolean primary,
810                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
811                    throws com.liferay.portal.NoSuchWebsiteException,
812                            com.liferay.portal.kernel.exception.SystemException {
813                    return getPersistence()
814                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
815                            primary, orderByComparator);
816            }
817    
818            /**
819            * Finds the websites before and after the current website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
820            *
821            * <p>
822            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
823            * </p>
824            *
825            * @param websiteId the primary key of the current website
826            * @param companyId the company id to search with
827            * @param classNameId the class name id to search with
828            * @param classPK the class p k to search with
829            * @param primary the primary to search with
830            * @param orderByComparator the comparator to order the set by
831            * @return the previous, current, and next website
832            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
833            * @throws SystemException if a system exception occurred
834            */
835            public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext(
836                    long websiteId, long companyId, long classNameId, long classPK,
837                    boolean primary,
838                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
839                    throws com.liferay.portal.NoSuchWebsiteException,
840                            com.liferay.portal.kernel.exception.SystemException {
841                    return getPersistence()
842                                       .findByC_C_C_P_PrevAndNext(websiteId, companyId,
843                            classNameId, classPK, primary, orderByComparator);
844            }
845    
846            /**
847            * Finds all the websites.
848            *
849            * @return the websites
850            * @throws SystemException if a system exception occurred
851            */
852            public static java.util.List<com.liferay.portal.model.Website> findAll()
853                    throws com.liferay.portal.kernel.exception.SystemException {
854                    return getPersistence().findAll();
855            }
856    
857            /**
858            * Finds a range of all the websites.
859            *
860            * <p>
861            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
862            * </p>
863            *
864            * @param start the lower bound of the range of websites to return
865            * @param end the upper bound of the range of websites to return (not inclusive)
866            * @return the range of websites
867            * @throws SystemException if a system exception occurred
868            */
869            public static java.util.List<com.liferay.portal.model.Website> findAll(
870                    int start, int end)
871                    throws com.liferay.portal.kernel.exception.SystemException {
872                    return getPersistence().findAll(start, end);
873            }
874    
875            /**
876            * Finds an ordered range of all the websites.
877            *
878            * <p>
879            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
880            * </p>
881            *
882            * @param start the lower bound of the range of websites to return
883            * @param end the upper bound of the range of websites to return (not inclusive)
884            * @param orderByComparator the comparator to order the results by
885            * @return the ordered range of websites
886            * @throws SystemException if a system exception occurred
887            */
888            public static java.util.List<com.liferay.portal.model.Website> findAll(
889                    int start, int end,
890                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
891                    throws com.liferay.portal.kernel.exception.SystemException {
892                    return getPersistence().findAll(start, end, orderByComparator);
893            }
894    
895            /**
896            * Removes all the websites where companyId = &#63; from the database.
897            *
898            * @param companyId the company id to search with
899            * @throws SystemException if a system exception occurred
900            */
901            public static void removeByCompanyId(long companyId)
902                    throws com.liferay.portal.kernel.exception.SystemException {
903                    getPersistence().removeByCompanyId(companyId);
904            }
905    
906            /**
907            * Removes all the websites where userId = &#63; from the database.
908            *
909            * @param userId the user id to search with
910            * @throws SystemException if a system exception occurred
911            */
912            public static void removeByUserId(long userId)
913                    throws com.liferay.portal.kernel.exception.SystemException {
914                    getPersistence().removeByUserId(userId);
915            }
916    
917            /**
918            * Removes all the websites where companyId = &#63; and classNameId = &#63; from the database.
919            *
920            * @param companyId the company id to search with
921            * @param classNameId the class name id to search with
922            * @throws SystemException if a system exception occurred
923            */
924            public static void removeByC_C(long companyId, long classNameId)
925                    throws com.liferay.portal.kernel.exception.SystemException {
926                    getPersistence().removeByC_C(companyId, classNameId);
927            }
928    
929            /**
930            * Removes all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
931            *
932            * @param companyId the company id to search with
933            * @param classNameId the class name id to search with
934            * @param classPK the class p k to search with
935            * @throws SystemException if a system exception occurred
936            */
937            public static void removeByC_C_C(long companyId, long classNameId,
938                    long classPK)
939                    throws com.liferay.portal.kernel.exception.SystemException {
940                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
941            }
942    
943            /**
944            * Removes all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
945            *
946            * @param companyId the company id to search with
947            * @param classNameId the class name id to search with
948            * @param classPK the class p k to search with
949            * @param primary the primary to search with
950            * @throws SystemException if a system exception occurred
951            */
952            public static void removeByC_C_C_P(long companyId, long classNameId,
953                    long classPK, boolean primary)
954                    throws com.liferay.portal.kernel.exception.SystemException {
955                    getPersistence()
956                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
957            }
958    
959            /**
960            * Removes all the websites from the database.
961            *
962            * @throws SystemException if a system exception occurred
963            */
964            public static void removeAll()
965                    throws com.liferay.portal.kernel.exception.SystemException {
966                    getPersistence().removeAll();
967            }
968    
969            /**
970            * Counts all the websites where companyId = &#63;.
971            *
972            * @param companyId the company id to search with
973            * @return the number of matching websites
974            * @throws SystemException if a system exception occurred
975            */
976            public static int countByCompanyId(long companyId)
977                    throws com.liferay.portal.kernel.exception.SystemException {
978                    return getPersistence().countByCompanyId(companyId);
979            }
980    
981            /**
982            * Counts all the websites where userId = &#63;.
983            *
984            * @param userId the user id to search with
985            * @return the number of matching websites
986            * @throws SystemException if a system exception occurred
987            */
988            public static int countByUserId(long userId)
989                    throws com.liferay.portal.kernel.exception.SystemException {
990                    return getPersistence().countByUserId(userId);
991            }
992    
993            /**
994            * Counts all the websites where companyId = &#63; and classNameId = &#63;.
995            *
996            * @param companyId the company id to search with
997            * @param classNameId the class name id to search with
998            * @return the number of matching websites
999            * @throws SystemException if a system exception occurred
1000            */
1001            public static int countByC_C(long companyId, long classNameId)
1002                    throws com.liferay.portal.kernel.exception.SystemException {
1003                    return getPersistence().countByC_C(companyId, classNameId);
1004            }
1005    
1006            /**
1007            * Counts all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1008            *
1009            * @param companyId the company id to search with
1010            * @param classNameId the class name id to search with
1011            * @param classPK the class p k to search with
1012            * @return the number of matching websites
1013            * @throws SystemException if a system exception occurred
1014            */
1015            public static int countByC_C_C(long companyId, long classNameId,
1016                    long classPK)
1017                    throws com.liferay.portal.kernel.exception.SystemException {
1018                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
1019            }
1020    
1021            /**
1022            * Counts all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1023            *
1024            * @param companyId the company id to search with
1025            * @param classNameId the class name id to search with
1026            * @param classPK the class p k to search with
1027            * @param primary the primary to search with
1028            * @return the number of matching websites
1029            * @throws SystemException if a system exception occurred
1030            */
1031            public static int countByC_C_C_P(long companyId, long classNameId,
1032                    long classPK, boolean primary)
1033                    throws com.liferay.portal.kernel.exception.SystemException {
1034                    return getPersistence()
1035                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
1036            }
1037    
1038            /**
1039            * Counts all the websites.
1040            *
1041            * @return the number of websites
1042            * @throws SystemException if a system exception occurred
1043            */
1044            public static int countAll()
1045                    throws com.liferay.portal.kernel.exception.SystemException {
1046                    return getPersistence().countAll();
1047            }
1048    
1049            public static WebsitePersistence getPersistence() {
1050                    if (_persistence == null) {
1051                            _persistence = (WebsitePersistence)PortalBeanLocatorUtil.locate(WebsitePersistence.class.getName());
1052                    }
1053    
1054                    return _persistence;
1055            }
1056    
1057            public void setPersistence(WebsitePersistence persistence) {
1058                    _persistence = persistence;
1059            }
1060    
1061            private static WebsitePersistence _persistence;
1062    }