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