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