1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19 import com.liferay.portal.kernel.exception.SystemException;
20 import com.liferay.portal.model.UserGroup;
21
22 import java.util.List;
23
24
37 public class UserGroupUtil {
38
41 public static void clearCache() {
42 getPersistence().clearCache();
43 }
44
45
48 public static void clearCache(UserGroup userGroup) {
49 getPersistence().clearCache(userGroup);
50 }
51
52
55 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56 throws SystemException {
57 return getPersistence().countWithDynamicQuery(dynamicQuery);
58 }
59
60
63 public static List<UserGroup> findWithDynamicQuery(
64 DynamicQuery dynamicQuery) throws SystemException {
65 return getPersistence().findWithDynamicQuery(dynamicQuery);
66 }
67
68
71 public static List<UserGroup> findWithDynamicQuery(
72 DynamicQuery dynamicQuery, int start, int end)
73 throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static UserGroup remove(UserGroup userGroup)
81 throws SystemException {
82 return getPersistence().remove(userGroup);
83 }
84
85
88 public static UserGroup update(UserGroup userGroup, boolean merge)
89 throws SystemException {
90 return getPersistence().update(userGroup, merge);
91 }
92
93 public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) {
94 getPersistence().cacheResult(userGroup);
95 }
96
97 public static void cacheResult(
98 java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
99 getPersistence().cacheResult(userGroups);
100 }
101
102 public static com.liferay.portal.model.UserGroup create(long userGroupId) {
103 return getPersistence().create(userGroupId);
104 }
105
106 public static com.liferay.portal.model.UserGroup remove(long userGroupId)
107 throws com.liferay.portal.NoSuchUserGroupException,
108 com.liferay.portal.kernel.exception.SystemException {
109 return getPersistence().remove(userGroupId);
110 }
111
112 public static com.liferay.portal.model.UserGroup updateImpl(
113 com.liferay.portal.model.UserGroup userGroup, boolean merge)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 return getPersistence().updateImpl(userGroup, merge);
116 }
117
118 public static com.liferay.portal.model.UserGroup findByPrimaryKey(
119 long userGroupId)
120 throws com.liferay.portal.NoSuchUserGroupException,
121 com.liferay.portal.kernel.exception.SystemException {
122 return getPersistence().findByPrimaryKey(userGroupId);
123 }
124
125 public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
126 long userGroupId)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getPersistence().fetchByPrimaryKey(userGroupId);
129 }
130
131 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
132 long companyId)
133 throws com.liferay.portal.kernel.exception.SystemException {
134 return getPersistence().findByCompanyId(companyId);
135 }
136
137 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
138 long companyId, int start, int end)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getPersistence().findByCompanyId(companyId, start, end);
141 }
142
143 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
144 long companyId, int start, int end,
145 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getPersistence()
148 .findByCompanyId(companyId, start, end, orderByComparator);
149 }
150
151 public static com.liferay.portal.model.UserGroup findByCompanyId_First(
152 long companyId,
153 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
154 throws com.liferay.portal.NoSuchUserGroupException,
155 com.liferay.portal.kernel.exception.SystemException {
156 return getPersistence()
157 .findByCompanyId_First(companyId, orderByComparator);
158 }
159
160 public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
161 long companyId,
162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163 throws com.liferay.portal.NoSuchUserGroupException,
164 com.liferay.portal.kernel.exception.SystemException {
165 return getPersistence()
166 .findByCompanyId_Last(companyId, orderByComparator);
167 }
168
169 public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
170 long userGroupId, long companyId,
171 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172 throws com.liferay.portal.NoSuchUserGroupException,
173 com.liferay.portal.kernel.exception.SystemException {
174 return getPersistence()
175 .findByCompanyId_PrevAndNext(userGroupId, companyId,
176 orderByComparator);
177 }
178
179 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
180 long companyId, long parentUserGroupId)
181 throws com.liferay.portal.kernel.exception.SystemException {
182 return getPersistence().findByC_P(companyId, parentUserGroupId);
183 }
184
185 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
186 long companyId, long parentUserGroupId, int start, int end)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 return getPersistence()
189 .findByC_P(companyId, parentUserGroupId, start, end);
190 }
191
192 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
193 long companyId, long parentUserGroupId, int start, int end,
194 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195 throws com.liferay.portal.kernel.exception.SystemException {
196 return getPersistence()
197 .findByC_P(companyId, parentUserGroupId, start, end,
198 orderByComparator);
199 }
200
201 public static com.liferay.portal.model.UserGroup findByC_P_First(
202 long companyId, long parentUserGroupId,
203 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204 throws com.liferay.portal.NoSuchUserGroupException,
205 com.liferay.portal.kernel.exception.SystemException {
206 return getPersistence()
207 .findByC_P_First(companyId, parentUserGroupId,
208 orderByComparator);
209 }
210
211 public static com.liferay.portal.model.UserGroup findByC_P_Last(
212 long companyId, long parentUserGroupId,
213 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214 throws com.liferay.portal.NoSuchUserGroupException,
215 com.liferay.portal.kernel.exception.SystemException {
216 return getPersistence()
217 .findByC_P_Last(companyId, parentUserGroupId,
218 orderByComparator);
219 }
220
221 public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
222 long userGroupId, long companyId, long parentUserGroupId,
223 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
224 throws com.liferay.portal.NoSuchUserGroupException,
225 com.liferay.portal.kernel.exception.SystemException {
226 return getPersistence()
227 .findByC_P_PrevAndNext(userGroupId, companyId,
228 parentUserGroupId, orderByComparator);
229 }
230
231 public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
232 java.lang.String name)
233 throws com.liferay.portal.NoSuchUserGroupException,
234 com.liferay.portal.kernel.exception.SystemException {
235 return getPersistence().findByC_N(companyId, name);
236 }
237
238 public static com.liferay.portal.model.UserGroup fetchByC_N(
239 long companyId, java.lang.String name)
240 throws com.liferay.portal.kernel.exception.SystemException {
241 return getPersistence().fetchByC_N(companyId, name);
242 }
243
244 public static com.liferay.portal.model.UserGroup fetchByC_N(
245 long companyId, java.lang.String name, boolean retrieveFromCache)
246 throws com.liferay.portal.kernel.exception.SystemException {
247 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
248 }
249
250 public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getPersistence().findAll();
253 }
254
255 public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
256 int start, int end)
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return getPersistence().findAll(start, end);
259 }
260
261 public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
262 int start, int end,
263 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getPersistence().findAll(start, end, orderByComparator);
266 }
267
268 public static void removeByCompanyId(long companyId)
269 throws com.liferay.portal.kernel.exception.SystemException {
270 getPersistence().removeByCompanyId(companyId);
271 }
272
273 public static void removeByC_P(long companyId, long parentUserGroupId)
274 throws com.liferay.portal.kernel.exception.SystemException {
275 getPersistence().removeByC_P(companyId, parentUserGroupId);
276 }
277
278 public static void removeByC_N(long companyId, java.lang.String name)
279 throws com.liferay.portal.NoSuchUserGroupException,
280 com.liferay.portal.kernel.exception.SystemException {
281 getPersistence().removeByC_N(companyId, name);
282 }
283
284 public static void removeAll()
285 throws com.liferay.portal.kernel.exception.SystemException {
286 getPersistence().removeAll();
287 }
288
289 public static int countByCompanyId(long companyId)
290 throws com.liferay.portal.kernel.exception.SystemException {
291 return getPersistence().countByCompanyId(companyId);
292 }
293
294 public static int countByC_P(long companyId, long parentUserGroupId)
295 throws com.liferay.portal.kernel.exception.SystemException {
296 return getPersistence().countByC_P(companyId, parentUserGroupId);
297 }
298
299 public static int countByC_N(long companyId, java.lang.String name)
300 throws com.liferay.portal.kernel.exception.SystemException {
301 return getPersistence().countByC_N(companyId, name);
302 }
303
304 public static int countAll()
305 throws com.liferay.portal.kernel.exception.SystemException {
306 return getPersistence().countAll();
307 }
308
309 public static java.util.List<com.liferay.portal.model.Group> getGroups(
310 long pk) throws com.liferay.portal.kernel.exception.SystemException {
311 return getPersistence().getGroups(pk);
312 }
313
314 public static java.util.List<com.liferay.portal.model.Group> getGroups(
315 long pk, int start, int end)
316 throws com.liferay.portal.kernel.exception.SystemException {
317 return getPersistence().getGroups(pk, start, end);
318 }
319
320 public static java.util.List<com.liferay.portal.model.Group> getGroups(
321 long pk, int start, int end,
322 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323 throws com.liferay.portal.kernel.exception.SystemException {
324 return getPersistence().getGroups(pk, start, end, orderByComparator);
325 }
326
327 public static int getGroupsSize(long pk)
328 throws com.liferay.portal.kernel.exception.SystemException {
329 return getPersistence().getGroupsSize(pk);
330 }
331
332 public static boolean containsGroup(long pk, long groupPK)
333 throws com.liferay.portal.kernel.exception.SystemException {
334 return getPersistence().containsGroup(pk, groupPK);
335 }
336
337 public static boolean containsGroups(long pk)
338 throws com.liferay.portal.kernel.exception.SystemException {
339 return getPersistence().containsGroups(pk);
340 }
341
342 public static void addGroup(long pk, long groupPK)
343 throws com.liferay.portal.kernel.exception.SystemException {
344 getPersistence().addGroup(pk, groupPK);
345 }
346
347 public static void addGroup(long pk, com.liferay.portal.model.Group group)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 getPersistence().addGroup(pk, group);
350 }
351
352 public static void addGroups(long pk, long[] groupPKs)
353 throws com.liferay.portal.kernel.exception.SystemException {
354 getPersistence().addGroups(pk, groupPKs);
355 }
356
357 public static void addGroups(long pk,
358 java.util.List<com.liferay.portal.model.Group> groups)
359 throws com.liferay.portal.kernel.exception.SystemException {
360 getPersistence().addGroups(pk, groups);
361 }
362
363 public static void clearGroups(long pk)
364 throws com.liferay.portal.kernel.exception.SystemException {
365 getPersistence().clearGroups(pk);
366 }
367
368 public static void removeGroup(long pk, long groupPK)
369 throws com.liferay.portal.kernel.exception.SystemException {
370 getPersistence().removeGroup(pk, groupPK);
371 }
372
373 public static void removeGroup(long pk, com.liferay.portal.model.Group group)
374 throws com.liferay.portal.kernel.exception.SystemException {
375 getPersistence().removeGroup(pk, group);
376 }
377
378 public static void removeGroups(long pk, long[] groupPKs)
379 throws com.liferay.portal.kernel.exception.SystemException {
380 getPersistence().removeGroups(pk, groupPKs);
381 }
382
383 public static void removeGroups(long pk,
384 java.util.List<com.liferay.portal.model.Group> groups)
385 throws com.liferay.portal.kernel.exception.SystemException {
386 getPersistence().removeGroups(pk, groups);
387 }
388
389 public static void setGroups(long pk, long[] groupPKs)
390 throws com.liferay.portal.kernel.exception.SystemException {
391 getPersistence().setGroups(pk, groupPKs);
392 }
393
394 public static void setGroups(long pk,
395 java.util.List<com.liferay.portal.model.Group> groups)
396 throws com.liferay.portal.kernel.exception.SystemException {
397 getPersistence().setGroups(pk, groups);
398 }
399
400 public static java.util.List<com.liferay.portal.model.User> getUsers(
401 long pk) throws com.liferay.portal.kernel.exception.SystemException {
402 return getPersistence().getUsers(pk);
403 }
404
405 public static java.util.List<com.liferay.portal.model.User> getUsers(
406 long pk, int start, int end)
407 throws com.liferay.portal.kernel.exception.SystemException {
408 return getPersistence().getUsers(pk, start, end);
409 }
410
411 public static java.util.List<com.liferay.portal.model.User> getUsers(
412 long pk, int start, int end,
413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414 throws com.liferay.portal.kernel.exception.SystemException {
415 return getPersistence().getUsers(pk, start, end, orderByComparator);
416 }
417
418 public static int getUsersSize(long pk)
419 throws com.liferay.portal.kernel.exception.SystemException {
420 return getPersistence().getUsersSize(pk);
421 }
422
423 public static boolean containsUser(long pk, long userPK)
424 throws com.liferay.portal.kernel.exception.SystemException {
425 return getPersistence().containsUser(pk, userPK);
426 }
427
428 public static boolean containsUsers(long pk)
429 throws com.liferay.portal.kernel.exception.SystemException {
430 return getPersistence().containsUsers(pk);
431 }
432
433 public static void addUser(long pk, long userPK)
434 throws com.liferay.portal.kernel.exception.SystemException {
435 getPersistence().addUser(pk, userPK);
436 }
437
438 public static void addUser(long pk, com.liferay.portal.model.User user)
439 throws com.liferay.portal.kernel.exception.SystemException {
440 getPersistence().addUser(pk, user);
441 }
442
443 public static void addUsers(long pk, long[] userPKs)
444 throws com.liferay.portal.kernel.exception.SystemException {
445 getPersistence().addUsers(pk, userPKs);
446 }
447
448 public static void addUsers(long pk,
449 java.util.List<com.liferay.portal.model.User> users)
450 throws com.liferay.portal.kernel.exception.SystemException {
451 getPersistence().addUsers(pk, users);
452 }
453
454 public static void clearUsers(long pk)
455 throws com.liferay.portal.kernel.exception.SystemException {
456 getPersistence().clearUsers(pk);
457 }
458
459 public static void removeUser(long pk, long userPK)
460 throws com.liferay.portal.kernel.exception.SystemException {
461 getPersistence().removeUser(pk, userPK);
462 }
463
464 public static void removeUser(long pk, com.liferay.portal.model.User user)
465 throws com.liferay.portal.kernel.exception.SystemException {
466 getPersistence().removeUser(pk, user);
467 }
468
469 public static void removeUsers(long pk, long[] userPKs)
470 throws com.liferay.portal.kernel.exception.SystemException {
471 getPersistence().removeUsers(pk, userPKs);
472 }
473
474 public static void removeUsers(long pk,
475 java.util.List<com.liferay.portal.model.User> users)
476 throws com.liferay.portal.kernel.exception.SystemException {
477 getPersistence().removeUsers(pk, users);
478 }
479
480 public static void setUsers(long pk, long[] userPKs)
481 throws com.liferay.portal.kernel.exception.SystemException {
482 getPersistence().setUsers(pk, userPKs);
483 }
484
485 public static void setUsers(long pk,
486 java.util.List<com.liferay.portal.model.User> users)
487 throws com.liferay.portal.kernel.exception.SystemException {
488 getPersistence().setUsers(pk, users);
489 }
490
491 public static UserGroupPersistence getPersistence() {
492 if (_persistence == null) {
493 _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
494 }
495
496 return _persistence;
497 }
498
499 public void setPersistence(UserGroupPersistence persistence) {
500 _persistence = persistence;
501 }
502
503 private static UserGroupPersistence _persistence;
504 }