1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.NoSuchListTypeException;
18 import com.liferay.portal.NoSuchModelException;
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.InstanceFactory;
33 import com.liferay.portal.kernel.util.OrderByComparator;
34 import com.liferay.portal.kernel.util.StringBundler;
35 import com.liferay.portal.kernel.util.StringPool;
36 import com.liferay.portal.kernel.util.StringUtil;
37 import com.liferay.portal.model.ListType;
38 import com.liferay.portal.model.ModelListener;
39 import com.liferay.portal.model.impl.ListTypeImpl;
40 import com.liferay.portal.model.impl.ListTypeModelImpl;
41 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
42
43 import java.io.Serializable;
44
45 import java.util.ArrayList;
46 import java.util.Collections;
47 import java.util.List;
48
49
62 public class ListTypePersistenceImpl extends BasePersistenceImpl<ListType>
63 implements ListTypePersistence {
64 public static final String FINDER_CLASS_NAME_ENTITY = ListTypeImpl.class.getName();
65 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
66 ".List";
67 public static final FinderPath FINDER_PATH_FIND_BY_TYPE = new FinderPath(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
68 ListTypeModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
69 "findByType",
70 new String[] {
71 String.class.getName(),
72
73 "java.lang.Integer", "java.lang.Integer",
74 "com.liferay.portal.kernel.util.OrderByComparator"
75 });
76 public static final FinderPath FINDER_PATH_COUNT_BY_TYPE = new FinderPath(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
77 ListTypeModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
78 "countByType", new String[] { String.class.getName() });
79 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
80 ListTypeModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
81 "findAll", new String[0]);
82 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
83 ListTypeModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
84 "countAll", new String[0]);
85
86 public void cacheResult(ListType listType) {
87 EntityCacheUtil.putResult(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
88 ListTypeImpl.class, listType.getPrimaryKey(), listType);
89 }
90
91 public void cacheResult(List<ListType> listTypes) {
92 for (ListType listType : listTypes) {
93 if (EntityCacheUtil.getResult(
94 ListTypeModelImpl.ENTITY_CACHE_ENABLED,
95 ListTypeImpl.class, listType.getPrimaryKey(), this) == null) {
96 cacheResult(listType);
97 }
98 }
99 }
100
101 public void clearCache() {
102 CacheRegistry.clear(ListTypeImpl.class.getName());
103 EntityCacheUtil.clearCache(ListTypeImpl.class.getName());
104 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
105 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
106 }
107
108 public void clearCache(ListType listType) {
109 EntityCacheUtil.removeResult(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
110 ListTypeImpl.class, listType.getPrimaryKey());
111 }
112
113 public ListType create(int listTypeId) {
114 ListType listType = new ListTypeImpl();
115
116 listType.setNew(true);
117 listType.setPrimaryKey(listTypeId);
118
119 return listType;
120 }
121
122 public ListType remove(Serializable primaryKey)
123 throws NoSuchModelException, SystemException {
124 return remove(((Integer)primaryKey).intValue());
125 }
126
127 public ListType remove(int listTypeId)
128 throws NoSuchListTypeException, SystemException {
129 Session session = null;
130
131 try {
132 session = openSession();
133
134 ListType listType = (ListType)session.get(ListTypeImpl.class,
135 new Integer(listTypeId));
136
137 if (listType == null) {
138 if (_log.isWarnEnabled()) {
139 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + listTypeId);
140 }
141
142 throw new NoSuchListTypeException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
143 listTypeId);
144 }
145
146 return remove(listType);
147 }
148 catch (NoSuchListTypeException nsee) {
149 throw nsee;
150 }
151 catch (Exception e) {
152 throw processException(e);
153 }
154 finally {
155 closeSession(session);
156 }
157 }
158
159 protected ListType removeImpl(ListType listType) throws SystemException {
160 listType = toUnwrappedModel(listType);
161
162 Session session = null;
163
164 try {
165 session = openSession();
166
167 BatchSessionUtil.delete(session, listType);
168 }
169 catch (Exception e) {
170 throw processException(e);
171 }
172 finally {
173 closeSession(session);
174 }
175
176 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
177
178 EntityCacheUtil.removeResult(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
179 ListTypeImpl.class, listType.getPrimaryKey());
180
181 return listType;
182 }
183
184
187 public ListType update(ListType listType) throws SystemException {
188 if (_log.isWarnEnabled()) {
189 _log.warn(
190 "Using the deprecated update(ListType listType) method. Use update(ListType listType, boolean merge) instead.");
191 }
192
193 return update(listType, false);
194 }
195
196 public ListType updateImpl(com.liferay.portal.model.ListType listType,
197 boolean merge) throws SystemException {
198 listType = toUnwrappedModel(listType);
199
200 Session session = null;
201
202 try {
203 session = openSession();
204
205 BatchSessionUtil.update(session, listType, merge);
206
207 listType.setNew(false);
208 }
209 catch (Exception e) {
210 throw processException(e);
211 }
212 finally {
213 closeSession(session);
214 }
215
216 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
217
218 EntityCacheUtil.putResult(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
219 ListTypeImpl.class, listType.getPrimaryKey(), listType);
220
221 return listType;
222 }
223
224 protected ListType toUnwrappedModel(ListType listType) {
225 if (listType instanceof ListTypeImpl) {
226 return listType;
227 }
228
229 ListTypeImpl listTypeImpl = new ListTypeImpl();
230
231 listTypeImpl.setNew(listType.isNew());
232 listTypeImpl.setPrimaryKey(listType.getPrimaryKey());
233
234 listTypeImpl.setListTypeId(listType.getListTypeId());
235 listTypeImpl.setName(listType.getName());
236 listTypeImpl.setType(listType.getType());
237
238 return listTypeImpl;
239 }
240
241 public ListType findByPrimaryKey(Serializable primaryKey)
242 throws NoSuchModelException, SystemException {
243 return findByPrimaryKey(((Integer)primaryKey).intValue());
244 }
245
246 public ListType findByPrimaryKey(int listTypeId)
247 throws NoSuchListTypeException, SystemException {
248 ListType listType = fetchByPrimaryKey(listTypeId);
249
250 if (listType == null) {
251 if (_log.isWarnEnabled()) {
252 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + listTypeId);
253 }
254
255 throw new NoSuchListTypeException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
256 listTypeId);
257 }
258
259 return listType;
260 }
261
262 public ListType fetchByPrimaryKey(Serializable primaryKey)
263 throws SystemException {
264 return fetchByPrimaryKey(((Integer)primaryKey).intValue());
265 }
266
267 public ListType fetchByPrimaryKey(int listTypeId) throws SystemException {
268 ListType listType = (ListType)EntityCacheUtil.getResult(ListTypeModelImpl.ENTITY_CACHE_ENABLED,
269 ListTypeImpl.class, listTypeId, this);
270
271 if (listType == null) {
272 Session session = null;
273
274 try {
275 session = openSession();
276
277 listType = (ListType)session.get(ListTypeImpl.class,
278 new Integer(listTypeId));
279 }
280 catch (Exception e) {
281 throw processException(e);
282 }
283 finally {
284 if (listType != null) {
285 cacheResult(listType);
286 }
287
288 closeSession(session);
289 }
290 }
291
292 return listType;
293 }
294
295 public List<ListType> findByType(String type) throws SystemException {
296 return findByType(type, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
297 }
298
299 public List<ListType> findByType(String type, int start, int end)
300 throws SystemException {
301 return findByType(type, start, end, null);
302 }
303
304 public List<ListType> findByType(String type, int start, int end,
305 OrderByComparator orderByComparator) throws SystemException {
306 Object[] finderArgs = new Object[] {
307 type,
308
309 String.valueOf(start), String.valueOf(end),
310 String.valueOf(orderByComparator)
311 };
312
313 List<ListType> list = (List<ListType>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_TYPE,
314 finderArgs, this);
315
316 if (list == null) {
317 StringBundler query = null;
318
319 if (orderByComparator != null) {
320 query = new StringBundler(3 +
321 (orderByComparator.getOrderByFields().length * 3));
322 }
323 else {
324 query = new StringBundler(3);
325 }
326
327 query.append(_SQL_SELECT_LISTTYPE_WHERE);
328
329 if (type == null) {
330 query.append(_FINDER_COLUMN_TYPE_TYPE_1);
331 }
332 else {
333 if (type.equals(StringPool.BLANK)) {
334 query.append(_FINDER_COLUMN_TYPE_TYPE_3);
335 }
336 else {
337 query.append(_FINDER_COLUMN_TYPE_TYPE_2);
338 }
339 }
340
341 if (orderByComparator != null) {
342 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
343 orderByComparator);
344 }
345
346 else {
347 query.append(ListTypeModelImpl.ORDER_BY_JPQL);
348 }
349
350 String sql = query.toString();
351
352 Session session = null;
353
354 try {
355 session = openSession();
356
357 Query q = session.createQuery(sql);
358
359 QueryPos qPos = QueryPos.getInstance(q);
360
361 if (type != null) {
362 qPos.add(type);
363 }
364
365 list = (List<ListType>)QueryUtil.list(q, getDialect(), start,
366 end);
367 }
368 catch (Exception e) {
369 throw processException(e);
370 }
371 finally {
372 if (list == null) {
373 list = new ArrayList<ListType>();
374 }
375
376 cacheResult(list);
377
378 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_TYPE, finderArgs,
379 list);
380
381 closeSession(session);
382 }
383 }
384
385 return list;
386 }
387
388 public ListType findByType_First(String type,
389 OrderByComparator orderByComparator)
390 throws NoSuchListTypeException, SystemException {
391 List<ListType> list = findByType(type, 0, 1, orderByComparator);
392
393 if (list.isEmpty()) {
394 StringBundler msg = new StringBundler(4);
395
396 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
397
398 msg.append("type=");
399 msg.append(type);
400
401 msg.append(StringPool.CLOSE_CURLY_BRACE);
402
403 throw new NoSuchListTypeException(msg.toString());
404 }
405 else {
406 return list.get(0);
407 }
408 }
409
410 public ListType findByType_Last(String type,
411 OrderByComparator orderByComparator)
412 throws NoSuchListTypeException, SystemException {
413 int count = countByType(type);
414
415 List<ListType> list = findByType(type, count - 1, count,
416 orderByComparator);
417
418 if (list.isEmpty()) {
419 StringBundler msg = new StringBundler(4);
420
421 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
422
423 msg.append("type=");
424 msg.append(type);
425
426 msg.append(StringPool.CLOSE_CURLY_BRACE);
427
428 throw new NoSuchListTypeException(msg.toString());
429 }
430 else {
431 return list.get(0);
432 }
433 }
434
435 public ListType[] findByType_PrevAndNext(int listTypeId, String type,
436 OrderByComparator orderByComparator)
437 throws NoSuchListTypeException, SystemException {
438 ListType listType = findByPrimaryKey(listTypeId);
439
440 Session session = null;
441
442 try {
443 session = openSession();
444
445 ListType[] array = new ListTypeImpl[3];
446
447 array[0] = getByType_PrevAndNext(session, listType, type,
448 orderByComparator, true);
449
450 array[1] = listType;
451
452 array[2] = getByType_PrevAndNext(session, listType, type,
453 orderByComparator, false);
454
455 return array;
456 }
457 catch (Exception e) {
458 throw processException(e);
459 }
460 finally {
461 closeSession(session);
462 }
463 }
464
465 protected ListType getByType_PrevAndNext(Session session,
466 ListType listType, String type, OrderByComparator orderByComparator,
467 boolean previous) {
468 StringBundler query = null;
469
470 if (orderByComparator != null) {
471 query = new StringBundler(6 +
472 (orderByComparator.getOrderByFields().length * 6));
473 }
474 else {
475 query = new StringBundler(3);
476 }
477
478 query.append(_SQL_SELECT_LISTTYPE_WHERE);
479
480 if (type == null) {
481 query.append(_FINDER_COLUMN_TYPE_TYPE_1);
482 }
483 else {
484 if (type.equals(StringPool.BLANK)) {
485 query.append(_FINDER_COLUMN_TYPE_TYPE_3);
486 }
487 else {
488 query.append(_FINDER_COLUMN_TYPE_TYPE_2);
489 }
490 }
491
492 if (orderByComparator != null) {
493 String[] orderByFields = orderByComparator.getOrderByFields();
494
495 if (orderByFields.length > 0) {
496 query.append(WHERE_AND);
497 }
498
499 for (int i = 0; i < orderByFields.length; i++) {
500 query.append(_ORDER_BY_ENTITY_ALIAS);
501 query.append(orderByFields[i]);
502
503 if ((i + 1) < orderByFields.length) {
504 if (orderByComparator.isAscending() ^ previous) {
505 query.append(WHERE_GREATER_THAN_HAS_NEXT);
506 }
507 else {
508 query.append(WHERE_LESSER_THAN_HAS_NEXT);
509 }
510 }
511 else {
512 if (orderByComparator.isAscending() ^ previous) {
513 query.append(WHERE_GREATER_THAN);
514 }
515 else {
516 query.append(WHERE_LESSER_THAN);
517 }
518 }
519 }
520
521 query.append(ORDER_BY_CLAUSE);
522
523 for (int i = 0; i < orderByFields.length; i++) {
524 query.append(_ORDER_BY_ENTITY_ALIAS);
525 query.append(orderByFields[i]);
526
527 if ((i + 1) < orderByFields.length) {
528 if (orderByComparator.isAscending() ^ previous) {
529 query.append(ORDER_BY_ASC_HAS_NEXT);
530 }
531 else {
532 query.append(ORDER_BY_DESC_HAS_NEXT);
533 }
534 }
535 else {
536 if (orderByComparator.isAscending() ^ previous) {
537 query.append(ORDER_BY_ASC);
538 }
539 else {
540 query.append(ORDER_BY_DESC);
541 }
542 }
543 }
544 }
545
546 else {
547 query.append(ListTypeModelImpl.ORDER_BY_JPQL);
548 }
549
550 String sql = query.toString();
551
552 Query q = session.createQuery(sql);
553
554 q.setFirstResult(0);
555 q.setMaxResults(2);
556
557 QueryPos qPos = QueryPos.getInstance(q);
558
559 if (type != null) {
560 qPos.add(type);
561 }
562
563 if (orderByComparator != null) {
564 Object[] values = orderByComparator.getOrderByValues(listType);
565
566 for (Object value : values) {
567 qPos.add(value);
568 }
569 }
570
571 List<ListType> list = q.list();
572
573 if (list.size() == 2) {
574 return list.get(1);
575 }
576 else {
577 return null;
578 }
579 }
580
581 public List<ListType> findAll() throws SystemException {
582 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
583 }
584
585 public List<ListType> findAll(int start, int end) throws SystemException {
586 return findAll(start, end, null);
587 }
588
589 public List<ListType> findAll(int start, int end,
590 OrderByComparator orderByComparator) throws SystemException {
591 Object[] finderArgs = new Object[] {
592 String.valueOf(start), String.valueOf(end),
593 String.valueOf(orderByComparator)
594 };
595
596 List<ListType> list = (List<ListType>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
597 finderArgs, this);
598
599 if (list == null) {
600 StringBundler query = null;
601 String sql = null;
602
603 if (orderByComparator != null) {
604 query = new StringBundler(2 +
605 (orderByComparator.getOrderByFields().length * 3));
606
607 query.append(_SQL_SELECT_LISTTYPE);
608
609 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
610 orderByComparator);
611
612 sql = query.toString();
613 }
614 else {
615 sql = _SQL_SELECT_LISTTYPE.concat(ListTypeModelImpl.ORDER_BY_JPQL);
616 }
617
618 Session session = null;
619
620 try {
621 session = openSession();
622
623 Query q = session.createQuery(sql);
624
625 if (orderByComparator == null) {
626 list = (List<ListType>)QueryUtil.list(q, getDialect(),
627 start, end, false);
628
629 Collections.sort(list);
630 }
631 else {
632 list = (List<ListType>)QueryUtil.list(q, getDialect(),
633 start, end);
634 }
635 }
636 catch (Exception e) {
637 throw processException(e);
638 }
639 finally {
640 if (list == null) {
641 list = new ArrayList<ListType>();
642 }
643
644 cacheResult(list);
645
646 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
647
648 closeSession(session);
649 }
650 }
651
652 return list;
653 }
654
655 public void removeByType(String type) throws SystemException {
656 for (ListType listType : findByType(type)) {
657 remove(listType);
658 }
659 }
660
661 public void removeAll() throws SystemException {
662 for (ListType listType : findAll()) {
663 remove(listType);
664 }
665 }
666
667 public int countByType(String type) throws SystemException {
668 Object[] finderArgs = new Object[] { type };
669
670 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_TYPE,
671 finderArgs, this);
672
673 if (count == null) {
674 StringBundler query = new StringBundler(2);
675
676 query.append(_SQL_COUNT_LISTTYPE_WHERE);
677
678 if (type == null) {
679 query.append(_FINDER_COLUMN_TYPE_TYPE_1);
680 }
681 else {
682 if (type.equals(StringPool.BLANK)) {
683 query.append(_FINDER_COLUMN_TYPE_TYPE_3);
684 }
685 else {
686 query.append(_FINDER_COLUMN_TYPE_TYPE_2);
687 }
688 }
689
690 String sql = query.toString();
691
692 Session session = null;
693
694 try {
695 session = openSession();
696
697 Query q = session.createQuery(sql);
698
699 QueryPos qPos = QueryPos.getInstance(q);
700
701 if (type != null) {
702 qPos.add(type);
703 }
704
705 count = (Long)q.uniqueResult();
706 }
707 catch (Exception e) {
708 throw processException(e);
709 }
710 finally {
711 if (count == null) {
712 count = Long.valueOf(0);
713 }
714
715 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_TYPE,
716 finderArgs, count);
717
718 closeSession(session);
719 }
720 }
721
722 return count.intValue();
723 }
724
725 public int countAll() throws SystemException {
726 Object[] finderArgs = new Object[0];
727
728 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
729 finderArgs, this);
730
731 if (count == null) {
732 Session session = null;
733
734 try {
735 session = openSession();
736
737 Query q = session.createQuery(_SQL_COUNT_LISTTYPE);
738
739 count = (Long)q.uniqueResult();
740 }
741 catch (Exception e) {
742 throw processException(e);
743 }
744 finally {
745 if (count == null) {
746 count = Long.valueOf(0);
747 }
748
749 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
750 count);
751
752 closeSession(session);
753 }
754 }
755
756 return count.intValue();
757 }
758
759 public void afterPropertiesSet() {
760 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
761 com.liferay.portal.util.PropsUtil.get(
762 "value.object.listener.com.liferay.portal.model.ListType")));
763
764 if (listenerClassNames.length > 0) {
765 try {
766 List<ModelListener<ListType>> listenersList = new ArrayList<ModelListener<ListType>>();
767
768 for (String listenerClassName : listenerClassNames) {
769 listenersList.add((ModelListener<ListType>)InstanceFactory.newInstance(
770 listenerClassName));
771 }
772
773 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
774 }
775 catch (Exception e) {
776 _log.error(e);
777 }
778 }
779 }
780
781 public void destroy() {
782 EntityCacheUtil.removeCache(ListTypeImpl.class.getName());
783 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
784 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
785 }
786
787 @BeanReference(type = AccountPersistence.class)
788 protected AccountPersistence accountPersistence;
789 @BeanReference(type = AddressPersistence.class)
790 protected AddressPersistence addressPersistence;
791 @BeanReference(type = BrowserTrackerPersistence.class)
792 protected BrowserTrackerPersistence browserTrackerPersistence;
793 @BeanReference(type = ClassNamePersistence.class)
794 protected ClassNamePersistence classNamePersistence;
795 @BeanReference(type = CompanyPersistence.class)
796 protected CompanyPersistence companyPersistence;
797 @BeanReference(type = ContactPersistence.class)
798 protected ContactPersistence contactPersistence;
799 @BeanReference(type = CountryPersistence.class)
800 protected CountryPersistence countryPersistence;
801 @BeanReference(type = EmailAddressPersistence.class)
802 protected EmailAddressPersistence emailAddressPersistence;
803 @BeanReference(type = GroupPersistence.class)
804 protected GroupPersistence groupPersistence;
805 @BeanReference(type = ImagePersistence.class)
806 protected ImagePersistence imagePersistence;
807 @BeanReference(type = LayoutPersistence.class)
808 protected LayoutPersistence layoutPersistence;
809 @BeanReference(type = LayoutSetPersistence.class)
810 protected LayoutSetPersistence layoutSetPersistence;
811 @BeanReference(type = ListTypePersistence.class)
812 protected ListTypePersistence listTypePersistence;
813 @BeanReference(type = LockPersistence.class)
814 protected LockPersistence lockPersistence;
815 @BeanReference(type = MembershipRequestPersistence.class)
816 protected MembershipRequestPersistence membershipRequestPersistence;
817 @BeanReference(type = OrganizationPersistence.class)
818 protected OrganizationPersistence organizationPersistence;
819 @BeanReference(type = OrgGroupPermissionPersistence.class)
820 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
821 @BeanReference(type = OrgGroupRolePersistence.class)
822 protected OrgGroupRolePersistence orgGroupRolePersistence;
823 @BeanReference(type = OrgLaborPersistence.class)
824 protected OrgLaborPersistence orgLaborPersistence;
825 @BeanReference(type = PasswordPolicyPersistence.class)
826 protected PasswordPolicyPersistence passwordPolicyPersistence;
827 @BeanReference(type = PasswordPolicyRelPersistence.class)
828 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
829 @BeanReference(type = PasswordTrackerPersistence.class)
830 protected PasswordTrackerPersistence passwordTrackerPersistence;
831 @BeanReference(type = PermissionPersistence.class)
832 protected PermissionPersistence permissionPersistence;
833 @BeanReference(type = PhonePersistence.class)
834 protected PhonePersistence phonePersistence;
835 @BeanReference(type = PluginSettingPersistence.class)
836 protected PluginSettingPersistence pluginSettingPersistence;
837 @BeanReference(type = PortletPersistence.class)
838 protected PortletPersistence portletPersistence;
839 @BeanReference(type = PortletItemPersistence.class)
840 protected PortletItemPersistence portletItemPersistence;
841 @BeanReference(type = PortletPreferencesPersistence.class)
842 protected PortletPreferencesPersistence portletPreferencesPersistence;
843 @BeanReference(type = RegionPersistence.class)
844 protected RegionPersistence regionPersistence;
845 @BeanReference(type = ReleasePersistence.class)
846 protected ReleasePersistence releasePersistence;
847 @BeanReference(type = ResourcePersistence.class)
848 protected ResourcePersistence resourcePersistence;
849 @BeanReference(type = ResourceActionPersistence.class)
850 protected ResourceActionPersistence resourceActionPersistence;
851 @BeanReference(type = ResourceCodePersistence.class)
852 protected ResourceCodePersistence resourceCodePersistence;
853 @BeanReference(type = ResourcePermissionPersistence.class)
854 protected ResourcePermissionPersistence resourcePermissionPersistence;
855 @BeanReference(type = RolePersistence.class)
856 protected RolePersistence rolePersistence;
857 @BeanReference(type = ServiceComponentPersistence.class)
858 protected ServiceComponentPersistence serviceComponentPersistence;
859 @BeanReference(type = ShardPersistence.class)
860 protected ShardPersistence shardPersistence;
861 @BeanReference(type = SubscriptionPersistence.class)
862 protected SubscriptionPersistence subscriptionPersistence;
863 @BeanReference(type = UserPersistence.class)
864 protected UserPersistence userPersistence;
865 @BeanReference(type = UserGroupPersistence.class)
866 protected UserGroupPersistence userGroupPersistence;
867 @BeanReference(type = UserGroupGroupRolePersistence.class)
868 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
869 @BeanReference(type = UserGroupRolePersistence.class)
870 protected UserGroupRolePersistence userGroupRolePersistence;
871 @BeanReference(type = UserIdMapperPersistence.class)
872 protected UserIdMapperPersistence userIdMapperPersistence;
873 @BeanReference(type = UserTrackerPersistence.class)
874 protected UserTrackerPersistence userTrackerPersistence;
875 @BeanReference(type = UserTrackerPathPersistence.class)
876 protected UserTrackerPathPersistence userTrackerPathPersistence;
877 @BeanReference(type = WebDAVPropsPersistence.class)
878 protected WebDAVPropsPersistence webDAVPropsPersistence;
879 @BeanReference(type = WebsitePersistence.class)
880 protected WebsitePersistence websitePersistence;
881 private static final String _SQL_SELECT_LISTTYPE = "SELECT listType FROM ListType listType";
882 private static final String _SQL_SELECT_LISTTYPE_WHERE = "SELECT listType FROM ListType listType WHERE ";
883 private static final String _SQL_COUNT_LISTTYPE = "SELECT COUNT(listType) FROM ListType listType";
884 private static final String _SQL_COUNT_LISTTYPE_WHERE = "SELECT COUNT(listType) FROM ListType listType WHERE ";
885 private static final String _FINDER_COLUMN_TYPE_TYPE_1 = "listType.type IS NULL";
886 private static final String _FINDER_COLUMN_TYPE_TYPE_2 = "listType.type = ?";
887 private static final String _FINDER_COLUMN_TYPE_TYPE_3 = "(listType.type IS NULL OR listType.type = ?)";
888 private static final String _ORDER_BY_ENTITY_ALIAS = "listType.";
889 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ListType exists with the primary key ";
890 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No ListType exists with the key {";
891 private static Log _log = LogFactoryUtil.getLog(ListTypePersistenceImpl.class);
892 }