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 List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49 throws SystemException {
50 return getPersistence().findWithDynamicQuery(dynamicQuery);
51 }
52
53
56 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57 int start, int end) throws SystemException {
58 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59 }
60
61
64 public static UserGroup remove(UserGroup userGroup)
65 throws SystemException {
66 return getPersistence().remove(userGroup);
67 }
68
69
72 public static UserGroup update(UserGroup userGroup, boolean merge)
73 throws SystemException {
74 return getPersistence().update(userGroup, merge);
75 }
76
77 public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) {
78 getPersistence().cacheResult(userGroup);
79 }
80
81 public static void cacheResult(
82 java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
83 getPersistence().cacheResult(userGroups);
84 }
85
86 public static com.liferay.portal.model.UserGroup create(long userGroupId) {
87 return getPersistence().create(userGroupId);
88 }
89
90 public static com.liferay.portal.model.UserGroup remove(long userGroupId)
91 throws com.liferay.portal.NoSuchUserGroupException,
92 com.liferay.portal.kernel.exception.SystemException {
93 return getPersistence().remove(userGroupId);
94 }
95
96 public static com.liferay.portal.model.UserGroup updateImpl(
97 com.liferay.portal.model.UserGroup userGroup, boolean merge)
98 throws com.liferay.portal.kernel.exception.SystemException {
99 return getPersistence().updateImpl(userGroup, merge);
100 }
101
102 public static com.liferay.portal.model.UserGroup findByPrimaryKey(
103 long userGroupId)
104 throws com.liferay.portal.NoSuchUserGroupException,
105 com.liferay.portal.kernel.exception.SystemException {
106 return getPersistence().findByPrimaryKey(userGroupId);
107 }
108
109 public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
110 long userGroupId)
111 throws com.liferay.portal.kernel.exception.SystemException {
112 return getPersistence().fetchByPrimaryKey(userGroupId);
113 }
114
115 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
116 long companyId)
117 throws com.liferay.portal.kernel.exception.SystemException {
118 return getPersistence().findByCompanyId(companyId);
119 }
120
121 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
122 long companyId, int start, int end)
123 throws com.liferay.portal.kernel.exception.SystemException {
124 return getPersistence().findByCompanyId(companyId, start, end);
125 }
126
127 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
128 long companyId, int start, int end,
129 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 return getPersistence()
132 .findByCompanyId(companyId, start, end, orderByComparator);
133 }
134
135 public static com.liferay.portal.model.UserGroup findByCompanyId_First(
136 long companyId,
137 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
138 throws com.liferay.portal.NoSuchUserGroupException,
139 com.liferay.portal.kernel.exception.SystemException {
140 return getPersistence()
141 .findByCompanyId_First(companyId, orderByComparator);
142 }
143
144 public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
145 long companyId,
146 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147 throws com.liferay.portal.NoSuchUserGroupException,
148 com.liferay.portal.kernel.exception.SystemException {
149 return getPersistence()
150 .findByCompanyId_Last(companyId, orderByComparator);
151 }
152
153 public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
154 long userGroupId, long companyId,
155 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156 throws com.liferay.portal.NoSuchUserGroupException,
157 com.liferay.portal.kernel.exception.SystemException {
158 return getPersistence()
159 .findByCompanyId_PrevAndNext(userGroupId, companyId,
160 orderByComparator);
161 }
162
163 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
164 long companyId, long parentUserGroupId)
165 throws com.liferay.portal.kernel.exception.SystemException {
166 return getPersistence().findByC_P(companyId, parentUserGroupId);
167 }
168
169 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
170 long companyId, long parentUserGroupId, int start, int end)
171 throws com.liferay.portal.kernel.exception.SystemException {
172 return getPersistence()
173 .findByC_P(companyId, parentUserGroupId, start, end);
174 }
175
176 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
177 long companyId, long parentUserGroupId, int start, int end,
178 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179 throws com.liferay.portal.kernel.exception.SystemException {
180 return getPersistence()
181 .findByC_P(companyId, parentUserGroupId, start, end,
182 orderByComparator);
183 }
184
185 public static com.liferay.portal.model.UserGroup findByC_P_First(
186 long companyId, long parentUserGroupId,
187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188 throws com.liferay.portal.NoSuchUserGroupException,
189 com.liferay.portal.kernel.exception.SystemException {
190 return getPersistence()
191 .findByC_P_First(companyId, parentUserGroupId,
192 orderByComparator);
193 }
194
195 public static com.liferay.portal.model.UserGroup findByC_P_Last(
196 long companyId, long parentUserGroupId,
197 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198 throws com.liferay.portal.NoSuchUserGroupException,
199 com.liferay.portal.kernel.exception.SystemException {
200 return getPersistence()
201 .findByC_P_Last(companyId, parentUserGroupId,
202 orderByComparator);
203 }
204
205 public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
206 long userGroupId, long companyId, long parentUserGroupId,
207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208 throws com.liferay.portal.NoSuchUserGroupException,
209 com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence()
211 .findByC_P_PrevAndNext(userGroupId, companyId,
212 parentUserGroupId, orderByComparator);
213 }
214
215 public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
216 java.lang.String name)
217 throws com.liferay.portal.NoSuchUserGroupException,
218 com.liferay.portal.kernel.exception.SystemException {
219 return getPersistence().findByC_N(companyId, name);
220 }
221
222 public static com.liferay.portal.model.UserGroup fetchByC_N(
223 long companyId, java.lang.String name)
224 throws com.liferay.portal.kernel.exception.SystemException {
225 return getPersistence().fetchByC_N(companyId, name);
226 }
227
228 public static com.liferay.portal.model.UserGroup fetchByC_N(
229 long companyId, java.lang.String name, boolean retrieveFromCache)
230 throws com.liferay.portal.kernel.exception.SystemException {
231 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
232 }
233
234 public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
235 throws com.liferay.portal.kernel.exception.SystemException {
236 return getPersistence().findAll();
237 }
238
239 public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
240 int start, int end)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getPersistence().findAll(start, end);
243 }
244
245 public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
246 int start, int end,
247 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248 throws com.liferay.portal.kernel.exception.SystemException {
249 return getPersistence().findAll(start, end, orderByComparator);
250 }
251
252 public static void removeByCompanyId(long companyId)
253 throws com.liferay.portal.kernel.exception.SystemException {
254 getPersistence().removeByCompanyId(companyId);
255 }
256
257 public static void removeByC_P(long companyId, long parentUserGroupId)
258 throws com.liferay.portal.kernel.exception.SystemException {
259 getPersistence().removeByC_P(companyId, parentUserGroupId);
260 }
261
262 public static void removeByC_N(long companyId, java.lang.String name)
263 throws com.liferay.portal.NoSuchUserGroupException,
264 com.liferay.portal.kernel.exception.SystemException {
265 getPersistence().removeByC_N(companyId, name);
266 }
267
268 public static void removeAll()
269 throws com.liferay.portal.kernel.exception.SystemException {
270 getPersistence().removeAll();
271 }
272
273 public static int countByCompanyId(long companyId)
274 throws com.liferay.portal.kernel.exception.SystemException {
275 return getPersistence().countByCompanyId(companyId);
276 }
277
278 public static int countByC_P(long companyId, long parentUserGroupId)
279 throws com.liferay.portal.kernel.exception.SystemException {
280 return getPersistence().countByC_P(companyId, parentUserGroupId);
281 }
282
283 public static int countByC_N(long companyId, java.lang.String name)
284 throws com.liferay.portal.kernel.exception.SystemException {
285 return getPersistence().countByC_N(companyId, name);
286 }
287
288 public static int countAll()
289 throws com.liferay.portal.kernel.exception.SystemException {
290 return getPersistence().countAll();
291 }
292
293 public static java.util.List<com.liferay.portal.model.User> getUsers(
294 long pk) throws com.liferay.portal.kernel.exception.SystemException {
295 return getPersistence().getUsers(pk);
296 }
297
298 public static java.util.List<com.liferay.portal.model.User> getUsers(
299 long pk, int start, int end)
300 throws com.liferay.portal.kernel.exception.SystemException {
301 return getPersistence().getUsers(pk, start, end);
302 }
303
304 public static java.util.List<com.liferay.portal.model.User> getUsers(
305 long pk, int start, int end,
306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307 throws com.liferay.portal.kernel.exception.SystemException {
308 return getPersistence().getUsers(pk, start, end, orderByComparator);
309 }
310
311 public static int getUsersSize(long pk)
312 throws com.liferay.portal.kernel.exception.SystemException {
313 return getPersistence().getUsersSize(pk);
314 }
315
316 public static boolean containsUser(long pk, long userPK)
317 throws com.liferay.portal.kernel.exception.SystemException {
318 return getPersistence().containsUser(pk, userPK);
319 }
320
321 public static boolean containsUsers(long pk)
322 throws com.liferay.portal.kernel.exception.SystemException {
323 return getPersistence().containsUsers(pk);
324 }
325
326 public static void addUser(long pk, long userPK)
327 throws com.liferay.portal.kernel.exception.SystemException {
328 getPersistence().addUser(pk, userPK);
329 }
330
331 public static void addUser(long pk, com.liferay.portal.model.User user)
332 throws com.liferay.portal.kernel.exception.SystemException {
333 getPersistence().addUser(pk, user);
334 }
335
336 public static void addUsers(long pk, long[] userPKs)
337 throws com.liferay.portal.kernel.exception.SystemException {
338 getPersistence().addUsers(pk, userPKs);
339 }
340
341 public static void addUsers(long pk,
342 java.util.List<com.liferay.portal.model.User> users)
343 throws com.liferay.portal.kernel.exception.SystemException {
344 getPersistence().addUsers(pk, users);
345 }
346
347 public static void clearUsers(long pk)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 getPersistence().clearUsers(pk);
350 }
351
352 public static void removeUser(long pk, long userPK)
353 throws com.liferay.portal.kernel.exception.SystemException {
354 getPersistence().removeUser(pk, userPK);
355 }
356
357 public static void removeUser(long pk, com.liferay.portal.model.User user)
358 throws com.liferay.portal.kernel.exception.SystemException {
359 getPersistence().removeUser(pk, user);
360 }
361
362 public static void removeUsers(long pk, long[] userPKs)
363 throws com.liferay.portal.kernel.exception.SystemException {
364 getPersistence().removeUsers(pk, userPKs);
365 }
366
367 public static void removeUsers(long pk,
368 java.util.List<com.liferay.portal.model.User> users)
369 throws com.liferay.portal.kernel.exception.SystemException {
370 getPersistence().removeUsers(pk, users);
371 }
372
373 public static void setUsers(long pk, long[] userPKs)
374 throws com.liferay.portal.kernel.exception.SystemException {
375 getPersistence().setUsers(pk, userPKs);
376 }
377
378 public static void setUsers(long pk,
379 java.util.List<com.liferay.portal.model.User> users)
380 throws com.liferay.portal.kernel.exception.SystemException {
381 getPersistence().setUsers(pk, users);
382 }
383
384 public static UserGroupPersistence getPersistence() {
385 if (_persistence == null) {
386 _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
387 }
388
389 return _persistence;
390 }
391
392 public void setPersistence(UserGroupPersistence persistence) {
393 _persistence = persistence;
394 }
395
396 private static UserGroupPersistence _persistence;
397 }