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