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