1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.kernel.util.GetterUtil;
26 import com.liferay.portal.kernel.util.Validator;
27 import com.liferay.portal.model.ModelListener;
28 import com.liferay.portal.util.PropsUtil;
29
30 import org.apache.commons.logging.Log;
31 import org.apache.commons.logging.LogFactory;
32
33
39 public class GroupUtil {
40 public static com.liferay.portal.model.Group create(long groupId) {
41 return getPersistence().create(groupId);
42 }
43
44 public static com.liferay.portal.model.Group remove(long groupId)
45 throws com.liferay.portal.SystemException,
46 com.liferay.portal.NoSuchGroupException {
47 ModelListener listener = _getListener();
48
49 if (listener != null) {
50 listener.onBeforeRemove(findByPrimaryKey(groupId));
51 }
52
53 com.liferay.portal.model.Group group = getPersistence().remove(groupId);
54
55 if (listener != null) {
56 listener.onAfterRemove(group);
57 }
58
59 return group;
60 }
61
62 public static com.liferay.portal.model.Group remove(
63 com.liferay.portal.model.Group group)
64 throws com.liferay.portal.SystemException {
65 ModelListener listener = _getListener();
66
67 if (listener != null) {
68 listener.onBeforeRemove(group);
69 }
70
71 group = getPersistence().remove(group);
72
73 if (listener != null) {
74 listener.onAfterRemove(group);
75 }
76
77 return group;
78 }
79
80 public static com.liferay.portal.model.Group update(
81 com.liferay.portal.model.Group group)
82 throws com.liferay.portal.SystemException {
83 ModelListener listener = _getListener();
84 boolean isNew = group.isNew();
85
86 if (listener != null) {
87 if (isNew) {
88 listener.onBeforeCreate(group);
89 }
90 else {
91 listener.onBeforeUpdate(group);
92 }
93 }
94
95 group = getPersistence().update(group);
96
97 if (listener != null) {
98 if (isNew) {
99 listener.onAfterCreate(group);
100 }
101 else {
102 listener.onAfterUpdate(group);
103 }
104 }
105
106 return group;
107 }
108
109 public static com.liferay.portal.model.Group update(
110 com.liferay.portal.model.Group group, boolean merge)
111 throws com.liferay.portal.SystemException {
112 ModelListener listener = _getListener();
113 boolean isNew = group.isNew();
114
115 if (listener != null) {
116 if (isNew) {
117 listener.onBeforeCreate(group);
118 }
119 else {
120 listener.onBeforeUpdate(group);
121 }
122 }
123
124 group = getPersistence().update(group, merge);
125
126 if (listener != null) {
127 if (isNew) {
128 listener.onAfterCreate(group);
129 }
130 else {
131 listener.onAfterUpdate(group);
132 }
133 }
134
135 return group;
136 }
137
138 public static com.liferay.portal.model.Group findByPrimaryKey(long groupId)
139 throws com.liferay.portal.SystemException,
140 com.liferay.portal.NoSuchGroupException {
141 return getPersistence().findByPrimaryKey(groupId);
142 }
143
144 public static com.liferay.portal.model.Group fetchByPrimaryKey(long groupId)
145 throws com.liferay.portal.SystemException {
146 return getPersistence().fetchByPrimaryKey(groupId);
147 }
148
149 public static com.liferay.portal.model.Group findByLiveGroupId(
150 long liveGroupId)
151 throws com.liferay.portal.SystemException,
152 com.liferay.portal.NoSuchGroupException {
153 return getPersistence().findByLiveGroupId(liveGroupId);
154 }
155
156 public static com.liferay.portal.model.Group fetchByLiveGroupId(
157 long liveGroupId) throws com.liferay.portal.SystemException {
158 return getPersistence().fetchByLiveGroupId(liveGroupId);
159 }
160
161 public static com.liferay.portal.model.Group findByC_N(long companyId,
162 java.lang.String name)
163 throws com.liferay.portal.SystemException,
164 com.liferay.portal.NoSuchGroupException {
165 return getPersistence().findByC_N(companyId, name);
166 }
167
168 public static com.liferay.portal.model.Group fetchByC_N(long companyId,
169 java.lang.String name) throws com.liferay.portal.SystemException {
170 return getPersistence().fetchByC_N(companyId, name);
171 }
172
173 public static com.liferay.portal.model.Group findByC_F(long companyId,
174 java.lang.String friendlyURL)
175 throws com.liferay.portal.SystemException,
176 com.liferay.portal.NoSuchGroupException {
177 return getPersistence().findByC_F(companyId, friendlyURL);
178 }
179
180 public static com.liferay.portal.model.Group fetchByC_F(long companyId,
181 java.lang.String friendlyURL) throws com.liferay.portal.SystemException {
182 return getPersistence().fetchByC_F(companyId, friendlyURL);
183 }
184
185 public static com.liferay.portal.model.Group findByC_C_C(long companyId,
186 long classNameId, long classPK)
187 throws com.liferay.portal.SystemException,
188 com.liferay.portal.NoSuchGroupException {
189 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
190 }
191
192 public static com.liferay.portal.model.Group fetchByC_C_C(long companyId,
193 long classNameId, long classPK)
194 throws com.liferay.portal.SystemException {
195 return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
196 }
197
198 public static java.util.List findWithDynamicQuery(
199 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
200 throws com.liferay.portal.SystemException {
201 return getPersistence().findWithDynamicQuery(queryInitializer);
202 }
203
204 public static java.util.List findWithDynamicQuery(
205 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
206 int begin, int end) throws com.liferay.portal.SystemException {
207 return getPersistence().findWithDynamicQuery(queryInitializer, begin,
208 end);
209 }
210
211 public static java.util.List findAll()
212 throws com.liferay.portal.SystemException {
213 return getPersistence().findAll();
214 }
215
216 public static java.util.List findAll(int begin, int end)
217 throws com.liferay.portal.SystemException {
218 return getPersistence().findAll(begin, end);
219 }
220
221 public static java.util.List findAll(int begin, int end,
222 com.liferay.portal.kernel.util.OrderByComparator obc)
223 throws com.liferay.portal.SystemException {
224 return getPersistence().findAll(begin, end, obc);
225 }
226
227 public static void removeByLiveGroupId(long liveGroupId)
228 throws com.liferay.portal.SystemException,
229 com.liferay.portal.NoSuchGroupException {
230 getPersistence().removeByLiveGroupId(liveGroupId);
231 }
232
233 public static void removeByC_N(long companyId, java.lang.String name)
234 throws com.liferay.portal.SystemException,
235 com.liferay.portal.NoSuchGroupException {
236 getPersistence().removeByC_N(companyId, name);
237 }
238
239 public static void removeByC_F(long companyId, java.lang.String friendlyURL)
240 throws com.liferay.portal.SystemException,
241 com.liferay.portal.NoSuchGroupException {
242 getPersistence().removeByC_F(companyId, friendlyURL);
243 }
244
245 public static void removeByC_C_C(long companyId, long classNameId,
246 long classPK)
247 throws com.liferay.portal.SystemException,
248 com.liferay.portal.NoSuchGroupException {
249 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
250 }
251
252 public static void removeAll() throws com.liferay.portal.SystemException {
253 getPersistence().removeAll();
254 }
255
256 public static int countByLiveGroupId(long liveGroupId)
257 throws com.liferay.portal.SystemException {
258 return getPersistence().countByLiveGroupId(liveGroupId);
259 }
260
261 public static int countByC_N(long companyId, java.lang.String name)
262 throws com.liferay.portal.SystemException {
263 return getPersistence().countByC_N(companyId, name);
264 }
265
266 public static int countByC_F(long companyId, java.lang.String friendlyURL)
267 throws com.liferay.portal.SystemException {
268 return getPersistence().countByC_F(companyId, friendlyURL);
269 }
270
271 public static int countByC_C_C(long companyId, long classNameId,
272 long classPK) throws com.liferay.portal.SystemException {
273 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
274 }
275
276 public static int countAll() throws com.liferay.portal.SystemException {
277 return getPersistence().countAll();
278 }
279
280 public static java.util.List getOrganizations(long pk)
281 throws com.liferay.portal.SystemException,
282 com.liferay.portal.NoSuchGroupException {
283 return getPersistence().getOrganizations(pk);
284 }
285
286 public static java.util.List getOrganizations(long pk, int begin, int end)
287 throws com.liferay.portal.SystemException,
288 com.liferay.portal.NoSuchGroupException {
289 return getPersistence().getOrganizations(pk, begin, end);
290 }
291
292 public static java.util.List getOrganizations(long pk, int begin, int end,
293 com.liferay.portal.kernel.util.OrderByComparator obc)
294 throws com.liferay.portal.SystemException,
295 com.liferay.portal.NoSuchGroupException {
296 return getPersistence().getOrganizations(pk, begin, end, obc);
297 }
298
299 public static int getOrganizationsSize(long pk)
300 throws com.liferay.portal.SystemException {
301 return getPersistence().getOrganizationsSize(pk);
302 }
303
304 public static boolean containsOrganization(long pk, long organizationPK)
305 throws com.liferay.portal.SystemException {
306 return getPersistence().containsOrganization(pk, organizationPK);
307 }
308
309 public static boolean containsOrganizations(long pk)
310 throws com.liferay.portal.SystemException {
311 return getPersistence().containsOrganizations(pk);
312 }
313
314 public static void addOrganization(long pk, long organizationPK)
315 throws com.liferay.portal.SystemException,
316 com.liferay.portal.NoSuchGroupException,
317 com.liferay.portal.NoSuchOrganizationException {
318 getPersistence().addOrganization(pk, organizationPK);
319 }
320
321 public static void addOrganization(long pk,
322 com.liferay.portal.model.Organization organization)
323 throws com.liferay.portal.SystemException,
324 com.liferay.portal.NoSuchGroupException,
325 com.liferay.portal.NoSuchOrganizationException {
326 getPersistence().addOrganization(pk, organization);
327 }
328
329 public static void addOrganizations(long pk, long[] organizationPKs)
330 throws com.liferay.portal.SystemException,
331 com.liferay.portal.NoSuchGroupException,
332 com.liferay.portal.NoSuchOrganizationException {
333 getPersistence().addOrganizations(pk, organizationPKs);
334 }
335
336 public static void addOrganizations(long pk, java.util.List organizations)
337 throws com.liferay.portal.SystemException,
338 com.liferay.portal.NoSuchGroupException,
339 com.liferay.portal.NoSuchOrganizationException {
340 getPersistence().addOrganizations(pk, organizations);
341 }
342
343 public static void clearOrganizations(long pk)
344 throws com.liferay.portal.SystemException,
345 com.liferay.portal.NoSuchGroupException {
346 getPersistence().clearOrganizations(pk);
347 }
348
349 public static void removeOrganization(long pk, long organizationPK)
350 throws com.liferay.portal.SystemException,
351 com.liferay.portal.NoSuchGroupException,
352 com.liferay.portal.NoSuchOrganizationException {
353 getPersistence().removeOrganization(pk, organizationPK);
354 }
355
356 public static void removeOrganization(long pk,
357 com.liferay.portal.model.Organization organization)
358 throws com.liferay.portal.SystemException,
359 com.liferay.portal.NoSuchGroupException,
360 com.liferay.portal.NoSuchOrganizationException {
361 getPersistence().removeOrganization(pk, organization);
362 }
363
364 public static void removeOrganizations(long pk, long[] organizationPKs)
365 throws com.liferay.portal.SystemException,
366 com.liferay.portal.NoSuchGroupException,
367 com.liferay.portal.NoSuchOrganizationException {
368 getPersistence().removeOrganizations(pk, organizationPKs);
369 }
370
371 public static void removeOrganizations(long pk, java.util.List organizations)
372 throws com.liferay.portal.SystemException,
373 com.liferay.portal.NoSuchGroupException,
374 com.liferay.portal.NoSuchOrganizationException {
375 getPersistence().removeOrganizations(pk, organizations);
376 }
377
378 public static void setOrganizations(long pk, long[] organizationPKs)
379 throws com.liferay.portal.SystemException,
380 com.liferay.portal.NoSuchGroupException,
381 com.liferay.portal.NoSuchOrganizationException {
382 getPersistence().setOrganizations(pk, organizationPKs);
383 }
384
385 public static void setOrganizations(long pk, java.util.List organizations)
386 throws com.liferay.portal.SystemException,
387 com.liferay.portal.NoSuchGroupException,
388 com.liferay.portal.NoSuchOrganizationException {
389 getPersistence().setOrganizations(pk, organizations);
390 }
391
392 public static java.util.List getPermissions(long pk)
393 throws com.liferay.portal.SystemException,
394 com.liferay.portal.NoSuchGroupException {
395 return getPersistence().getPermissions(pk);
396 }
397
398 public static java.util.List getPermissions(long pk, int begin, int end)
399 throws com.liferay.portal.SystemException,
400 com.liferay.portal.NoSuchGroupException {
401 return getPersistence().getPermissions(pk, begin, end);
402 }
403
404 public static java.util.List getPermissions(long pk, int begin, int end,
405 com.liferay.portal.kernel.util.OrderByComparator obc)
406 throws com.liferay.portal.SystemException,
407 com.liferay.portal.NoSuchGroupException {
408 return getPersistence().getPermissions(pk, begin, end, obc);
409 }
410
411 public static int getPermissionsSize(long pk)
412 throws com.liferay.portal.SystemException {
413 return getPersistence().getPermissionsSize(pk);
414 }
415
416 public static boolean containsPermission(long pk, long permissionPK)
417 throws com.liferay.portal.SystemException {
418 return getPersistence().containsPermission(pk, permissionPK);
419 }
420
421 public static boolean containsPermissions(long pk)
422 throws com.liferay.portal.SystemException {
423 return getPersistence().containsPermissions(pk);
424 }
425
426 public static void addPermission(long pk, long permissionPK)
427 throws com.liferay.portal.SystemException,
428 com.liferay.portal.NoSuchPermissionException,
429 com.liferay.portal.NoSuchGroupException {
430 getPersistence().addPermission(pk, permissionPK);
431 }
432
433 public static void addPermission(long pk,
434 com.liferay.portal.model.Permission permission)
435 throws com.liferay.portal.SystemException,
436 com.liferay.portal.NoSuchPermissionException,
437 com.liferay.portal.NoSuchGroupException {
438 getPersistence().addPermission(pk, permission);
439 }
440
441 public static void addPermissions(long pk, long[] permissionPKs)
442 throws com.liferay.portal.SystemException,
443 com.liferay.portal.NoSuchPermissionException,
444 com.liferay.portal.NoSuchGroupException {
445 getPersistence().addPermissions(pk, permissionPKs);
446 }
447
448 public static void addPermissions(long pk, java.util.List permissions)
449 throws com.liferay.portal.SystemException,
450 com.liferay.portal.NoSuchPermissionException,
451 com.liferay.portal.NoSuchGroupException {
452 getPersistence().addPermissions(pk, permissions);
453 }
454
455 public static void clearPermissions(long pk)
456 throws com.liferay.portal.SystemException,
457 com.liferay.portal.NoSuchGroupException {
458 getPersistence().clearPermissions(pk);
459 }
460
461 public static void removePermission(long pk, long permissionPK)
462 throws com.liferay.portal.SystemException,
463 com.liferay.portal.NoSuchPermissionException,
464 com.liferay.portal.NoSuchGroupException {
465 getPersistence().removePermission(pk, permissionPK);
466 }
467
468 public static void removePermission(long pk,
469 com.liferay.portal.model.Permission permission)
470 throws com.liferay.portal.SystemException,
471 com.liferay.portal.NoSuchPermissionException,
472 com.liferay.portal.NoSuchGroupException {
473 getPersistence().removePermission(pk, permission);
474 }
475
476 public static void removePermissions(long pk, long[] permissionPKs)
477 throws com.liferay.portal.SystemException,
478 com.liferay.portal.NoSuchPermissionException,
479 com.liferay.portal.NoSuchGroupException {
480 getPersistence().removePermissions(pk, permissionPKs);
481 }
482
483 public static void removePermissions(long pk, java.util.List permissions)
484 throws com.liferay.portal.SystemException,
485 com.liferay.portal.NoSuchPermissionException,
486 com.liferay.portal.NoSuchGroupException {
487 getPersistence().removePermissions(pk, permissions);
488 }
489
490 public static void setPermissions(long pk, long[] permissionPKs)
491 throws com.liferay.portal.SystemException,
492 com.liferay.portal.NoSuchPermissionException,
493 com.liferay.portal.NoSuchGroupException {
494 getPersistence().setPermissions(pk, permissionPKs);
495 }
496
497 public static void setPermissions(long pk, java.util.List permissions)
498 throws com.liferay.portal.SystemException,
499 com.liferay.portal.NoSuchPermissionException,
500 com.liferay.portal.NoSuchGroupException {
501 getPersistence().setPermissions(pk, permissions);
502 }
503
504 public static java.util.List getRoles(long pk)
505 throws com.liferay.portal.SystemException,
506 com.liferay.portal.NoSuchGroupException {
507 return getPersistence().getRoles(pk);
508 }
509
510 public static java.util.List getRoles(long pk, int begin, int end)
511 throws com.liferay.portal.SystemException,
512 com.liferay.portal.NoSuchGroupException {
513 return getPersistence().getRoles(pk, begin, end);
514 }
515
516 public static java.util.List getRoles(long pk, int begin, int end,
517 com.liferay.portal.kernel.util.OrderByComparator obc)
518 throws com.liferay.portal.SystemException,
519 com.liferay.portal.NoSuchGroupException {
520 return getPersistence().getRoles(pk, begin, end, obc);
521 }
522
523 public static int getRolesSize(long pk)
524 throws com.liferay.portal.SystemException {
525 return getPersistence().getRolesSize(pk);
526 }
527
528 public static boolean containsRole(long pk, long rolePK)
529 throws com.liferay.portal.SystemException {
530 return getPersistence().containsRole(pk, rolePK);
531 }
532
533 public static boolean containsRoles(long pk)
534 throws com.liferay.portal.SystemException {
535 return getPersistence().containsRoles(pk);
536 }
537
538 public static void addRole(long pk, long rolePK)
539 throws com.liferay.portal.SystemException,
540 com.liferay.portal.NoSuchRoleException,
541 com.liferay.portal.NoSuchGroupException {
542 getPersistence().addRole(pk, rolePK);
543 }
544
545 public static void addRole(long pk, com.liferay.portal.model.Role role)
546 throws com.liferay.portal.SystemException,
547 com.liferay.portal.NoSuchRoleException,
548 com.liferay.portal.NoSuchGroupException {
549 getPersistence().addRole(pk, role);
550 }
551
552 public static void addRoles(long pk, long[] rolePKs)
553 throws com.liferay.portal.SystemException,
554 com.liferay.portal.NoSuchRoleException,
555 com.liferay.portal.NoSuchGroupException {
556 getPersistence().addRoles(pk, rolePKs);
557 }
558
559 public static void addRoles(long pk, java.util.List roles)
560 throws com.liferay.portal.SystemException,
561 com.liferay.portal.NoSuchRoleException,
562 com.liferay.portal.NoSuchGroupException {
563 getPersistence().addRoles(pk, roles);
564 }
565
566 public static void clearRoles(long pk)
567 throws com.liferay.portal.SystemException,
568 com.liferay.portal.NoSuchGroupException {
569 getPersistence().clearRoles(pk);
570 }
571
572 public static void removeRole(long pk, long rolePK)
573 throws com.liferay.portal.SystemException,
574 com.liferay.portal.NoSuchRoleException,
575 com.liferay.portal.NoSuchGroupException {
576 getPersistence().removeRole(pk, rolePK);
577 }
578
579 public static void removeRole(long pk, com.liferay.portal.model.Role role)
580 throws com.liferay.portal.SystemException,
581 com.liferay.portal.NoSuchRoleException,
582 com.liferay.portal.NoSuchGroupException {
583 getPersistence().removeRole(pk, role);
584 }
585
586 public static void removeRoles(long pk, long[] rolePKs)
587 throws com.liferay.portal.SystemException,
588 com.liferay.portal.NoSuchRoleException,
589 com.liferay.portal.NoSuchGroupException {
590 getPersistence().removeRoles(pk, rolePKs);
591 }
592
593 public static void removeRoles(long pk, java.util.List roles)
594 throws com.liferay.portal.SystemException,
595 com.liferay.portal.NoSuchRoleException,
596 com.liferay.portal.NoSuchGroupException {
597 getPersistence().removeRoles(pk, roles);
598 }
599
600 public static void setRoles(long pk, long[] rolePKs)
601 throws com.liferay.portal.SystemException,
602 com.liferay.portal.NoSuchRoleException,
603 com.liferay.portal.NoSuchGroupException {
604 getPersistence().setRoles(pk, rolePKs);
605 }
606
607 public static void setRoles(long pk, java.util.List roles)
608 throws com.liferay.portal.SystemException,
609 com.liferay.portal.NoSuchRoleException,
610 com.liferay.portal.NoSuchGroupException {
611 getPersistence().setRoles(pk, roles);
612 }
613
614 public static java.util.List getUserGroups(long pk)
615 throws com.liferay.portal.SystemException,
616 com.liferay.portal.NoSuchGroupException {
617 return getPersistence().getUserGroups(pk);
618 }
619
620 public static java.util.List getUserGroups(long pk, int begin, int end)
621 throws com.liferay.portal.SystemException,
622 com.liferay.portal.NoSuchGroupException {
623 return getPersistence().getUserGroups(pk, begin, end);
624 }
625
626 public static java.util.List getUserGroups(long pk, int begin, int end,
627 com.liferay.portal.kernel.util.OrderByComparator obc)
628 throws com.liferay.portal.SystemException,
629 com.liferay.portal.NoSuchGroupException {
630 return getPersistence().getUserGroups(pk, begin, end, obc);
631 }
632
633 public static int getUserGroupsSize(long pk)
634 throws com.liferay.portal.SystemException {
635 return getPersistence().getUserGroupsSize(pk);
636 }
637
638 public static boolean containsUserGroup(long pk, long userGroupPK)
639 throws com.liferay.portal.SystemException {
640 return getPersistence().containsUserGroup(pk, userGroupPK);
641 }
642
643 public static boolean containsUserGroups(long pk)
644 throws com.liferay.portal.SystemException {
645 return getPersistence().containsUserGroups(pk);
646 }
647
648 public static void addUserGroup(long pk, long userGroupPK)
649 throws com.liferay.portal.SystemException,
650 com.liferay.portal.NoSuchGroupException,
651 com.liferay.portal.NoSuchUserGroupException {
652 getPersistence().addUserGroup(pk, userGroupPK);
653 }
654
655 public static void addUserGroup(long pk,
656 com.liferay.portal.model.UserGroup userGroup)
657 throws com.liferay.portal.SystemException,
658 com.liferay.portal.NoSuchGroupException,
659 com.liferay.portal.NoSuchUserGroupException {
660 getPersistence().addUserGroup(pk, userGroup);
661 }
662
663 public static void addUserGroups(long pk, long[] userGroupPKs)
664 throws com.liferay.portal.SystemException,
665 com.liferay.portal.NoSuchGroupException,
666 com.liferay.portal.NoSuchUserGroupException {
667 getPersistence().addUserGroups(pk, userGroupPKs);
668 }
669
670 public static void addUserGroups(long pk, java.util.List userGroups)
671 throws com.liferay.portal.SystemException,
672 com.liferay.portal.NoSuchGroupException,
673 com.liferay.portal.NoSuchUserGroupException {
674 getPersistence().addUserGroups(pk, userGroups);
675 }
676
677 public static void clearUserGroups(long pk)
678 throws com.liferay.portal.SystemException,
679 com.liferay.portal.NoSuchGroupException {
680 getPersistence().clearUserGroups(pk);
681 }
682
683 public static void removeUserGroup(long pk, long userGroupPK)
684 throws com.liferay.portal.SystemException,
685 com.liferay.portal.NoSuchGroupException,
686 com.liferay.portal.NoSuchUserGroupException {
687 getPersistence().removeUserGroup(pk, userGroupPK);
688 }
689
690 public static void removeUserGroup(long pk,
691 com.liferay.portal.model.UserGroup userGroup)
692 throws com.liferay.portal.SystemException,
693 com.liferay.portal.NoSuchGroupException,
694 com.liferay.portal.NoSuchUserGroupException {
695 getPersistence().removeUserGroup(pk, userGroup);
696 }
697
698 public static void removeUserGroups(long pk, long[] userGroupPKs)
699 throws com.liferay.portal.SystemException,
700 com.liferay.portal.NoSuchGroupException,
701 com.liferay.portal.NoSuchUserGroupException {
702 getPersistence().removeUserGroups(pk, userGroupPKs);
703 }
704
705 public static void removeUserGroups(long pk, java.util.List userGroups)
706 throws com.liferay.portal.SystemException,
707 com.liferay.portal.NoSuchGroupException,
708 com.liferay.portal.NoSuchUserGroupException {
709 getPersistence().removeUserGroups(pk, userGroups);
710 }
711
712 public static void setUserGroups(long pk, long[] userGroupPKs)
713 throws com.liferay.portal.SystemException,
714 com.liferay.portal.NoSuchGroupException,
715 com.liferay.portal.NoSuchUserGroupException {
716 getPersistence().setUserGroups(pk, userGroupPKs);
717 }
718
719 public static void setUserGroups(long pk, java.util.List userGroups)
720 throws com.liferay.portal.SystemException,
721 com.liferay.portal.NoSuchGroupException,
722 com.liferay.portal.NoSuchUserGroupException {
723 getPersistence().setUserGroups(pk, userGroups);
724 }
725
726 public static java.util.List getUsers(long pk)
727 throws com.liferay.portal.SystemException,
728 com.liferay.portal.NoSuchGroupException {
729 return getPersistence().getUsers(pk);
730 }
731
732 public static java.util.List getUsers(long pk, int begin, int end)
733 throws com.liferay.portal.SystemException,
734 com.liferay.portal.NoSuchGroupException {
735 return getPersistence().getUsers(pk, begin, end);
736 }
737
738 public static java.util.List getUsers(long pk, int begin, int end,
739 com.liferay.portal.kernel.util.OrderByComparator obc)
740 throws com.liferay.portal.SystemException,
741 com.liferay.portal.NoSuchGroupException {
742 return getPersistence().getUsers(pk, begin, end, obc);
743 }
744
745 public static int getUsersSize(long pk)
746 throws com.liferay.portal.SystemException {
747 return getPersistence().getUsersSize(pk);
748 }
749
750 public static boolean containsUser(long pk, long userPK)
751 throws com.liferay.portal.SystemException {
752 return getPersistence().containsUser(pk, userPK);
753 }
754
755 public static boolean containsUsers(long pk)
756 throws com.liferay.portal.SystemException {
757 return getPersistence().containsUsers(pk);
758 }
759
760 public static void addUser(long pk, long userPK)
761 throws com.liferay.portal.SystemException,
762 com.liferay.portal.NoSuchGroupException,
763 com.liferay.portal.NoSuchUserException {
764 getPersistence().addUser(pk, userPK);
765 }
766
767 public static void addUser(long pk, com.liferay.portal.model.User user)
768 throws com.liferay.portal.SystemException,
769 com.liferay.portal.NoSuchGroupException,
770 com.liferay.portal.NoSuchUserException {
771 getPersistence().addUser(pk, user);
772 }
773
774 public static void addUsers(long pk, long[] userPKs)
775 throws com.liferay.portal.SystemException,
776 com.liferay.portal.NoSuchGroupException,
777 com.liferay.portal.NoSuchUserException {
778 getPersistence().addUsers(pk, userPKs);
779 }
780
781 public static void addUsers(long pk, java.util.List users)
782 throws com.liferay.portal.SystemException,
783 com.liferay.portal.NoSuchGroupException,
784 com.liferay.portal.NoSuchUserException {
785 getPersistence().addUsers(pk, users);
786 }
787
788 public static void clearUsers(long pk)
789 throws com.liferay.portal.SystemException,
790 com.liferay.portal.NoSuchGroupException {
791 getPersistence().clearUsers(pk);
792 }
793
794 public static void removeUser(long pk, long userPK)
795 throws com.liferay.portal.SystemException,
796 com.liferay.portal.NoSuchGroupException,
797 com.liferay.portal.NoSuchUserException {
798 getPersistence().removeUser(pk, userPK);
799 }
800
801 public static void removeUser(long pk, com.liferay.portal.model.User user)
802 throws com.liferay.portal.SystemException,
803 com.liferay.portal.NoSuchGroupException,
804 com.liferay.portal.NoSuchUserException {
805 getPersistence().removeUser(pk, user);
806 }
807
808 public static void removeUsers(long pk, long[] userPKs)
809 throws com.liferay.portal.SystemException,
810 com.liferay.portal.NoSuchGroupException,
811 com.liferay.portal.NoSuchUserException {
812 getPersistence().removeUsers(pk, userPKs);
813 }
814
815 public static void removeUsers(long pk, java.util.List users)
816 throws com.liferay.portal.SystemException,
817 com.liferay.portal.NoSuchGroupException,
818 com.liferay.portal.NoSuchUserException {
819 getPersistence().removeUsers(pk, users);
820 }
821
822 public static void setUsers(long pk, long[] userPKs)
823 throws com.liferay.portal.SystemException,
824 com.liferay.portal.NoSuchGroupException,
825 com.liferay.portal.NoSuchUserException {
826 getPersistence().setUsers(pk, userPKs);
827 }
828
829 public static void setUsers(long pk, java.util.List users)
830 throws com.liferay.portal.SystemException,
831 com.liferay.portal.NoSuchGroupException,
832 com.liferay.portal.NoSuchUserException {
833 getPersistence().setUsers(pk, users);
834 }
835
836 public static GroupPersistence getPersistence() {
837 return _getUtil()._persistence;
838 }
839
840 public void setPersistence(GroupPersistence persistence) {
841 _persistence = persistence;
842 }
843
844 private static GroupUtil _getUtil() {
845 if (_util == null) {
846 _util = (GroupUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
847 }
848
849 return _util;
850 }
851
852 private static ModelListener _getListener() {
853 if (Validator.isNotNull(_LISTENER)) {
854 try {
855 return (ModelListener)Class.forName(_LISTENER).newInstance();
856 }
857 catch (Exception e) {
858 _log.error(e);
859 }
860 }
861
862 return null;
863 }
864
865 private static final String _UTIL = GroupUtil.class.getName();
866 private static final String _LISTENER = GetterUtil.getString(PropsUtil.get(
867 "value.object.listener.com.liferay.portal.model.Group"));
868 private static Log _log = LogFactory.getLog(GroupUtil.class);
869 private static GroupUtil _util;
870 private GroupPersistence _persistence;
871 }