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