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