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