001    /**
002     * Copyright (c) 2000-2013 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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.Website;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the website service. This utility wraps {@link WebsitePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see WebsitePersistence
036     * @see WebsitePersistenceImpl
037     * @generated
038     */
039    public class WebsiteUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(Website website) {
057                    getPersistence().clearCache(website);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<Website> findWithDynamicQuery(DynamicQuery dynamicQuery)
072                    throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<Website> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<Website> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
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
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
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. Does not add the website to the database.
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
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            * Returns 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
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            * Returns 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
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            * Returns all the websites where companyId = &#63;.
191            *
192            * @param companyId the company ID
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            * Returns 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
210            * @param start the lower bound of the range of websites
211            * @param end the upper bound of the range of websites (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            * Returns 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
229            * @param start the lower bound of the range of websites
230            * @param end the upper bound of the range of websites (not inclusive)
231            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns the first website in the ordered set where companyId = &#63;.
245            *
246            * @param companyId the company ID
247            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
248            * @return the first matching website
249            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portal.model.Website findByCompanyId_First(
253                    long companyId,
254                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255                    throws com.liferay.portal.NoSuchWebsiteException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    return getPersistence()
258                                       .findByCompanyId_First(companyId, orderByComparator);
259            }
260    
261            /**
262            * Returns the first website in the ordered set where companyId = &#63;.
263            *
264            * @param companyId the company ID
265            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
266            * @return the first matching website, or <code>null</code> if a matching website could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portal.model.Website fetchByCompanyId_First(
270                    long companyId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getPersistence()
274                                       .fetchByCompanyId_First(companyId, orderByComparator);
275            }
276    
277            /**
278            * Returns the last website in the ordered set where companyId = &#63;.
279            *
280            * @param companyId the company ID
281            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
282            * @return the last matching website
283            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
284            * @throws SystemException if a system exception occurred
285            */
286            public static com.liferay.portal.model.Website findByCompanyId_Last(
287                    long companyId,
288                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
289                    throws com.liferay.portal.NoSuchWebsiteException,
290                            com.liferay.portal.kernel.exception.SystemException {
291                    return getPersistence()
292                                       .findByCompanyId_Last(companyId, orderByComparator);
293            }
294    
295            /**
296            * Returns the last website in the ordered set where companyId = &#63;.
297            *
298            * @param companyId the company ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the last matching website, or <code>null</code> if a matching website could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portal.model.Website fetchByCompanyId_Last(
304                    long companyId,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence()
308                                       .fetchByCompanyId_Last(companyId, orderByComparator);
309            }
310    
311            /**
312            * Returns the websites before and after the current website in the ordered set where companyId = &#63;.
313            *
314            * @param websiteId the primary key of the current website
315            * @param companyId the company ID
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the previous, current, and next website
318            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
319            * @throws SystemException if a system exception occurred
320            */
321            public static com.liferay.portal.model.Website[] findByCompanyId_PrevAndNext(
322                    long websiteId, long companyId,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.NoSuchWebsiteException,
325                            com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence()
327                                       .findByCompanyId_PrevAndNext(websiteId, companyId,
328                            orderByComparator);
329            }
330    
331            /**
332            * Returns all the websites where userId = &#63;.
333            *
334            * @param userId the user ID
335            * @return the matching websites
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portal.model.Website> findByUserId(
339                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
340                    return getPersistence().findByUserId(userId);
341            }
342    
343            /**
344            * Returns a range of all the websites where userId = &#63;.
345            *
346            * <p>
347            * 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.
348            * </p>
349            *
350            * @param userId the user ID
351            * @param start the lower bound of the range of websites
352            * @param end the upper bound of the range of websites (not inclusive)
353            * @return the 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                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence().findByUserId(userId, start, end);
360            }
361    
362            /**
363            * Returns an ordered range of all the websites where userId = &#63;.
364            *
365            * <p>
366            * 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.
367            * </p>
368            *
369            * @param userId the user ID
370            * @param start the lower bound of the range of websites
371            * @param end the upper bound of the range of websites (not inclusive)
372            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
373            * @return the ordered range of matching websites
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portal.model.Website> findByUserId(
377                    long userId, int start, int end,
378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379                    throws com.liferay.portal.kernel.exception.SystemException {
380                    return getPersistence()
381                                       .findByUserId(userId, start, end, orderByComparator);
382            }
383    
384            /**
385            * Returns the first website in the ordered set where userId = &#63;.
386            *
387            * @param userId the user ID
388            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
389            * @return the first matching website
390            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
391            * @throws SystemException if a system exception occurred
392            */
393            public static com.liferay.portal.model.Website findByUserId_First(
394                    long userId,
395                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
396                    throws com.liferay.portal.NoSuchWebsiteException,
397                            com.liferay.portal.kernel.exception.SystemException {
398                    return getPersistence().findByUserId_First(userId, orderByComparator);
399            }
400    
401            /**
402            * Returns the first website in the ordered set where userId = &#63;.
403            *
404            * @param userId the user ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the first matching website, or <code>null</code> if a matching website could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public static com.liferay.portal.model.Website fetchByUserId_First(
410                    long userId,
411                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
412                    throws com.liferay.portal.kernel.exception.SystemException {
413                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
414            }
415    
416            /**
417            * Returns the last website in the ordered set where userId = &#63;.
418            *
419            * @param userId the user ID
420            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
421            * @return the last matching website
422            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
423            * @throws SystemException if a system exception occurred
424            */
425            public static com.liferay.portal.model.Website findByUserId_Last(
426                    long userId,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.NoSuchWebsiteException,
429                            com.liferay.portal.kernel.exception.SystemException {
430                    return getPersistence().findByUserId_Last(userId, orderByComparator);
431            }
432    
433            /**
434            * Returns the last website in the ordered set where userId = &#63;.
435            *
436            * @param userId the user ID
437            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
438            * @return the last matching website, or <code>null</code> if a matching website could not be found
439            * @throws SystemException if a system exception occurred
440            */
441            public static com.liferay.portal.model.Website fetchByUserId_Last(
442                    long userId,
443                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
446            }
447    
448            /**
449            * Returns the websites before and after the current website in the ordered set where userId = &#63;.
450            *
451            * @param websiteId the primary key of the current website
452            * @param userId the user ID
453            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
454            * @return the previous, current, and next website
455            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
456            * @throws SystemException if a system exception occurred
457            */
458            public static com.liferay.portal.model.Website[] findByUserId_PrevAndNext(
459                    long websiteId, long userId,
460                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
461                    throws com.liferay.portal.NoSuchWebsiteException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    return getPersistence()
464                                       .findByUserId_PrevAndNext(websiteId, userId,
465                            orderByComparator);
466            }
467    
468            /**
469            * Returns all the websites where companyId = &#63; and classNameId = &#63;.
470            *
471            * @param companyId the company ID
472            * @param classNameId the class name ID
473            * @return the matching websites
474            * @throws SystemException if a system exception occurred
475            */
476            public static java.util.List<com.liferay.portal.model.Website> findByC_C(
477                    long companyId, long classNameId)
478                    throws com.liferay.portal.kernel.exception.SystemException {
479                    return getPersistence().findByC_C(companyId, classNameId);
480            }
481    
482            /**
483            * Returns a range of all the websites where companyId = &#63; and classNameId = &#63;.
484            *
485            * <p>
486            * 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.
487            * </p>
488            *
489            * @param companyId the company ID
490            * @param classNameId the class name ID
491            * @param start the lower bound of the range of websites
492            * @param end the upper bound of the range of websites (not inclusive)
493            * @return the range of matching websites
494            * @throws SystemException if a system exception occurred
495            */
496            public static java.util.List<com.liferay.portal.model.Website> findByC_C(
497                    long companyId, long classNameId, int start, int end)
498                    throws com.liferay.portal.kernel.exception.SystemException {
499                    return getPersistence().findByC_C(companyId, classNameId, start, end);
500            }
501    
502            /**
503            * Returns an ordered range of all the websites where companyId = &#63; and classNameId = &#63;.
504            *
505            * <p>
506            * 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.
507            * </p>
508            *
509            * @param companyId the company ID
510            * @param classNameId the class name ID
511            * @param start the lower bound of the range of websites
512            * @param end the upper bound of the range of websites (not inclusive)
513            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
514            * @return the ordered range of matching websites
515            * @throws SystemException if a system exception occurred
516            */
517            public static java.util.List<com.liferay.portal.model.Website> findByC_C(
518                    long companyId, long classNameId, int start, int end,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence()
522                                       .findByC_C(companyId, classNameId, start, end,
523                            orderByComparator);
524            }
525    
526            /**
527            * Returns the first website in the ordered set where companyId = &#63; and classNameId = &#63;.
528            *
529            * @param companyId the company ID
530            * @param classNameId the class name ID
531            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
532            * @return the first matching website
533            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
534            * @throws SystemException if a system exception occurred
535            */
536            public static com.liferay.portal.model.Website findByC_C_First(
537                    long companyId, long classNameId,
538                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
539                    throws com.liferay.portal.NoSuchWebsiteException,
540                            com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence()
542                                       .findByC_C_First(companyId, classNameId, orderByComparator);
543            }
544    
545            /**
546            * Returns the first website in the ordered set where companyId = &#63; and classNameId = &#63;.
547            *
548            * @param companyId the company ID
549            * @param classNameId the class name ID
550            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
551            * @return the first matching website, or <code>null</code> if a matching website could not be found
552            * @throws SystemException if a system exception occurred
553            */
554            public static com.liferay.portal.model.Website fetchByC_C_First(
555                    long companyId, long classNameId,
556                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
557                    throws com.liferay.portal.kernel.exception.SystemException {
558                    return getPersistence()
559                                       .fetchByC_C_First(companyId, classNameId, orderByComparator);
560            }
561    
562            /**
563            * Returns the last website in the ordered set where companyId = &#63; and classNameId = &#63;.
564            *
565            * @param companyId the company ID
566            * @param classNameId the class name ID
567            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
568            * @return the last matching website
569            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
570            * @throws SystemException if a system exception occurred
571            */
572            public static com.liferay.portal.model.Website findByC_C_Last(
573                    long companyId, long classNameId,
574                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
575                    throws com.liferay.portal.NoSuchWebsiteException,
576                            com.liferay.portal.kernel.exception.SystemException {
577                    return getPersistence()
578                                       .findByC_C_Last(companyId, classNameId, orderByComparator);
579            }
580    
581            /**
582            * Returns the last website in the ordered set where companyId = &#63; and classNameId = &#63;.
583            *
584            * @param companyId the company ID
585            * @param classNameId the class name ID
586            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
587            * @return the last matching website, or <code>null</code> if a matching website could not be found
588            * @throws SystemException if a system exception occurred
589            */
590            public static com.liferay.portal.model.Website fetchByC_C_Last(
591                    long companyId, long classNameId,
592                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
593                    throws com.liferay.portal.kernel.exception.SystemException {
594                    return getPersistence()
595                                       .fetchByC_C_Last(companyId, classNameId, orderByComparator);
596            }
597    
598            /**
599            * Returns the websites before and after the current website in the ordered set where companyId = &#63; and classNameId = &#63;.
600            *
601            * @param websiteId the primary key of the current website
602            * @param companyId the company ID
603            * @param classNameId the class name ID
604            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
605            * @return the previous, current, and next website
606            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
607            * @throws SystemException if a system exception occurred
608            */
609            public static com.liferay.portal.model.Website[] findByC_C_PrevAndNext(
610                    long websiteId, long companyId, long classNameId,
611                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
612                    throws com.liferay.portal.NoSuchWebsiteException,
613                            com.liferay.portal.kernel.exception.SystemException {
614                    return getPersistence()
615                                       .findByC_C_PrevAndNext(websiteId, companyId, classNameId,
616                            orderByComparator);
617            }
618    
619            /**
620            * Returns all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
621            *
622            * @param companyId the company ID
623            * @param classNameId the class name ID
624            * @param classPK the class p k
625            * @return the matching websites
626            * @throws SystemException if a system exception occurred
627            */
628            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
629                    long companyId, long classNameId, long classPK)
630                    throws com.liferay.portal.kernel.exception.SystemException {
631                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
632            }
633    
634            /**
635            * Returns a range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
636            *
637            * <p>
638            * 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.
639            * </p>
640            *
641            * @param companyId the company ID
642            * @param classNameId the class name ID
643            * @param classPK the class p k
644            * @param start the lower bound of the range of websites
645            * @param end the upper bound of the range of websites (not inclusive)
646            * @return the range of matching websites
647            * @throws SystemException if a system exception occurred
648            */
649            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
650                    long companyId, long classNameId, long classPK, int start, int end)
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    return getPersistence()
653                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
654            }
655    
656            /**
657            * Returns an ordered range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
658            *
659            * <p>
660            * 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.
661            * </p>
662            *
663            * @param companyId the company ID
664            * @param classNameId the class name ID
665            * @param classPK the class p k
666            * @param start the lower bound of the range of websites
667            * @param end the upper bound of the range of websites (not inclusive)
668            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
669            * @return the ordered range of matching websites
670            * @throws SystemException if a system exception occurred
671            */
672            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C(
673                    long companyId, long classNameId, long classPK, int start, int end,
674                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    return getPersistence()
677                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
678                            orderByComparator);
679            }
680    
681            /**
682            * Returns the first website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
683            *
684            * @param companyId the company ID
685            * @param classNameId the class name ID
686            * @param classPK the class p k
687            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
688            * @return the first matching website
689            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
690            * @throws SystemException if a system exception occurred
691            */
692            public static com.liferay.portal.model.Website findByC_C_C_First(
693                    long companyId, long classNameId, long classPK,
694                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
695                    throws com.liferay.portal.NoSuchWebsiteException,
696                            com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence()
698                                       .findByC_C_C_First(companyId, classNameId, classPK,
699                            orderByComparator);
700            }
701    
702            /**
703            * Returns the first website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
704            *
705            * @param companyId the company ID
706            * @param classNameId the class name ID
707            * @param classPK the class p k
708            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
709            * @return the first matching website, or <code>null</code> if a matching website could not be found
710            * @throws SystemException if a system exception occurred
711            */
712            public static com.liferay.portal.model.Website fetchByC_C_C_First(
713                    long companyId, long classNameId, long classPK,
714                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
715                    throws com.liferay.portal.kernel.exception.SystemException {
716                    return getPersistence()
717                                       .fetchByC_C_C_First(companyId, classNameId, classPK,
718                            orderByComparator);
719            }
720    
721            /**
722            * Returns the last website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
723            *
724            * @param companyId the company ID
725            * @param classNameId the class name ID
726            * @param classPK the class p k
727            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
728            * @return the last matching website
729            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
730            * @throws SystemException if a system exception occurred
731            */
732            public static com.liferay.portal.model.Website findByC_C_C_Last(
733                    long companyId, long classNameId, long classPK,
734                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
735                    throws com.liferay.portal.NoSuchWebsiteException,
736                            com.liferay.portal.kernel.exception.SystemException {
737                    return getPersistence()
738                                       .findByC_C_C_Last(companyId, classNameId, classPK,
739                            orderByComparator);
740            }
741    
742            /**
743            * Returns the last website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
744            *
745            * @param companyId the company ID
746            * @param classNameId the class name ID
747            * @param classPK the class p k
748            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
749            * @return the last matching website, or <code>null</code> if a matching website could not be found
750            * @throws SystemException if a system exception occurred
751            */
752            public static com.liferay.portal.model.Website fetchByC_C_C_Last(
753                    long companyId, long classNameId, long classPK,
754                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
755                    throws com.liferay.portal.kernel.exception.SystemException {
756                    return getPersistence()
757                                       .fetchByC_C_C_Last(companyId, classNameId, classPK,
758                            orderByComparator);
759            }
760    
761            /**
762            * Returns the websites before and after the current website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
763            *
764            * @param websiteId the primary key of the current website
765            * @param companyId the company ID
766            * @param classNameId the class name ID
767            * @param classPK the class p k
768            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
769            * @return the previous, current, and next website
770            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
771            * @throws SystemException if a system exception occurred
772            */
773            public static com.liferay.portal.model.Website[] findByC_C_C_PrevAndNext(
774                    long websiteId, long companyId, long classNameId, long classPK,
775                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
776                    throws com.liferay.portal.NoSuchWebsiteException,
777                            com.liferay.portal.kernel.exception.SystemException {
778                    return getPersistence()
779                                       .findByC_C_C_PrevAndNext(websiteId, companyId, classNameId,
780                            classPK, orderByComparator);
781            }
782    
783            /**
784            * Returns all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
785            *
786            * @param companyId the company ID
787            * @param classNameId the class name ID
788            * @param classPK the class p k
789            * @param primary the primary
790            * @return the matching websites
791            * @throws SystemException if a system exception occurred
792            */
793            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
794                    long companyId, long classNameId, long classPK, boolean primary)
795                    throws com.liferay.portal.kernel.exception.SystemException {
796                    return getPersistence()
797                                       .findByC_C_C_P(companyId, classNameId, classPK, primary);
798            }
799    
800            /**
801            * Returns a range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
802            *
803            * <p>
804            * 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.
805            * </p>
806            *
807            * @param companyId the company ID
808            * @param classNameId the class name ID
809            * @param classPK the class p k
810            * @param primary the primary
811            * @param start the lower bound of the range of websites
812            * @param end the upper bound of the range of websites (not inclusive)
813            * @return the range of matching websites
814            * @throws SystemException if a system exception occurred
815            */
816            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
817                    long companyId, long classNameId, long classPK, boolean primary,
818                    int start, int end)
819                    throws com.liferay.portal.kernel.exception.SystemException {
820                    return getPersistence()
821                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
822                            start, end);
823            }
824    
825            /**
826            * Returns an ordered range of all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
827            *
828            * <p>
829            * 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.
830            * </p>
831            *
832            * @param companyId the company ID
833            * @param classNameId the class name ID
834            * @param classPK the class p k
835            * @param primary the primary
836            * @param start the lower bound of the range of websites
837            * @param end the upper bound of the range of websites (not inclusive)
838            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
839            * @return the ordered range of matching websites
840            * @throws SystemException if a system exception occurred
841            */
842            public static java.util.List<com.liferay.portal.model.Website> findByC_C_C_P(
843                    long companyId, long classNameId, long classPK, boolean primary,
844                    int start, int end,
845                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
846                    throws com.liferay.portal.kernel.exception.SystemException {
847                    return getPersistence()
848                                       .findByC_C_C_P(companyId, classNameId, classPK, primary,
849                            start, end, orderByComparator);
850            }
851    
852            /**
853            * Returns the first website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
854            *
855            * @param companyId the company ID
856            * @param classNameId the class name ID
857            * @param classPK the class p k
858            * @param primary the primary
859            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
860            * @return the first matching website
861            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
862            * @throws SystemException if a system exception occurred
863            */
864            public static com.liferay.portal.model.Website findByC_C_C_P_First(
865                    long companyId, long classNameId, long classPK, boolean primary,
866                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
867                    throws com.liferay.portal.NoSuchWebsiteException,
868                            com.liferay.portal.kernel.exception.SystemException {
869                    return getPersistence()
870                                       .findByC_C_C_P_First(companyId, classNameId, classPK,
871                            primary, orderByComparator);
872            }
873    
874            /**
875            * Returns the first website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
876            *
877            * @param companyId the company ID
878            * @param classNameId the class name ID
879            * @param classPK the class p k
880            * @param primary the primary
881            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
882            * @return the first matching website, or <code>null</code> if a matching website could not be found
883            * @throws SystemException if a system exception occurred
884            */
885            public static com.liferay.portal.model.Website fetchByC_C_C_P_First(
886                    long companyId, long classNameId, long classPK, boolean primary,
887                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
888                    throws com.liferay.portal.kernel.exception.SystemException {
889                    return getPersistence()
890                                       .fetchByC_C_C_P_First(companyId, classNameId, classPK,
891                            primary, orderByComparator);
892            }
893    
894            /**
895            * Returns the last website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
896            *
897            * @param companyId the company ID
898            * @param classNameId the class name ID
899            * @param classPK the class p k
900            * @param primary the primary
901            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
902            * @return the last matching website
903            * @throws com.liferay.portal.NoSuchWebsiteException if a matching website could not be found
904            * @throws SystemException if a system exception occurred
905            */
906            public static com.liferay.portal.model.Website findByC_C_C_P_Last(
907                    long companyId, long classNameId, long classPK, boolean primary,
908                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
909                    throws com.liferay.portal.NoSuchWebsiteException,
910                            com.liferay.portal.kernel.exception.SystemException {
911                    return getPersistence()
912                                       .findByC_C_C_P_Last(companyId, classNameId, classPK,
913                            primary, orderByComparator);
914            }
915    
916            /**
917            * Returns the last website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
918            *
919            * @param companyId the company ID
920            * @param classNameId the class name ID
921            * @param classPK the class p k
922            * @param primary the primary
923            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
924            * @return the last matching website, or <code>null</code> if a matching website could not be found
925            * @throws SystemException if a system exception occurred
926            */
927            public static com.liferay.portal.model.Website fetchByC_C_C_P_Last(
928                    long companyId, long classNameId, long classPK, boolean primary,
929                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
930                    throws com.liferay.portal.kernel.exception.SystemException {
931                    return getPersistence()
932                                       .fetchByC_C_C_P_Last(companyId, classNameId, classPK,
933                            primary, orderByComparator);
934            }
935    
936            /**
937            * Returns the websites before and after the current website in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
938            *
939            * @param websiteId the primary key of the current website
940            * @param companyId the company ID
941            * @param classNameId the class name ID
942            * @param classPK the class p k
943            * @param primary the primary
944            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
945            * @return the previous, current, and next website
946            * @throws com.liferay.portal.NoSuchWebsiteException if a website with the primary key could not be found
947            * @throws SystemException if a system exception occurred
948            */
949            public static com.liferay.portal.model.Website[] findByC_C_C_P_PrevAndNext(
950                    long websiteId, long companyId, long classNameId, long classPK,
951                    boolean primary,
952                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
953                    throws com.liferay.portal.NoSuchWebsiteException,
954                            com.liferay.portal.kernel.exception.SystemException {
955                    return getPersistence()
956                                       .findByC_C_C_P_PrevAndNext(websiteId, companyId,
957                            classNameId, classPK, primary, orderByComparator);
958            }
959    
960            /**
961            * Returns all the websites.
962            *
963            * @return the websites
964            * @throws SystemException if a system exception occurred
965            */
966            public static java.util.List<com.liferay.portal.model.Website> findAll()
967                    throws com.liferay.portal.kernel.exception.SystemException {
968                    return getPersistence().findAll();
969            }
970    
971            /**
972            * Returns a range of all the websites.
973            *
974            * <p>
975            * 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.
976            * </p>
977            *
978            * @param start the lower bound of the range of websites
979            * @param end the upper bound of the range of websites (not inclusive)
980            * @return the range of websites
981            * @throws SystemException if a system exception occurred
982            */
983            public static java.util.List<com.liferay.portal.model.Website> findAll(
984                    int start, int end)
985                    throws com.liferay.portal.kernel.exception.SystemException {
986                    return getPersistence().findAll(start, end);
987            }
988    
989            /**
990            * Returns an ordered range of all the websites.
991            *
992            * <p>
993            * 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.
994            * </p>
995            *
996            * @param start the lower bound of the range of websites
997            * @param end the upper bound of the range of websites (not inclusive)
998            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
999            * @return the ordered range of websites
1000            * @throws SystemException if a system exception occurred
1001            */
1002            public static java.util.List<com.liferay.portal.model.Website> findAll(
1003                    int start, int end,
1004                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1005                    throws com.liferay.portal.kernel.exception.SystemException {
1006                    return getPersistence().findAll(start, end, orderByComparator);
1007            }
1008    
1009            /**
1010            * Removes all the websites where companyId = &#63; from the database.
1011            *
1012            * @param companyId the company ID
1013            * @throws SystemException if a system exception occurred
1014            */
1015            public static void removeByCompanyId(long companyId)
1016                    throws com.liferay.portal.kernel.exception.SystemException {
1017                    getPersistence().removeByCompanyId(companyId);
1018            }
1019    
1020            /**
1021            * Removes all the websites where userId = &#63; from the database.
1022            *
1023            * @param userId the user ID
1024            * @throws SystemException if a system exception occurred
1025            */
1026            public static void removeByUserId(long userId)
1027                    throws com.liferay.portal.kernel.exception.SystemException {
1028                    getPersistence().removeByUserId(userId);
1029            }
1030    
1031            /**
1032            * Removes all the websites where companyId = &#63; and classNameId = &#63; from the database.
1033            *
1034            * @param companyId the company ID
1035            * @param classNameId the class name ID
1036            * @throws SystemException if a system exception occurred
1037            */
1038            public static void removeByC_C(long companyId, long classNameId)
1039                    throws com.liferay.portal.kernel.exception.SystemException {
1040                    getPersistence().removeByC_C(companyId, classNameId);
1041            }
1042    
1043            /**
1044            * Removes all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
1045            *
1046            * @param companyId the company ID
1047            * @param classNameId the class name ID
1048            * @param classPK the class p k
1049            * @throws SystemException if a system exception occurred
1050            */
1051            public static void removeByC_C_C(long companyId, long classNameId,
1052                    long classPK)
1053                    throws com.liferay.portal.kernel.exception.SystemException {
1054                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
1055            }
1056    
1057            /**
1058            * Removes all the websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63; from the database.
1059            *
1060            * @param companyId the company ID
1061            * @param classNameId the class name ID
1062            * @param classPK the class p k
1063            * @param primary the primary
1064            * @throws SystemException if a system exception occurred
1065            */
1066            public static void removeByC_C_C_P(long companyId, long classNameId,
1067                    long classPK, boolean primary)
1068                    throws com.liferay.portal.kernel.exception.SystemException {
1069                    getPersistence()
1070                            .removeByC_C_C_P(companyId, classNameId, classPK, primary);
1071            }
1072    
1073            /**
1074            * Removes all the websites from the database.
1075            *
1076            * @throws SystemException if a system exception occurred
1077            */
1078            public static void removeAll()
1079                    throws com.liferay.portal.kernel.exception.SystemException {
1080                    getPersistence().removeAll();
1081            }
1082    
1083            /**
1084            * Returns the number of websites where companyId = &#63;.
1085            *
1086            * @param companyId the company ID
1087            * @return the number of matching websites
1088            * @throws SystemException if a system exception occurred
1089            */
1090            public static int countByCompanyId(long companyId)
1091                    throws com.liferay.portal.kernel.exception.SystemException {
1092                    return getPersistence().countByCompanyId(companyId);
1093            }
1094    
1095            /**
1096            * Returns the number of websites where userId = &#63;.
1097            *
1098            * @param userId the user ID
1099            * @return the number of matching websites
1100            * @throws SystemException if a system exception occurred
1101            */
1102            public static int countByUserId(long userId)
1103                    throws com.liferay.portal.kernel.exception.SystemException {
1104                    return getPersistence().countByUserId(userId);
1105            }
1106    
1107            /**
1108            * Returns the number of websites where companyId = &#63; and classNameId = &#63;.
1109            *
1110            * @param companyId the company ID
1111            * @param classNameId the class name ID
1112            * @return the number of matching websites
1113            * @throws SystemException if a system exception occurred
1114            */
1115            public static int countByC_C(long companyId, long classNameId)
1116                    throws com.liferay.portal.kernel.exception.SystemException {
1117                    return getPersistence().countByC_C(companyId, classNameId);
1118            }
1119    
1120            /**
1121            * Returns the number of websites where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
1122            *
1123            * @param companyId the company ID
1124            * @param classNameId the class name ID
1125            * @param classPK the class p k
1126            * @return the number of matching websites
1127            * @throws SystemException if a system exception occurred
1128            */
1129            public static int countByC_C_C(long companyId, long classNameId,
1130                    long classPK)
1131                    throws com.liferay.portal.kernel.exception.SystemException {
1132                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
1133            }
1134    
1135            /**
1136            * Returns the number of websites where companyId = &#63; and classNameId = &#63; and classPK = &#63; and primary = &#63;.
1137            *
1138            * @param companyId the company ID
1139            * @param classNameId the class name ID
1140            * @param classPK the class p k
1141            * @param primary the primary
1142            * @return the number of matching websites
1143            * @throws SystemException if a system exception occurred
1144            */
1145            public static int countByC_C_C_P(long companyId, long classNameId,
1146                    long classPK, boolean primary)
1147                    throws com.liferay.portal.kernel.exception.SystemException {
1148                    return getPersistence()
1149                                       .countByC_C_C_P(companyId, classNameId, classPK, primary);
1150            }
1151    
1152            /**
1153            * Returns the number of websites.
1154            *
1155            * @return the number of websites
1156            * @throws SystemException if a system exception occurred
1157            */
1158            public static int countAll()
1159                    throws com.liferay.portal.kernel.exception.SystemException {
1160                    return getPersistence().countAll();
1161            }
1162    
1163            public static WebsitePersistence getPersistence() {
1164                    if (_persistence == null) {
1165                            _persistence = (WebsitePersistence)PortalBeanLocatorUtil.locate(WebsitePersistence.class.getName());
1166    
1167                            ReferenceRegistry.registerReference(WebsiteUtil.class,
1168                                    "_persistence");
1169                    }
1170    
1171                    return _persistence;
1172            }
1173    
1174            /**
1175             * @deprecated
1176             */
1177            public void setPersistence(WebsitePersistence persistence) {
1178            }
1179    
1180            private static WebsitePersistence _persistence;
1181    }