1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.NoSuchWebsiteException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.BeanReference;
28  import com.liferay.portal.kernel.cache.CacheRegistry;
29  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
30  import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
31  import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
32  import com.liferay.portal.kernel.dao.orm.FinderPath;
33  import com.liferay.portal.kernel.dao.orm.Query;
34  import com.liferay.portal.kernel.dao.orm.QueryPos;
35  import com.liferay.portal.kernel.dao.orm.QueryUtil;
36  import com.liferay.portal.kernel.dao.orm.Session;
37  import com.liferay.portal.kernel.log.Log;
38  import com.liferay.portal.kernel.log.LogFactoryUtil;
39  import com.liferay.portal.kernel.util.GetterUtil;
40  import com.liferay.portal.kernel.util.OrderByComparator;
41  import com.liferay.portal.kernel.util.StringPool;
42  import com.liferay.portal.kernel.util.StringUtil;
43  import com.liferay.portal.model.ModelListener;
44  import com.liferay.portal.model.Website;
45  import com.liferay.portal.model.impl.WebsiteImpl;
46  import com.liferay.portal.model.impl.WebsiteModelImpl;
47  import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
48  
49  import java.util.ArrayList;
50  import java.util.Collections;
51  import java.util.List;
52  
53  /**
54   * <a href="WebsitePersistenceImpl.java.html"><b><i>View Source</i></b></a>
55   *
56   * <p>
57   * ServiceBuilder generated this class. Modifications in this class will be
58   * overwritten the next time is generated.
59   * </p>
60   *
61   * @author    Brian Wing Shun Chan
62   * @see       WebsitePersistence
63   * @see       WebsiteUtil
64   * @generated
65   */
66  public class WebsitePersistenceImpl extends BasePersistenceImpl
67      implements WebsitePersistence {
68      public static final String FINDER_CLASS_NAME_ENTITY = WebsiteImpl.class.getName();
69      public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
70          ".List";
71      public static final FinderPath FINDER_PATH_FIND_BY_COMPANYID = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
72              WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
73              "findByCompanyId", new String[] { Long.class.getName() });
74      public static final FinderPath FINDER_PATH_FIND_BY_OBC_COMPANYID = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
75              WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
76              "findByCompanyId",
77              new String[] {
78                  Long.class.getName(),
79                  
80              "java.lang.Integer", "java.lang.Integer",
81                  "com.liferay.portal.kernel.util.OrderByComparator"
82              });
83      public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
84              WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
85              "countByCompanyId", new String[] { Long.class.getName() });
86      public static final FinderPath FINDER_PATH_FIND_BY_USERID = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
87              WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
88              "findByUserId", new String[] { Long.class.getName() });
89      public static final FinderPath FINDER_PATH_FIND_BY_OBC_USERID = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
90              WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
91              "findByUserId",
92              new String[] {
93                  Long.class.getName(),
94                  
95              "java.lang.Integer", "java.lang.Integer",
96                  "com.liferay.portal.kernel.util.OrderByComparator"
97              });
98      public static final FinderPath FINDER_PATH_COUNT_BY_USERID = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
99              WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
100             "countByUserId", new String[] { Long.class.getName() });
101     public static final FinderPath FINDER_PATH_FIND_BY_C_C = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
102             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
103             "findByC_C",
104             new String[] { Long.class.getName(), Long.class.getName() });
105     public static final FinderPath FINDER_PATH_FIND_BY_OBC_C_C = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
106             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
107             "findByC_C",
108             new String[] {
109                 Long.class.getName(), Long.class.getName(),
110                 
111             "java.lang.Integer", "java.lang.Integer",
112                 "com.liferay.portal.kernel.util.OrderByComparator"
113             });
114     public static final FinderPath FINDER_PATH_COUNT_BY_C_C = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
115             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
116             "countByC_C",
117             new String[] { Long.class.getName(), Long.class.getName() });
118     public static final FinderPath FINDER_PATH_FIND_BY_C_C_C = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
119             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
120             "findByC_C_C",
121             new String[] {
122                 Long.class.getName(), Long.class.getName(), Long.class.getName()
123             });
124     public static final FinderPath FINDER_PATH_FIND_BY_OBC_C_C_C = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
125             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
126             "findByC_C_C",
127             new String[] {
128                 Long.class.getName(), Long.class.getName(), Long.class.getName(),
129                 
130             "java.lang.Integer", "java.lang.Integer",
131                 "com.liferay.portal.kernel.util.OrderByComparator"
132             });
133     public static final FinderPath FINDER_PATH_COUNT_BY_C_C_C = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
134             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
135             "countByC_C_C",
136             new String[] {
137                 Long.class.getName(), Long.class.getName(), Long.class.getName()
138             });
139     public static final FinderPath FINDER_PATH_FIND_BY_C_C_C_P = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
140             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
141             "findByC_C_C_P",
142             new String[] {
143                 Long.class.getName(), Long.class.getName(), Long.class.getName(),
144                 Boolean.class.getName()
145             });
146     public static final FinderPath FINDER_PATH_FIND_BY_OBC_C_C_C_P = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
147             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
148             "findByC_C_C_P",
149             new String[] {
150                 Long.class.getName(), Long.class.getName(), Long.class.getName(),
151                 Boolean.class.getName(),
152                 
153             "java.lang.Integer", "java.lang.Integer",
154                 "com.liferay.portal.kernel.util.OrderByComparator"
155             });
156     public static final FinderPath FINDER_PATH_COUNT_BY_C_C_C_P = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
157             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
158             "countByC_C_C_P",
159             new String[] {
160                 Long.class.getName(), Long.class.getName(), Long.class.getName(),
161                 Boolean.class.getName()
162             });
163     public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
164             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
165             "findAll", new String[0]);
166     public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
167             WebsiteModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
168             "countAll", new String[0]);
169 
170     public void cacheResult(Website website) {
171         EntityCacheUtil.putResult(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
172             WebsiteImpl.class, website.getPrimaryKey(), website);
173     }
174 
175     public void cacheResult(List<Website> websites) {
176         for (Website website : websites) {
177             if (EntityCacheUtil.getResult(
178                         WebsiteModelImpl.ENTITY_CACHE_ENABLED,
179                         WebsiteImpl.class, website.getPrimaryKey(), this) == null) {
180                 cacheResult(website);
181             }
182         }
183     }
184 
185     public void clearCache() {
186         CacheRegistry.clear(WebsiteImpl.class.getName());
187         EntityCacheUtil.clearCache(WebsiteImpl.class.getName());
188         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
189         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
190     }
191 
192     public Website create(long websiteId) {
193         Website website = new WebsiteImpl();
194 
195         website.setNew(true);
196         website.setPrimaryKey(websiteId);
197 
198         return website;
199     }
200 
201     public Website remove(long websiteId)
202         throws NoSuchWebsiteException, SystemException {
203         Session session = null;
204 
205         try {
206             session = openSession();
207 
208             Website website = (Website)session.get(WebsiteImpl.class,
209                     new Long(websiteId));
210 
211             if (website == null) {
212                 if (_log.isWarnEnabled()) {
213                     _log.warn("No Website exists with the primary key " +
214                         websiteId);
215                 }
216 
217                 throw new NoSuchWebsiteException(
218                     "No Website exists with the primary key " + websiteId);
219             }
220 
221             return remove(website);
222         }
223         catch (NoSuchWebsiteException nsee) {
224             throw nsee;
225         }
226         catch (Exception e) {
227             throw processException(e);
228         }
229         finally {
230             closeSession(session);
231         }
232     }
233 
234     public Website remove(Website website) throws SystemException {
235         for (ModelListener<Website> listener : listeners) {
236             listener.onBeforeRemove(website);
237         }
238 
239         website = removeImpl(website);
240 
241         for (ModelListener<Website> listener : listeners) {
242             listener.onAfterRemove(website);
243         }
244 
245         return website;
246     }
247 
248     protected Website removeImpl(Website website) throws SystemException {
249         website = toUnwrappedModel(website);
250 
251         Session session = null;
252 
253         try {
254             session = openSession();
255 
256             if (website.isCachedModel() || BatchSessionUtil.isEnabled()) {
257                 Object staleObject = session.get(WebsiteImpl.class,
258                         website.getPrimaryKeyObj());
259 
260                 if (staleObject != null) {
261                     session.evict(staleObject);
262                 }
263             }
264 
265             session.delete(website);
266 
267             session.flush();
268         }
269         catch (Exception e) {
270             throw processException(e);
271         }
272         finally {
273             closeSession(session);
274         }
275 
276         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
277 
278         EntityCacheUtil.removeResult(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
279             WebsiteImpl.class, website.getPrimaryKey());
280 
281         return website;
282     }
283 
284     /**
285      * @deprecated Use {@link #update(Website, boolean merge)}.
286      */
287     public Website update(Website website) throws SystemException {
288         if (_log.isWarnEnabled()) {
289             _log.warn(
290                 "Using the deprecated update(Website website) method. Use update(Website website, boolean merge) instead.");
291         }
292 
293         return update(website, false);
294     }
295 
296     /**
297      * Add, update, or merge, the entity. This method also calls the model
298      * listeners to trigger the proper events associated with adding, deleting,
299      * or updating an entity.
300      *
301      * @param  website the entity to add, update, or merge
302      * @param  merge boolean value for whether to merge the entity. The default
303      *         value is false. Setting merge to true is more expensive and
304      *         should only be true when website is transient. See
305      *         LEP-5473 for a detailed discussion of this method.
306      * @return the entity that was added, updated, or merged
307      */
308     public Website update(Website website, boolean merge)
309         throws SystemException {
310         boolean isNew = website.isNew();
311 
312         for (ModelListener<Website> listener : listeners) {
313             if (isNew) {
314                 listener.onBeforeCreate(website);
315             }
316             else {
317                 listener.onBeforeUpdate(website);
318             }
319         }
320 
321         website = updateImpl(website, merge);
322 
323         for (ModelListener<Website> listener : listeners) {
324             if (isNew) {
325                 listener.onAfterCreate(website);
326             }
327             else {
328                 listener.onAfterUpdate(website);
329             }
330         }
331 
332         return website;
333     }
334 
335     public Website updateImpl(com.liferay.portal.model.Website website,
336         boolean merge) throws SystemException {
337         website = toUnwrappedModel(website);
338 
339         Session session = null;
340 
341         try {
342             session = openSession();
343 
344             BatchSessionUtil.update(session, website, merge);
345 
346             website.setNew(false);
347         }
348         catch (Exception e) {
349             throw processException(e);
350         }
351         finally {
352             closeSession(session);
353         }
354 
355         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
356 
357         EntityCacheUtil.putResult(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
358             WebsiteImpl.class, website.getPrimaryKey(), website);
359 
360         return website;
361     }
362 
363     protected Website toUnwrappedModel(Website website) {
364         if (website instanceof WebsiteImpl) {
365             return website;
366         }
367 
368         WebsiteImpl websiteImpl = new WebsiteImpl();
369 
370         websiteImpl.setNew(website.isNew());
371         websiteImpl.setPrimaryKey(website.getPrimaryKey());
372 
373         websiteImpl.setWebsiteId(website.getWebsiteId());
374         websiteImpl.setCompanyId(website.getCompanyId());
375         websiteImpl.setUserId(website.getUserId());
376         websiteImpl.setUserName(website.getUserName());
377         websiteImpl.setCreateDate(website.getCreateDate());
378         websiteImpl.setModifiedDate(website.getModifiedDate());
379         websiteImpl.setClassNameId(website.getClassNameId());
380         websiteImpl.setClassPK(website.getClassPK());
381         websiteImpl.setUrl(website.getUrl());
382         websiteImpl.setTypeId(website.getTypeId());
383         websiteImpl.setPrimary(website.isPrimary());
384 
385         return websiteImpl;
386     }
387 
388     public Website findByPrimaryKey(long websiteId)
389         throws NoSuchWebsiteException, SystemException {
390         Website website = fetchByPrimaryKey(websiteId);
391 
392         if (website == null) {
393             if (_log.isWarnEnabled()) {
394                 _log.warn("No Website exists with the primary key " +
395                     websiteId);
396             }
397 
398             throw new NoSuchWebsiteException(
399                 "No Website exists with the primary key " + websiteId);
400         }
401 
402         return website;
403     }
404 
405     public Website fetchByPrimaryKey(long websiteId) throws SystemException {
406         Website website = (Website)EntityCacheUtil.getResult(WebsiteModelImpl.ENTITY_CACHE_ENABLED,
407                 WebsiteImpl.class, websiteId, this);
408 
409         if (website == null) {
410             Session session = null;
411 
412             try {
413                 session = openSession();
414 
415                 website = (Website)session.get(WebsiteImpl.class,
416                         new Long(websiteId));
417             }
418             catch (Exception e) {
419                 throw processException(e);
420             }
421             finally {
422                 if (website != null) {
423                     cacheResult(website);
424                 }
425 
426                 closeSession(session);
427             }
428         }
429 
430         return website;
431     }
432 
433     public List<Website> findByCompanyId(long companyId)
434         throws SystemException {
435         Object[] finderArgs = new Object[] { new Long(companyId) };
436 
437         List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COMPANYID,
438                 finderArgs, this);
439 
440         if (list == null) {
441             Session session = null;
442 
443             try {
444                 session = openSession();
445 
446                 StringBuilder query = new StringBuilder();
447 
448                 query.append("SELECT website FROM Website website WHERE ");
449 
450                 query.append("website.companyId = ?");
451 
452                 query.append(" ");
453 
454                 query.append("ORDER BY ");
455 
456                 query.append("website.createDate ASC");
457 
458                 Query q = session.createQuery(query.toString());
459 
460                 QueryPos qPos = QueryPos.getInstance(q);
461 
462                 qPos.add(companyId);
463 
464                 list = q.list();
465             }
466             catch (Exception e) {
467                 throw processException(e);
468             }
469             finally {
470                 if (list == null) {
471                     list = new ArrayList<Website>();
472                 }
473 
474                 cacheResult(list);
475 
476                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
477                     finderArgs, list);
478 
479                 closeSession(session);
480             }
481         }
482 
483         return list;
484     }
485 
486     public List<Website> findByCompanyId(long companyId, int start, int end)
487         throws SystemException {
488         return findByCompanyId(companyId, start, end, null);
489     }
490 
491     public List<Website> findByCompanyId(long companyId, int start, int end,
492         OrderByComparator obc) throws SystemException {
493         Object[] finderArgs = new Object[] {
494                 new Long(companyId),
495                 
496                 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
497             };
498 
499         List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_COMPANYID,
500                 finderArgs, this);
501 
502         if (list == null) {
503             Session session = null;
504 
505             try {
506                 session = openSession();
507 
508                 StringBuilder query = new StringBuilder();
509 
510                 query.append("SELECT website FROM Website website WHERE ");
511 
512                 query.append("website.companyId = ?");
513 
514                 query.append(" ");
515 
516                 if (obc != null) {
517                     query.append("ORDER BY ");
518 
519                     String[] orderByFields = obc.getOrderByFields();
520 
521                     for (int i = 0; i < orderByFields.length; i++) {
522                         query.append("website.");
523                         query.append(orderByFields[i]);
524 
525                         if (obc.isAscending()) {
526                             query.append(" ASC");
527                         }
528                         else {
529                             query.append(" DESC");
530                         }
531 
532                         if ((i + 1) < orderByFields.length) {
533                             query.append(", ");
534                         }
535                     }
536                 }
537 
538                 else {
539                     query.append("ORDER BY ");
540 
541                     query.append("website.createDate ASC");
542                 }
543 
544                 Query q = session.createQuery(query.toString());
545 
546                 QueryPos qPos = QueryPos.getInstance(q);
547 
548                 qPos.add(companyId);
549 
550                 list = (List<Website>)QueryUtil.list(q, getDialect(), start, end);
551             }
552             catch (Exception e) {
553                 throw processException(e);
554             }
555             finally {
556                 if (list == null) {
557                     list = new ArrayList<Website>();
558                 }
559 
560                 cacheResult(list);
561 
562                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_COMPANYID,
563                     finderArgs, list);
564 
565                 closeSession(session);
566             }
567         }
568 
569         return list;
570     }
571 
572     public Website findByCompanyId_First(long companyId, OrderByComparator obc)
573         throws NoSuchWebsiteException, SystemException {
574         List<Website> list = findByCompanyId(companyId, 0, 1, obc);
575 
576         if (list.isEmpty()) {
577             StringBuilder msg = new StringBuilder();
578 
579             msg.append("No Website exists with the key {");
580 
581             msg.append("companyId=" + companyId);
582 
583             msg.append(StringPool.CLOSE_CURLY_BRACE);
584 
585             throw new NoSuchWebsiteException(msg.toString());
586         }
587         else {
588             return list.get(0);
589         }
590     }
591 
592     public Website findByCompanyId_Last(long companyId, OrderByComparator obc)
593         throws NoSuchWebsiteException, SystemException {
594         int count = countByCompanyId(companyId);
595 
596         List<Website> list = findByCompanyId(companyId, count - 1, count, obc);
597 
598         if (list.isEmpty()) {
599             StringBuilder msg = new StringBuilder();
600 
601             msg.append("No Website exists with the key {");
602 
603             msg.append("companyId=" + companyId);
604 
605             msg.append(StringPool.CLOSE_CURLY_BRACE);
606 
607             throw new NoSuchWebsiteException(msg.toString());
608         }
609         else {
610             return list.get(0);
611         }
612     }
613 
614     public Website[] findByCompanyId_PrevAndNext(long websiteId,
615         long companyId, OrderByComparator obc)
616         throws NoSuchWebsiteException, SystemException {
617         Website website = findByPrimaryKey(websiteId);
618 
619         int count = countByCompanyId(companyId);
620 
621         Session session = null;
622 
623         try {
624             session = openSession();
625 
626             StringBuilder query = new StringBuilder();
627 
628             query.append("SELECT website FROM Website website WHERE ");
629 
630             query.append("website.companyId = ?");
631 
632             query.append(" ");
633 
634             if (obc != null) {
635                 query.append("ORDER BY ");
636 
637                 String[] orderByFields = obc.getOrderByFields();
638 
639                 for (int i = 0; i < orderByFields.length; i++) {
640                     query.append("website.");
641                     query.append(orderByFields[i]);
642 
643                     if (obc.isAscending()) {
644                         query.append(" ASC");
645                     }
646                     else {
647                         query.append(" DESC");
648                     }
649 
650                     if ((i + 1) < orderByFields.length) {
651                         query.append(", ");
652                     }
653                 }
654             }
655 
656             else {
657                 query.append("ORDER BY ");
658 
659                 query.append("website.createDate ASC");
660             }
661 
662             Query q = session.createQuery(query.toString());
663 
664             QueryPos qPos = QueryPos.getInstance(q);
665 
666             qPos.add(companyId);
667 
668             Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, website);
669 
670             Website[] array = new WebsiteImpl[3];
671 
672             array[0] = (Website)objArray[0];
673             array[1] = (Website)objArray[1];
674             array[2] = (Website)objArray[2];
675 
676             return array;
677         }
678         catch (Exception e) {
679             throw processException(e);
680         }
681         finally {
682             closeSession(session);
683         }
684     }
685 
686     public List<Website> findByUserId(long userId) throws SystemException {
687         Object[] finderArgs = new Object[] { new Long(userId) };
688 
689         List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_USERID,
690                 finderArgs, this);
691 
692         if (list == null) {
693             Session session = null;
694 
695             try {
696                 session = openSession();
697 
698                 StringBuilder query = new StringBuilder();
699 
700                 query.append("SELECT website FROM Website website WHERE ");
701 
702                 query.append("website.userId = ?");
703 
704                 query.append(" ");
705 
706                 query.append("ORDER BY ");
707 
708                 query.append("website.createDate ASC");
709 
710                 Query q = session.createQuery(query.toString());
711 
712                 QueryPos qPos = QueryPos.getInstance(q);
713 
714                 qPos.add(userId);
715 
716                 list = q.list();
717             }
718             catch (Exception e) {
719                 throw processException(e);
720             }
721             finally {
722                 if (list == null) {
723                     list = new ArrayList<Website>();
724                 }
725 
726                 cacheResult(list);
727 
728                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_USERID,
729                     finderArgs, list);
730 
731                 closeSession(session);
732             }
733         }
734 
735         return list;
736     }
737 
738     public List<Website> findByUserId(long userId, int start, int end)
739         throws SystemException {
740         return findByUserId(userId, start, end, null);
741     }
742 
743     public List<Website> findByUserId(long userId, int start, int end,
744         OrderByComparator obc) throws SystemException {
745         Object[] finderArgs = new Object[] {
746                 new Long(userId),
747                 
748                 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
749             };
750 
751         List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_USERID,
752                 finderArgs, this);
753 
754         if (list == null) {
755             Session session = null;
756 
757             try {
758                 session = openSession();
759 
760                 StringBuilder query = new StringBuilder();
761 
762                 query.append("SELECT website FROM Website website WHERE ");
763 
764                 query.append("website.userId = ?");
765 
766                 query.append(" ");
767 
768                 if (obc != null) {
769                     query.append("ORDER BY ");
770 
771                     String[] orderByFields = obc.getOrderByFields();
772 
773                     for (int i = 0; i < orderByFields.length; i++) {
774                         query.append("website.");
775                         query.append(orderByFields[i]);
776 
777                         if (obc.isAscending()) {
778                             query.append(" ASC");
779                         }
780                         else {
781                             query.append(" DESC");
782                         }
783 
784                         if ((i + 1) < orderByFields.length) {
785                             query.append(", ");
786                         }
787                     }
788                 }
789 
790                 else {
791                     query.append("ORDER BY ");
792 
793                     query.append("website.createDate ASC");
794                 }
795 
796                 Query q = session.createQuery(query.toString());
797 
798                 QueryPos qPos = QueryPos.getInstance(q);
799 
800                 qPos.add(userId);
801 
802                 list = (List<Website>)QueryUtil.list(q, getDialect(), start, end);
803             }
804             catch (Exception e) {
805                 throw processException(e);
806             }
807             finally {
808                 if (list == null) {
809                     list = new ArrayList<Website>();
810                 }
811 
812                 cacheResult(list);
813 
814                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_USERID,
815                     finderArgs, list);
816 
817                 closeSession(session);
818             }
819         }
820 
821         return list;
822     }
823 
824     public Website findByUserId_First(long userId, OrderByComparator obc)
825         throws NoSuchWebsiteException, SystemException {
826         List<Website> list = findByUserId(userId, 0, 1, obc);
827 
828         if (list.isEmpty()) {
829             StringBuilder msg = new StringBuilder();
830 
831             msg.append("No Website exists with the key {");
832 
833             msg.append("userId=" + userId);
834 
835             msg.append(StringPool.CLOSE_CURLY_BRACE);
836 
837             throw new NoSuchWebsiteException(msg.toString());
838         }
839         else {
840             return list.get(0);
841         }
842     }
843 
844     public Website findByUserId_Last(long userId, OrderByComparator obc)
845         throws NoSuchWebsiteException, SystemException {
846         int count = countByUserId(userId);
847 
848         List<Website> list = findByUserId(userId, count - 1, count, obc);
849 
850         if (list.isEmpty()) {
851             StringBuilder msg = new StringBuilder();
852 
853             msg.append("No Website exists with the key {");
854 
855             msg.append("userId=" + userId);
856 
857             msg.append(StringPool.CLOSE_CURLY_BRACE);
858 
859             throw new NoSuchWebsiteException(msg.toString());
860         }
861         else {
862             return list.get(0);
863         }
864     }
865 
866     public Website[] findByUserId_PrevAndNext(long websiteId, long userId,
867         OrderByComparator obc) throws NoSuchWebsiteException, SystemException {
868         Website website = findByPrimaryKey(websiteId);
869 
870         int count = countByUserId(userId);
871 
872         Session session = null;
873 
874         try {
875             session = openSession();
876 
877             StringBuilder query = new StringBuilder();
878 
879             query.append("SELECT website FROM Website website WHERE ");
880 
881             query.append("website.userId = ?");
882 
883             query.append(" ");
884 
885             if (obc != null) {
886                 query.append("ORDER BY ");
887 
888                 String[] orderByFields = obc.getOrderByFields();
889 
890                 for (int i = 0; i < orderByFields.length; i++) {
891                     query.append("website.");
892                     query.append(orderByFields[i]);
893 
894                     if (obc.isAscending()) {
895                         query.append(" ASC");
896                     }
897                     else {
898                         query.append(" DESC");
899                     }
900 
901                     if ((i + 1) < orderByFields.length) {
902                         query.append(", ");
903                     }
904                 }
905             }
906 
907             else {
908                 query.append("ORDER BY ");
909 
910                 query.append("website.createDate ASC");
911             }
912 
913             Query q = session.createQuery(query.toString());
914 
915             QueryPos qPos = QueryPos.getInstance(q);
916 
917             qPos.add(userId);
918 
919             Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, website);
920 
921             Website[] array = new WebsiteImpl[3];
922 
923             array[0] = (Website)objArray[0];
924             array[1] = (Website)objArray[1];
925             array[2] = (Website)objArray[2];
926 
927             return array;
928         }
929         catch (Exception e) {
930             throw processException(e);
931         }
932         finally {
933             closeSession(session);
934         }
935     }
936 
937     public List<Website> findByC_C(long companyId, long classNameId)
938         throws SystemException {
939         Object[] finderArgs = new Object[] {
940                 new Long(companyId), new Long(classNameId)
941             };
942 
943         List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_C_C,
944                 finderArgs, this);
945 
946         if (list == null) {
947             Session session = null;
948 
949             try {
950                 session = openSession();
951 
952                 StringBuilder query = new StringBuilder();
953 
954                 query.append("SELECT website FROM Website website WHERE ");
955 
956                 query.append("website.companyId = ?");
957 
958                 query.append(" AND ");
959 
960                 query.append("website.classNameId = ?");
961 
962                 query.append(" ");
963 
964                 query.append("ORDER BY ");
965 
966                 query.append("website.createDate ASC");
967 
968                 Query q = session.createQuery(query.toString());
969 
970                 QueryPos qPos = QueryPos.getInstance(q);
971 
972                 qPos.add(companyId);
973 
974                 qPos.add(classNameId);
975 
976                 list = q.list();
977             }
978             catch (Exception e) {
979                 throw processException(e);
980             }
981             finally {
982                 if (list == null) {
983                     list = new ArrayList<Website>();
984                 }
985 
986                 cacheResult(list);
987 
988                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_C_C, finderArgs,
989                     list);
990 
991                 closeSession(session);
992             }
993         }
994 
995         return list;
996     }
997 
998     public List<Website> findByC_C(long companyId, long classNameId, int start,
999         int end) throws SystemException {
1000        return findByC_C(companyId, classNameId, start, end, null);
1001    }
1002
1003    public List<Website> findByC_C(long companyId, long classNameId, int start,
1004        int end, OrderByComparator obc) throws SystemException {
1005        Object[] finderArgs = new Object[] {
1006                new Long(companyId), new Long(classNameId),
1007                
1008                String.valueOf(start), String.valueOf(end), String.valueOf(obc)
1009            };
1010
1011        List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_C_C,
1012                finderArgs, this);
1013
1014        if (list == null) {
1015            Session session = null;
1016
1017            try {
1018                session = openSession();
1019
1020                StringBuilder query = new StringBuilder();
1021
1022                query.append("SELECT website FROM Website website WHERE ");
1023
1024                query.append("website.companyId = ?");
1025
1026                query.append(" AND ");
1027
1028                query.append("website.classNameId = ?");
1029
1030                query.append(" ");
1031
1032                if (obc != null) {
1033                    query.append("ORDER BY ");
1034
1035                    String[] orderByFields = obc.getOrderByFields();
1036
1037                    for (int i = 0; i < orderByFields.length; i++) {
1038                        query.append("website.");
1039                        query.append(orderByFields[i]);
1040
1041                        if (obc.isAscending()) {
1042                            query.append(" ASC");
1043                        }
1044                        else {
1045                            query.append(" DESC");
1046                        }
1047
1048                        if ((i + 1) < orderByFields.length) {
1049                            query.append(", ");
1050                        }
1051                    }
1052                }
1053
1054                else {
1055                    query.append("ORDER BY ");
1056
1057                    query.append("website.createDate ASC");
1058                }
1059
1060                Query q = session.createQuery(query.toString());
1061
1062                QueryPos qPos = QueryPos.getInstance(q);
1063
1064                qPos.add(companyId);
1065
1066                qPos.add(classNameId);
1067
1068                list = (List<Website>)QueryUtil.list(q, getDialect(), start, end);
1069            }
1070            catch (Exception e) {
1071                throw processException(e);
1072            }
1073            finally {
1074                if (list == null) {
1075                    list = new ArrayList<Website>();
1076                }
1077
1078                cacheResult(list);
1079
1080                FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_C_C,
1081                    finderArgs, list);
1082
1083                closeSession(session);
1084            }
1085        }
1086
1087        return list;
1088    }
1089
1090    public Website findByC_C_First(long companyId, long classNameId,
1091        OrderByComparator obc) throws NoSuchWebsiteException, SystemException {
1092        List<Website> list = findByC_C(companyId, classNameId, 0, 1, obc);
1093
1094        if (list.isEmpty()) {
1095            StringBuilder msg = new StringBuilder();
1096
1097            msg.append("No Website exists with the key {");
1098
1099            msg.append("companyId=" + companyId);
1100
1101            msg.append(", ");
1102            msg.append("classNameId=" + classNameId);
1103
1104            msg.append(StringPool.CLOSE_CURLY_BRACE);
1105
1106            throw new NoSuchWebsiteException(msg.toString());
1107        }
1108        else {
1109            return list.get(0);
1110        }
1111    }
1112
1113    public Website findByC_C_Last(long companyId, long classNameId,
1114        OrderByComparator obc) throws NoSuchWebsiteException, SystemException {
1115        int count = countByC_C(companyId, classNameId);
1116
1117        List<Website> list = findByC_C(companyId, classNameId, count - 1,
1118                count, obc);
1119
1120        if (list.isEmpty()) {
1121            StringBuilder msg = new StringBuilder();
1122
1123            msg.append("No Website exists with the key {");
1124
1125            msg.append("companyId=" + companyId);
1126
1127            msg.append(", ");
1128            msg.append("classNameId=" + classNameId);
1129
1130            msg.append(StringPool.CLOSE_CURLY_BRACE);
1131
1132            throw new NoSuchWebsiteException(msg.toString());
1133        }
1134        else {
1135            return list.get(0);
1136        }
1137    }
1138
1139    public Website[] findByC_C_PrevAndNext(long websiteId, long companyId,
1140        long classNameId, OrderByComparator obc)
1141        throws NoSuchWebsiteException, SystemException {
1142        Website website = findByPrimaryKey(websiteId);
1143
1144        int count = countByC_C(companyId, classNameId);
1145
1146        Session session = null;
1147
1148        try {
1149            session = openSession();
1150
1151            StringBuilder query = new StringBuilder();
1152
1153            query.append("SELECT website FROM Website website WHERE ");
1154
1155            query.append("website.companyId = ?");
1156
1157            query.append(" AND ");
1158
1159            query.append("website.classNameId = ?");
1160
1161            query.append(" ");
1162
1163            if (obc != null) {
1164                query.append("ORDER BY ");
1165
1166                String[] orderByFields = obc.getOrderByFields();
1167
1168                for (int i = 0; i < orderByFields.length; i++) {
1169                    query.append("website.");
1170                    query.append(orderByFields[i]);
1171
1172                    if (obc.isAscending()) {
1173                        query.append(" ASC");
1174                    }
1175                    else {
1176                        query.append(" DESC");
1177                    }
1178
1179                    if ((i + 1) < orderByFields.length) {
1180                        query.append(", ");
1181                    }
1182                }
1183            }
1184
1185            else {
1186                query.append("ORDER BY ");
1187
1188                query.append("website.createDate ASC");
1189            }
1190
1191            Query q = session.createQuery(query.toString());
1192
1193            QueryPos qPos = QueryPos.getInstance(q);
1194
1195            qPos.add(companyId);
1196
1197            qPos.add(classNameId);
1198
1199            Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, website);
1200
1201            Website[] array = new WebsiteImpl[3];
1202
1203            array[0] = (Website)objArray[0];
1204            array[1] = (Website)objArray[1];
1205            array[2] = (Website)objArray[2];
1206
1207            return array;
1208        }
1209        catch (Exception e) {
1210            throw processException(e);
1211        }
1212        finally {
1213            closeSession(session);
1214        }
1215    }
1216
1217    public List<Website> findByC_C_C(long companyId, long classNameId,
1218        long classPK) throws SystemException {
1219        Object[] finderArgs = new Object[] {
1220                new Long(companyId), new Long(classNameId), new Long(classPK)
1221            };
1222
1223        List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_C_C_C,
1224                finderArgs, this);
1225
1226        if (list == null) {
1227            Session session = null;
1228
1229            try {
1230                session = openSession();
1231
1232                StringBuilder query = new StringBuilder();
1233
1234                query.append("SELECT website FROM Website website WHERE ");
1235
1236                query.append("website.companyId = ?");
1237
1238                query.append(" AND ");
1239
1240                query.append("website.classNameId = ?");
1241
1242                query.append(" AND ");
1243
1244                query.append("website.classPK = ?");
1245
1246                query.append(" ");
1247
1248                query.append("ORDER BY ");
1249
1250                query.append("website.createDate ASC");
1251
1252                Query q = session.createQuery(query.toString());
1253
1254                QueryPos qPos = QueryPos.getInstance(q);
1255
1256                qPos.add(companyId);
1257
1258                qPos.add(classNameId);
1259
1260                qPos.add(classPK);
1261
1262                list = q.list();
1263            }
1264            catch (Exception e) {
1265                throw processException(e);
1266            }
1267            finally {
1268                if (list == null) {
1269                    list = new ArrayList<Website>();
1270                }
1271
1272                cacheResult(list);
1273
1274                FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_C_C_C,
1275                    finderArgs, list);
1276
1277                closeSession(session);
1278            }
1279        }
1280
1281        return list;
1282    }
1283
1284    public List<Website> findByC_C_C(long companyId, long classNameId,
1285        long classPK, int start, int end) throws SystemException {
1286        return findByC_C_C(companyId, classNameId, classPK, start, end, null);
1287    }
1288
1289    public List<Website> findByC_C_C(long companyId, long classNameId,
1290        long classPK, int start, int end, OrderByComparator obc)
1291        throws SystemException {
1292        Object[] finderArgs = new Object[] {
1293                new Long(companyId), new Long(classNameId), new Long(classPK),
1294                
1295                String.valueOf(start), String.valueOf(end), String.valueOf(obc)
1296            };
1297
1298        List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_C_C_C,
1299                finderArgs, this);
1300
1301        if (list == null) {
1302            Session session = null;
1303
1304            try {
1305                session = openSession();
1306
1307                StringBuilder query = new StringBuilder();
1308
1309                query.append("SELECT website FROM Website website WHERE ");
1310
1311                query.append("website.companyId = ?");
1312
1313                query.append(" AND ");
1314
1315                query.append("website.classNameId = ?");
1316
1317                query.append(" AND ");
1318
1319                query.append("website.classPK = ?");
1320
1321                query.append(" ");
1322
1323                if (obc != null) {
1324                    query.append("ORDER BY ");
1325
1326                    String[] orderByFields = obc.getOrderByFields();
1327
1328                    for (int i = 0; i < orderByFields.length; i++) {
1329                        query.append("website.");
1330                        query.append(orderByFields[i]);
1331
1332                        if (obc.isAscending()) {
1333                            query.append(" ASC");
1334                        }
1335                        else {
1336                            query.append(" DESC");
1337                        }
1338
1339                        if ((i + 1) < orderByFields.length) {
1340                            query.append(", ");
1341                        }
1342                    }
1343                }
1344
1345                else {
1346                    query.append("ORDER BY ");
1347
1348                    query.append("website.createDate ASC");
1349                }
1350
1351                Query q = session.createQuery(query.toString());
1352
1353                QueryPos qPos = QueryPos.getInstance(q);
1354
1355                qPos.add(companyId);
1356
1357                qPos.add(classNameId);
1358
1359                qPos.add(classPK);
1360
1361                list = (List<Website>)QueryUtil.list(q, getDialect(), start, end);
1362            }
1363            catch (Exception e) {
1364                throw processException(e);
1365            }
1366            finally {
1367                if (list == null) {
1368                    list = new ArrayList<Website>();
1369                }
1370
1371                cacheResult(list);
1372
1373                FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_C_C_C,
1374                    finderArgs, list);
1375
1376                closeSession(session);
1377            }
1378        }
1379
1380        return list;
1381    }
1382
1383    public Website findByC_C_C_First(long companyId, long classNameId,
1384        long classPK, OrderByComparator obc)
1385        throws NoSuchWebsiteException, SystemException {
1386        List<Website> list = findByC_C_C(companyId, classNameId, classPK, 0, 1,
1387                obc);
1388
1389        if (list.isEmpty()) {
1390            StringBuilder msg = new StringBuilder();
1391
1392            msg.append("No Website exists with the key {");
1393
1394            msg.append("companyId=" + companyId);
1395
1396            msg.append(", ");
1397            msg.append("classNameId=" + classNameId);
1398
1399            msg.append(", ");
1400            msg.append("classPK=" + classPK);
1401
1402            msg.append(StringPool.CLOSE_CURLY_BRACE);
1403
1404            throw new NoSuchWebsiteException(msg.toString());
1405        }
1406        else {
1407            return list.get(0);
1408        }
1409    }
1410
1411    public Website findByC_C_C_Last(long companyId, long classNameId,
1412        long classPK, OrderByComparator obc)
1413        throws NoSuchWebsiteException, SystemException {
1414        int count = countByC_C_C(companyId, classNameId, classPK);
1415
1416        List<Website> list = findByC_C_C(companyId, classNameId, classPK,
1417                count - 1, count, obc);
1418
1419        if (list.isEmpty()) {
1420            StringBuilder msg = new StringBuilder();
1421
1422            msg.append("No Website exists with the key {");
1423
1424            msg.append("companyId=" + companyId);
1425
1426            msg.append(", ");
1427            msg.append("classNameId=" + classNameId);
1428
1429            msg.append(", ");
1430            msg.append("classPK=" + classPK);
1431
1432            msg.append(StringPool.CLOSE_CURLY_BRACE);
1433
1434            throw new NoSuchWebsiteException(msg.toString());
1435        }
1436        else {
1437            return list.get(0);
1438        }
1439    }
1440
1441    public Website[] findByC_C_C_PrevAndNext(long websiteId, long companyId,
1442        long classNameId, long classPK, OrderByComparator obc)
1443        throws NoSuchWebsiteException, SystemException {
1444        Website website = findByPrimaryKey(websiteId);
1445
1446        int count = countByC_C_C(companyId, classNameId, classPK);
1447
1448        Session session = null;
1449
1450        try {
1451            session = openSession();
1452
1453            StringBuilder query = new StringBuilder();
1454
1455            query.append("SELECT website FROM Website website WHERE ");
1456
1457            query.append("website.companyId = ?");
1458
1459            query.append(" AND ");
1460
1461            query.append("website.classNameId = ?");
1462
1463            query.append(" AND ");
1464
1465            query.append("website.classPK = ?");
1466
1467            query.append(" ");
1468
1469            if (obc != null) {
1470                query.append("ORDER BY ");
1471
1472                String[] orderByFields = obc.getOrderByFields();
1473
1474                for (int i = 0; i < orderByFields.length; i++) {
1475                    query.append("website.");
1476                    query.append(orderByFields[i]);
1477
1478                    if (obc.isAscending()) {
1479                        query.append(" ASC");
1480                    }
1481                    else {
1482                        query.append(" DESC");
1483                    }
1484
1485                    if ((i + 1) < orderByFields.length) {
1486                        query.append(", ");
1487                    }
1488                }
1489            }
1490
1491            else {
1492                query.append("ORDER BY ");
1493
1494                query.append("website.createDate ASC");
1495            }
1496
1497            Query q = session.createQuery(query.toString());
1498
1499            QueryPos qPos = QueryPos.getInstance(q);
1500
1501            qPos.add(companyId);
1502
1503            qPos.add(classNameId);
1504
1505            qPos.add(classPK);
1506
1507            Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, website);
1508
1509            Website[] array = new WebsiteImpl[3];
1510
1511            array[0] = (Website)objArray[0];
1512            array[1] = (Website)objArray[1];
1513            array[2] = (Website)objArray[2];
1514
1515            return array;
1516        }
1517        catch (Exception e) {
1518            throw processException(e);
1519        }
1520        finally {
1521            closeSession(session);
1522        }
1523    }
1524
1525    public List<Website> findByC_C_C_P(long companyId, long classNameId,
1526        long classPK, boolean primary) throws SystemException {
1527        Object[] finderArgs = new Object[] {
1528                new Long(companyId), new Long(classNameId), new Long(classPK),
1529                Boolean.valueOf(primary)
1530            };
1531
1532        List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_C_C_C_P,
1533                finderArgs, this);
1534
1535        if (list == null) {
1536            Session session = null;
1537
1538            try {
1539                session = openSession();
1540
1541                StringBuilder query = new StringBuilder();
1542
1543                query.append("SELECT website FROM Website website WHERE ");
1544
1545                query.append("website.companyId = ?");
1546
1547                query.append(" AND ");
1548
1549                query.append("website.classNameId = ?");
1550
1551                query.append(" AND ");
1552
1553                query.append("website.classPK = ?");
1554
1555                query.append(" AND ");
1556
1557                query.append("website.primary = ?");
1558
1559                query.append(" ");
1560
1561                query.append("ORDER BY ");
1562
1563                query.append("website.createDate ASC");
1564
1565                Query q = session.createQuery(query.toString());
1566
1567                QueryPos qPos = QueryPos.getInstance(q);
1568
1569                qPos.add(companyId);
1570
1571                qPos.add(classNameId);
1572
1573                qPos.add(classPK);
1574
1575                qPos.add(primary);
1576
1577                list = q.list();
1578            }
1579            catch (Exception e) {
1580                throw processException(e);
1581            }
1582            finally {
1583                if (list == null) {
1584                    list = new ArrayList<Website>();
1585                }
1586
1587                cacheResult(list);
1588
1589                FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_C_C_C_P,
1590                    finderArgs, list);
1591
1592                closeSession(session);
1593            }
1594        }
1595
1596        return list;
1597    }
1598
1599    public List<Website> findByC_C_C_P(long companyId, long classNameId,
1600        long classPK, boolean primary, int start, int end)
1601        throws SystemException {
1602        return findByC_C_C_P(companyId, classNameId, classPK, primary, start,
1603            end, null);
1604    }
1605
1606    public List<Website> findByC_C_C_P(long companyId, long classNameId,
1607        long classPK, boolean primary, int start, int end, OrderByComparator obc)
1608        throws SystemException {
1609        Object[] finderArgs = new Object[] {
1610                new Long(companyId), new Long(classNameId), new Long(classPK),
1611                Boolean.valueOf(primary),
1612                
1613                String.valueOf(start), String.valueOf(end), String.valueOf(obc)
1614            };
1615
1616        List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_C_C_C_P,
1617                finderArgs, this);
1618
1619        if (list == null) {
1620            Session session = null;
1621
1622            try {
1623                session = openSession();
1624
1625                StringBuilder query = new StringBuilder();
1626
1627                query.append("SELECT website FROM Website website WHERE ");
1628
1629                query.append("website.companyId = ?");
1630
1631                query.append(" AND ");
1632
1633                query.append("website.classNameId = ?");
1634
1635                query.append(" AND ");
1636
1637                query.append("website.classPK = ?");
1638
1639                query.append(" AND ");
1640
1641                query.append("website.primary = ?");
1642
1643                query.append(" ");
1644
1645                if (obc != null) {
1646                    query.append("ORDER BY ");
1647
1648                    String[] orderByFields = obc.getOrderByFields();
1649
1650                    for (int i = 0; i < orderByFields.length; i++) {
1651                        query.append("website.");
1652                        query.append(orderByFields[i]);
1653
1654                        if (obc.isAscending()) {
1655                            query.append(" ASC");
1656                        }
1657                        else {
1658                            query.append(" DESC");
1659                        }
1660
1661                        if ((i + 1) < orderByFields.length) {
1662                            query.append(", ");
1663                        }
1664                    }
1665                }
1666
1667                else {
1668                    query.append("ORDER BY ");
1669
1670                    query.append("website.createDate ASC");
1671                }
1672
1673                Query q = session.createQuery(query.toString());
1674
1675                QueryPos qPos = QueryPos.getInstance(q);
1676
1677                qPos.add(companyId);
1678
1679                qPos.add(classNameId);
1680
1681                qPos.add(classPK);
1682
1683                qPos.add(primary);
1684
1685                list = (List<Website>)QueryUtil.list(q, getDialect(), start, end);
1686            }
1687            catch (Exception e) {
1688                throw processException(e);
1689            }
1690            finally {
1691                if (list == null) {
1692                    list = new ArrayList<Website>();
1693                }
1694
1695                cacheResult(list);
1696
1697                FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_C_C_C_P,
1698                    finderArgs, list);
1699
1700                closeSession(session);
1701            }
1702        }
1703
1704        return list;
1705    }
1706
1707    public Website findByC_C_C_P_First(long companyId, long classNameId,
1708        long classPK, boolean primary, OrderByComparator obc)
1709        throws NoSuchWebsiteException, SystemException {
1710        List<Website> list = findByC_C_C_P(companyId, classNameId, classPK,
1711                primary, 0, 1, obc);
1712
1713        if (list.isEmpty()) {
1714            StringBuilder msg = new StringBuilder();
1715
1716            msg.append("No Website exists with the key {");
1717
1718            msg.append("companyId=" + companyId);
1719
1720            msg.append(", ");
1721            msg.append("classNameId=" + classNameId);
1722
1723            msg.append(", ");
1724            msg.append("classPK=" + classPK);
1725
1726            msg.append(", ");
1727            msg.append("primary=" + primary);
1728
1729            msg.append(StringPool.CLOSE_CURLY_BRACE);
1730
1731            throw new NoSuchWebsiteException(msg.toString());
1732        }
1733        else {
1734            return list.get(0);
1735        }
1736    }
1737
1738    public Website findByC_C_C_P_Last(long companyId, long classNameId,
1739        long classPK, boolean primary, OrderByComparator obc)
1740        throws NoSuchWebsiteException, SystemException {
1741        int count = countByC_C_C_P(companyId, classNameId, classPK, primary);
1742
1743        List<Website> list = findByC_C_C_P(companyId, classNameId, classPK,
1744                primary, count - 1, count, obc);
1745
1746        if (list.isEmpty()) {
1747            StringBuilder msg = new StringBuilder();
1748
1749            msg.append("No Website exists with the key {");
1750
1751            msg.append("companyId=" + companyId);
1752
1753            msg.append(", ");
1754            msg.append("classNameId=" + classNameId);
1755
1756            msg.append(", ");
1757            msg.append("classPK=" + classPK);
1758
1759            msg.append(", ");
1760            msg.append("primary=" + primary);
1761
1762            msg.append(StringPool.CLOSE_CURLY_BRACE);
1763
1764            throw new NoSuchWebsiteException(msg.toString());
1765        }
1766        else {
1767            return list.get(0);
1768        }
1769    }
1770
1771    public Website[] findByC_C_C_P_PrevAndNext(long websiteId, long companyId,
1772        long classNameId, long classPK, boolean primary, OrderByComparator obc)
1773        throws NoSuchWebsiteException, SystemException {
1774        Website website = findByPrimaryKey(websiteId);
1775
1776        int count = countByC_C_C_P(companyId, classNameId, classPK, primary);
1777
1778        Session session = null;
1779
1780        try {
1781            session = openSession();
1782
1783            StringBuilder query = new StringBuilder();
1784
1785            query.append("SELECT website FROM Website website WHERE ");
1786
1787            query.append("website.companyId = ?");
1788
1789            query.append(" AND ");
1790
1791            query.append("website.classNameId = ?");
1792
1793            query.append(" AND ");
1794
1795            query.append("website.classPK = ?");
1796
1797            query.append(" AND ");
1798
1799            query.append("website.primary = ?");
1800
1801            query.append(" ");
1802
1803            if (obc != null) {
1804                query.append("ORDER BY ");
1805
1806                String[] orderByFields = obc.getOrderByFields();
1807
1808                for (int i = 0; i < orderByFields.length; i++) {
1809                    query.append("website.");
1810                    query.append(orderByFields[i]);
1811
1812                    if (obc.isAscending()) {
1813                        query.append(" ASC");
1814                    }
1815                    else {
1816                        query.append(" DESC");
1817                    }
1818
1819                    if ((i + 1) < orderByFields.length) {
1820                        query.append(", ");
1821                    }
1822                }
1823            }
1824
1825            else {
1826                query.append("ORDER BY ");
1827
1828                query.append("website.createDate ASC");
1829            }
1830
1831            Query q = session.createQuery(query.toString());
1832
1833            QueryPos qPos = QueryPos.getInstance(q);
1834
1835            qPos.add(companyId);
1836
1837            qPos.add(classNameId);
1838
1839            qPos.add(classPK);
1840
1841            qPos.add(primary);
1842
1843            Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, website);
1844
1845            Website[] array = new WebsiteImpl[3];
1846
1847            array[0] = (Website)objArray[0];
1848            array[1] = (Website)objArray[1];
1849            array[2] = (Website)objArray[2];
1850
1851            return array;
1852        }
1853        catch (Exception e) {
1854            throw processException(e);
1855        }
1856        finally {
1857            closeSession(session);
1858        }
1859    }
1860
1861    public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
1862        throws SystemException {
1863        Session session = null;
1864
1865        try {
1866            session = openSession();
1867
1868            dynamicQuery.compile(session);
1869
1870            return dynamicQuery.list();
1871        }
1872        catch (Exception e) {
1873            throw processException(e);
1874        }
1875        finally {
1876            closeSession(session);
1877        }
1878    }
1879
1880    public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
1881        int start, int end) throws SystemException {
1882        Session session = null;
1883
1884        try {
1885            session = openSession();
1886
1887            dynamicQuery.setLimit(start, end);
1888
1889            dynamicQuery.compile(session);
1890
1891            return dynamicQuery.list();
1892        }
1893        catch (Exception e) {
1894            throw processException(e);
1895        }
1896        finally {
1897            closeSession(session);
1898        }
1899    }
1900
1901    public List<Website> findAll() throws SystemException {
1902        return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1903    }
1904
1905    public List<Website> findAll(int start, int end) throws SystemException {
1906        return findAll(start, end, null);
1907    }
1908
1909    public List<Website> findAll(int start, int end, OrderByComparator obc)
1910        throws SystemException {
1911        Object[] finderArgs = new Object[] {
1912                String.valueOf(start), String.valueOf(end), String.valueOf(obc)
1913            };
1914
1915        List<Website> list = (List<Website>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1916                finderArgs, this);
1917
1918        if (list == null) {
1919            Session session = null;
1920
1921            try {
1922                session = openSession();
1923
1924                StringBuilder query = new StringBuilder();
1925
1926                query.append("SELECT website FROM Website website ");
1927
1928                if (obc != null) {
1929                    query.append("ORDER BY ");
1930
1931                    String[] orderByFields = obc.getOrderByFields();
1932
1933                    for (int i = 0; i < orderByFields.length; i++) {
1934                        query.append("website.");
1935                        query.append(orderByFields[i]);
1936
1937                        if (obc.isAscending()) {
1938                            query.append(" ASC");
1939                        }
1940                        else {
1941                            query.append(" DESC");
1942                        }
1943
1944                        if ((i + 1) < orderByFields.length) {
1945                            query.append(", ");
1946                        }
1947                    }
1948                }
1949
1950                else {
1951                    query.append("ORDER BY ");
1952
1953                    query.append("website.createDate ASC");
1954                }
1955
1956                Query q = session.createQuery(query.toString());
1957
1958                if (obc == null) {
1959                    list = (List<Website>)QueryUtil.list(q, getDialect(),
1960                            start, end, false);
1961
1962                    Collections.sort(list);
1963                }
1964                else {
1965                    list = (List<Website>)QueryUtil.list(q, getDialect(),
1966                            start, end);
1967                }
1968            }
1969            catch (Exception e) {
1970                throw processException(e);
1971            }
1972            finally {
1973                if (list == null) {
1974                    list = new ArrayList<Website>();
1975                }
1976
1977                cacheResult(list);
1978
1979                FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
1980
1981                closeSession(session);
1982            }
1983        }
1984
1985        return list;
1986    }
1987
1988    public void removeByCompanyId(long companyId) throws SystemException {
1989        for (Website website : findByCompanyId(companyId)) {
1990            remove(website);
1991        }
1992    }
1993
1994    public void removeByUserId(long userId) throws SystemException {
1995        for (Website website : findByUserId(userId)) {
1996            remove(website);
1997        }
1998    }
1999
2000    public void removeByC_C(long companyId, long classNameId)
2001        throws SystemException {
2002        for (Website website : findByC_C(companyId, classNameId)) {
2003            remove(website);
2004        }
2005    }
2006
2007    public void removeByC_C_C(long companyId, long classNameId, long classPK)
2008        throws SystemException {
2009        for (Website website : findByC_C_C(companyId, classNameId, classPK)) {
2010            remove(website);
2011        }
2012    }
2013
2014    public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
2015        boolean primary) throws SystemException {
2016        for (Website website : findByC_C_C_P(companyId, classNameId, classPK,
2017                primary)) {
2018            remove(website);
2019        }
2020    }
2021
2022    public void removeAll() throws SystemException {
2023        for (Website website : findAll()) {
2024            remove(website);
2025        }
2026    }
2027
2028    public int countByCompanyId(long companyId) throws SystemException {
2029        Object[] finderArgs = new Object[] { new Long(companyId) };
2030
2031        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
2032                finderArgs, this);
2033
2034        if (count == null) {
2035            Session session = null;
2036
2037            try {
2038                session = openSession();
2039
2040                StringBuilder query = new StringBuilder();
2041
2042                query.append("SELECT COUNT(website) ");
2043                query.append("FROM Website website WHERE ");
2044
2045                query.append("website.companyId = ?");
2046
2047                query.append(" ");
2048
2049                Query q = session.createQuery(query.toString());
2050
2051                QueryPos qPos = QueryPos.getInstance(q);
2052
2053                qPos.add(companyId);
2054
2055                count = (Long)q.uniqueResult();
2056            }
2057            catch (Exception e) {
2058                throw processException(e);
2059            }
2060            finally {
2061                if (count == null) {
2062                    count = Long.valueOf(0);
2063                }
2064
2065                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
2066                    finderArgs, count);
2067
2068                closeSession(session);
2069            }
2070        }
2071
2072        return count.intValue();
2073    }
2074
2075    public int countByUserId(long userId) throws SystemException {
2076        Object[] finderArgs = new Object[] { new Long(userId) };
2077
2078        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERID,
2079                finderArgs, this);
2080
2081        if (count == null) {
2082            Session session = null;
2083
2084            try {
2085                session = openSession();
2086
2087                StringBuilder query = new StringBuilder();
2088
2089                query.append("SELECT COUNT(website) ");
2090                query.append("FROM Website website WHERE ");
2091
2092                query.append("website.userId = ?");
2093
2094                query.append(" ");
2095
2096                Query q = session.createQuery(query.toString());
2097
2098                QueryPos qPos = QueryPos.getInstance(q);
2099
2100                qPos.add(userId);
2101
2102                count = (Long)q.uniqueResult();
2103            }
2104            catch (Exception e) {
2105                throw processException(e);
2106            }
2107            finally {
2108                if (count == null) {
2109                    count = Long.valueOf(0);
2110                }
2111
2112                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERID,
2113                    finderArgs, count);
2114
2115                closeSession(session);
2116            }
2117        }
2118
2119        return count.intValue();
2120    }
2121
2122    public int countByC_C(long companyId, long classNameId)
2123        throws SystemException {
2124        Object[] finderArgs = new Object[] {
2125                new Long(companyId), new Long(classNameId)
2126            };
2127
2128        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_C,
2129                finderArgs, this);
2130
2131        if (count == null) {
2132            Session session = null;
2133
2134            try {
2135                session = openSession();
2136
2137                StringBuilder query = new StringBuilder();
2138
2139                query.append("SELECT COUNT(website) ");
2140                query.append("FROM Website website WHERE ");
2141
2142                query.append("website.companyId = ?");
2143
2144                query.append(" AND ");
2145
2146                query.append("website.classNameId = ?");
2147
2148                query.append(" ");
2149
2150                Query q = session.createQuery(query.toString());
2151
2152                QueryPos qPos = QueryPos.getInstance(q);
2153
2154                qPos.add(companyId);
2155
2156                qPos.add(classNameId);
2157
2158                count = (Long)q.uniqueResult();
2159            }
2160            catch (Exception e) {
2161                throw processException(e);
2162            }
2163            finally {
2164                if (count == null) {
2165                    count = Long.valueOf(0);
2166                }
2167
2168                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_C, finderArgs,
2169                    count);
2170
2171                closeSession(session);
2172            }
2173        }
2174
2175        return count.intValue();
2176    }
2177
2178    public int countByC_C_C(long companyId, long classNameId, long classPK)
2179        throws SystemException {
2180        Object[] finderArgs = new Object[] {
2181                new Long(companyId), new Long(classNameId), new Long(classPK)
2182            };
2183
2184        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_C_C,
2185                finderArgs, this);
2186
2187        if (count == null) {
2188            Session session = null;
2189
2190            try {
2191                session = openSession();
2192
2193                StringBuilder query = new StringBuilder();
2194
2195                query.append("SELECT COUNT(website) ");
2196                query.append("FROM Website website WHERE ");
2197
2198                query.append("website.companyId = ?");
2199
2200                query.append(" AND ");
2201
2202                query.append("website.classNameId = ?");
2203
2204                query.append(" AND ");
2205
2206                query.append("website.classPK = ?");
2207
2208                query.append(" ");
2209
2210                Query q = session.createQuery(query.toString());
2211
2212                QueryPos qPos = QueryPos.getInstance(q);
2213
2214                qPos.add(companyId);
2215
2216                qPos.add(classNameId);
2217
2218                qPos.add(classPK);
2219
2220                count = (Long)q.uniqueResult();
2221            }
2222            catch (Exception e) {
2223                throw processException(e);
2224            }
2225            finally {
2226                if (count == null) {
2227                    count = Long.valueOf(0);
2228                }
2229
2230                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_C_C,
2231                    finderArgs, count);
2232
2233                closeSession(session);
2234            }
2235        }
2236
2237        return count.intValue();
2238    }
2239
2240    public int countByC_C_C_P(long companyId, long classNameId, long classPK,
2241        boolean primary) throws SystemException {
2242        Object[] finderArgs = new Object[] {
2243                new Long(companyId), new Long(classNameId), new Long(classPK),
2244                Boolean.valueOf(primary)
2245            };
2246
2247        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_C_C_P,
2248                finderArgs, this);
2249
2250        if (count == null) {
2251            Session session = null;
2252
2253            try {
2254                session = openSession();
2255
2256                StringBuilder query = new StringBuilder();
2257
2258                query.append("SELECT COUNT(website) ");
2259                query.append("FROM Website website WHERE ");
2260
2261                query.append("website.companyId = ?");
2262
2263                query.append(" AND ");
2264
2265                query.append("website.classNameId = ?");
2266
2267                query.append(" AND ");
2268
2269                query.append("website.classPK = ?");
2270
2271                query.append(" AND ");
2272
2273                query.append("website.primary = ?");
2274
2275                query.append(" ");
2276
2277                Query q = session.createQuery(query.toString());
2278
2279                QueryPos qPos = QueryPos.getInstance(q);
2280
2281                qPos.add(companyId);
2282
2283                qPos.add(classNameId);
2284
2285                qPos.add(classPK);
2286
2287                qPos.add(primary);
2288
2289                count = (Long)q.uniqueResult();
2290            }
2291            catch (Exception e) {
2292                throw processException(e);
2293            }
2294            finally {
2295                if (count == null) {
2296                    count = Long.valueOf(0);
2297                }
2298
2299                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_C_C_P,
2300                    finderArgs, count);
2301
2302                closeSession(session);
2303            }
2304        }
2305
2306        return count.intValue();
2307    }
2308
2309    public int countAll() throws SystemException {
2310        Object[] finderArgs = new Object[0];
2311
2312        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
2313                finderArgs, this);
2314
2315        if (count == null) {
2316            Session session = null;
2317
2318            try {
2319                session = openSession();
2320
2321                Query q = session.createQuery(
2322                        "SELECT COUNT(website) FROM Website website");
2323
2324                count = (Long)q.uniqueResult();
2325            }
2326            catch (Exception e) {
2327                throw processException(e);
2328            }
2329            finally {
2330                if (count == null) {
2331                    count = Long.valueOf(0);
2332                }
2333
2334                FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
2335                    count);
2336
2337                closeSession(session);
2338            }
2339        }
2340
2341        return count.intValue();
2342    }
2343
2344    public void afterPropertiesSet() {
2345        String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
2346                    com.liferay.portal.util.PropsUtil.get(
2347                        "value.object.listener.com.liferay.portal.model.Website")));
2348
2349        if (listenerClassNames.length > 0) {
2350            try {
2351                List<ModelListener<Website>> listenersList = new ArrayList<ModelListener<Website>>();
2352
2353                for (String listenerClassName : listenerClassNames) {
2354                    listenersList.add((ModelListener<Website>)Class.forName(
2355                            listenerClassName).newInstance());
2356                }
2357
2358                listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
2359            }
2360            catch (Exception e) {
2361                _log.error(e);
2362            }
2363        }
2364    }
2365
2366    @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence.impl")
2367    protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
2368    @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence.impl")
2369    protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
2370    @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence.impl")
2371    protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
2372    @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence.impl")
2373    protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
2374    @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence.impl")
2375    protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
2376    @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence.impl")
2377    protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
2378    @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence.impl")
2379    protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
2380    @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence.impl")
2381    protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
2382    @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence.impl")
2383    protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
2384    @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence.impl")
2385    protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
2386    @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence.impl")
2387    protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
2388    @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence.impl")
2389    protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
2390    @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence.impl")
2391    protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
2392    @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence.impl")
2393    protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
2394    @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence.impl")
2395    protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
2396    @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence.impl")
2397    protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
2398    @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence.impl")
2399    protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
2400    @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence.impl")
2401    protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
2402    @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence.impl")
2403    protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
2404    @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence.impl")
2405    protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
2406    @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence.impl")
2407    protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
2408    @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence.impl")
2409    protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
2410    @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence.impl")
2411    protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
2412    @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence.impl")
2413    protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
2414    @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence.impl")
2415    protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
2416    @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence.impl")
2417    protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
2418    @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence.impl")
2419    protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
2420    @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence.impl")
2421    protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
2422    @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence.impl")
2423    protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
2424    @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence.impl")
2425    protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
2426    @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
2427    protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
2428    @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence.impl")
2429    protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
2430    @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence.impl")
2431    protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
2432    @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence.impl")
2433    protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
2434    @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence.impl")
2435    protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
2436    @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence.impl")
2437    protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
2438    @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence.impl")
2439    protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
2440    @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence.impl")
2441    protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
2442    @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
2443    protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
2444    @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence.impl")
2445    protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
2446    @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupGroupRolePersistence.impl")
2447    protected com.liferay.portal.service.persistence.UserGroupGroupRolePersistence userGroupGroupRolePersistence;
2448    @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence.impl")
2449    protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
2450    @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence.impl")
2451    protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
2452    @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence.impl")
2453    protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
2454    @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence.impl")
2455    protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
2456    @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence.impl")
2457    protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
2458    @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence.impl")
2459    protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
2460    private static Log _log = LogFactoryUtil.getLog(WebsitePersistenceImpl.class);
2461}