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