001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.UserGroup;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       UserGroupPersistence
029     * @see       UserGroupPersistenceImpl
030     * @generated
031     */
032    public class UserGroupUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(UserGroup userGroup) {
044                    getPersistence().clearCache(userGroup);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<UserGroup> findWithDynamicQuery(
059                    DynamicQuery dynamicQuery) throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<UserGroup> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<UserGroup> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static UserGroup remove(UserGroup userGroup)
087                    throws SystemException {
088                    return getPersistence().remove(userGroup);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static UserGroup update(UserGroup userGroup, boolean merge)
095                    throws SystemException {
096                    return getPersistence().update(userGroup, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static UserGroup update(UserGroup userGroup, boolean merge,
103                    ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(userGroup, merge, serviceContext);
105            }
106    
107            public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) {
108                    getPersistence().cacheResult(userGroup);
109            }
110    
111            public static void cacheResult(
112                    java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
113                    getPersistence().cacheResult(userGroups);
114            }
115    
116            public static com.liferay.portal.model.UserGroup create(long userGroupId) {
117                    return getPersistence().create(userGroupId);
118            }
119    
120            public static com.liferay.portal.model.UserGroup remove(long userGroupId)
121                    throws com.liferay.portal.NoSuchUserGroupException,
122                            com.liferay.portal.kernel.exception.SystemException {
123                    return getPersistence().remove(userGroupId);
124            }
125    
126            public static com.liferay.portal.model.UserGroup updateImpl(
127                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getPersistence().updateImpl(userGroup, merge);
130            }
131    
132            public static com.liferay.portal.model.UserGroup findByPrimaryKey(
133                    long userGroupId)
134                    throws com.liferay.portal.NoSuchUserGroupException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    return getPersistence().findByPrimaryKey(userGroupId);
137            }
138    
139            public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
140                    long userGroupId)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().fetchByPrimaryKey(userGroupId);
143            }
144    
145            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
146                    long companyId)
147                    throws com.liferay.portal.kernel.exception.SystemException {
148                    return getPersistence().findByCompanyId(companyId);
149            }
150    
151            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
152                    long companyId, int start, int end)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getPersistence().findByCompanyId(companyId, start, end);
155            }
156    
157            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
158                    long companyId, int start, int end,
159                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence()
162                                       .findByCompanyId(companyId, start, end, orderByComparator);
163            }
164    
165            public static com.liferay.portal.model.UserGroup findByCompanyId_First(
166                    long companyId,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.NoSuchUserGroupException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence()
171                                       .findByCompanyId_First(companyId, orderByComparator);
172            }
173    
174            public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
175                    long companyId,
176                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177                    throws com.liferay.portal.NoSuchUserGroupException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getPersistence()
180                                       .findByCompanyId_Last(companyId, orderByComparator);
181            }
182    
183            public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
184                    long userGroupId, long companyId,
185                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
186                    throws com.liferay.portal.NoSuchUserGroupException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return getPersistence()
189                                       .findByCompanyId_PrevAndNext(userGroupId, companyId,
190                            orderByComparator);
191            }
192    
193            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
194                    long companyId, long parentUserGroupId)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence().findByC_P(companyId, parentUserGroupId);
197            }
198    
199            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
200                    long companyId, long parentUserGroupId, int start, int end)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence()
203                                       .findByC_P(companyId, parentUserGroupId, start, end);
204            }
205    
206            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
207                    long companyId, long parentUserGroupId, int start, int end,
208                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getPersistence()
211                                       .findByC_P(companyId, parentUserGroupId, start, end,
212                            orderByComparator);
213            }
214    
215            public static com.liferay.portal.model.UserGroup findByC_P_First(
216                    long companyId, long parentUserGroupId,
217                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218                    throws com.liferay.portal.NoSuchUserGroupException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    return getPersistence()
221                                       .findByC_P_First(companyId, parentUserGroupId,
222                            orderByComparator);
223            }
224    
225            public static com.liferay.portal.model.UserGroup findByC_P_Last(
226                    long companyId, long parentUserGroupId,
227                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228                    throws com.liferay.portal.NoSuchUserGroupException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence()
231                                       .findByC_P_Last(companyId, parentUserGroupId,
232                            orderByComparator);
233            }
234    
235            public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
236                    long userGroupId, long companyId, long parentUserGroupId,
237                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238                    throws com.liferay.portal.NoSuchUserGroupException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    return getPersistence()
241                                       .findByC_P_PrevAndNext(userGroupId, companyId,
242                            parentUserGroupId, orderByComparator);
243            }
244    
245            public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
246                    java.lang.String name)
247                    throws com.liferay.portal.NoSuchUserGroupException,
248                            com.liferay.portal.kernel.exception.SystemException {
249                    return getPersistence().findByC_N(companyId, name);
250            }
251    
252            public static com.liferay.portal.model.UserGroup fetchByC_N(
253                    long companyId, java.lang.String name)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getPersistence().fetchByC_N(companyId, name);
256            }
257    
258            public static com.liferay.portal.model.UserGroup fetchByC_N(
259                    long companyId, java.lang.String name, boolean retrieveFromCache)
260                    throws com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
262            }
263    
264            public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
265                    throws com.liferay.portal.kernel.exception.SystemException {
266                    return getPersistence().findAll();
267            }
268    
269            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
270                    int start, int end)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence().findAll(start, end);
273            }
274    
275            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
276                    int start, int end,
277                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return getPersistence().findAll(start, end, orderByComparator);
280            }
281    
282            public static void removeByCompanyId(long companyId)
283                    throws com.liferay.portal.kernel.exception.SystemException {
284                    getPersistence().removeByCompanyId(companyId);
285            }
286    
287            public static void removeByC_P(long companyId, long parentUserGroupId)
288                    throws com.liferay.portal.kernel.exception.SystemException {
289                    getPersistence().removeByC_P(companyId, parentUserGroupId);
290            }
291    
292            public static void removeByC_N(long companyId, java.lang.String name)
293                    throws com.liferay.portal.NoSuchUserGroupException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    getPersistence().removeByC_N(companyId, name);
296            }
297    
298            public static void removeAll()
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    getPersistence().removeAll();
301            }
302    
303            public static int countByCompanyId(long companyId)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    return getPersistence().countByCompanyId(companyId);
306            }
307    
308            public static int countByC_P(long companyId, long parentUserGroupId)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().countByC_P(companyId, parentUserGroupId);
311            }
312    
313            public static int countByC_N(long companyId, java.lang.String name)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return getPersistence().countByC_N(companyId, name);
316            }
317    
318            public static int countAll()
319                    throws com.liferay.portal.kernel.exception.SystemException {
320                    return getPersistence().countAll();
321            }
322    
323            public static java.util.List<com.liferay.portal.model.Group> getGroups(
324                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
325                    return getPersistence().getGroups(pk);
326            }
327    
328            public static java.util.List<com.liferay.portal.model.Group> getGroups(
329                    long pk, int start, int end)
330                    throws com.liferay.portal.kernel.exception.SystemException {
331                    return getPersistence().getGroups(pk, start, end);
332            }
333    
334            public static java.util.List<com.liferay.portal.model.Group> getGroups(
335                    long pk, int start, int end,
336                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    return getPersistence().getGroups(pk, start, end, orderByComparator);
339            }
340    
341            public static int getGroupsSize(long pk)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().getGroupsSize(pk);
344            }
345    
346            public static boolean containsGroup(long pk, long groupPK)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    return getPersistence().containsGroup(pk, groupPK);
349            }
350    
351            public static boolean containsGroups(long pk)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getPersistence().containsGroups(pk);
354            }
355    
356            public static void addGroup(long pk, long groupPK)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    getPersistence().addGroup(pk, groupPK);
359            }
360    
361            public static void addGroup(long pk, com.liferay.portal.model.Group group)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    getPersistence().addGroup(pk, group);
364            }
365    
366            public static void addGroups(long pk, long[] groupPKs)
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    getPersistence().addGroups(pk, groupPKs);
369            }
370    
371            public static void addGroups(long pk,
372                    java.util.List<com.liferay.portal.model.Group> groups)
373                    throws com.liferay.portal.kernel.exception.SystemException {
374                    getPersistence().addGroups(pk, groups);
375            }
376    
377            public static void clearGroups(long pk)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    getPersistence().clearGroups(pk);
380            }
381    
382            public static void removeGroup(long pk, long groupPK)
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    getPersistence().removeGroup(pk, groupPK);
385            }
386    
387            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    getPersistence().removeGroup(pk, group);
390            }
391    
392            public static void removeGroups(long pk, long[] groupPKs)
393                    throws com.liferay.portal.kernel.exception.SystemException {
394                    getPersistence().removeGroups(pk, groupPKs);
395            }
396    
397            public static void removeGroups(long pk,
398                    java.util.List<com.liferay.portal.model.Group> groups)
399                    throws com.liferay.portal.kernel.exception.SystemException {
400                    getPersistence().removeGroups(pk, groups);
401            }
402    
403            public static void setGroups(long pk, long[] groupPKs)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    getPersistence().setGroups(pk, groupPKs);
406            }
407    
408            public static void setGroups(long pk,
409                    java.util.List<com.liferay.portal.model.Group> groups)
410                    throws com.liferay.portal.kernel.exception.SystemException {
411                    getPersistence().setGroups(pk, groups);
412            }
413    
414            public static java.util.List<com.liferay.portal.model.User> getUsers(
415                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence().getUsers(pk);
417            }
418    
419            public static java.util.List<com.liferay.portal.model.User> getUsers(
420                    long pk, int start, int end)
421                    throws com.liferay.portal.kernel.exception.SystemException {
422                    return getPersistence().getUsers(pk, start, end);
423            }
424    
425            public static java.util.List<com.liferay.portal.model.User> getUsers(
426                    long pk, int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    return getPersistence().getUsers(pk, start, end, orderByComparator);
430            }
431    
432            public static int getUsersSize(long pk)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    return getPersistence().getUsersSize(pk);
435            }
436    
437            public static boolean containsUser(long pk, long userPK)
438                    throws com.liferay.portal.kernel.exception.SystemException {
439                    return getPersistence().containsUser(pk, userPK);
440            }
441    
442            public static boolean containsUsers(long pk)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return getPersistence().containsUsers(pk);
445            }
446    
447            public static void addUser(long pk, long userPK)
448                    throws com.liferay.portal.kernel.exception.SystemException {
449                    getPersistence().addUser(pk, userPK);
450            }
451    
452            public static void addUser(long pk, com.liferay.portal.model.User user)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    getPersistence().addUser(pk, user);
455            }
456    
457            public static void addUsers(long pk, long[] userPKs)
458                    throws com.liferay.portal.kernel.exception.SystemException {
459                    getPersistence().addUsers(pk, userPKs);
460            }
461    
462            public static void addUsers(long pk,
463                    java.util.List<com.liferay.portal.model.User> users)
464                    throws com.liferay.portal.kernel.exception.SystemException {
465                    getPersistence().addUsers(pk, users);
466            }
467    
468            public static void clearUsers(long pk)
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    getPersistence().clearUsers(pk);
471            }
472    
473            public static void removeUser(long pk, long userPK)
474                    throws com.liferay.portal.kernel.exception.SystemException {
475                    getPersistence().removeUser(pk, userPK);
476            }
477    
478            public static void removeUser(long pk, com.liferay.portal.model.User user)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    getPersistence().removeUser(pk, user);
481            }
482    
483            public static void removeUsers(long pk, long[] userPKs)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    getPersistence().removeUsers(pk, userPKs);
486            }
487    
488            public static void removeUsers(long pk,
489                    java.util.List<com.liferay.portal.model.User> users)
490                    throws com.liferay.portal.kernel.exception.SystemException {
491                    getPersistence().removeUsers(pk, users);
492            }
493    
494            public static void setUsers(long pk, long[] userPKs)
495                    throws com.liferay.portal.kernel.exception.SystemException {
496                    getPersistence().setUsers(pk, userPKs);
497            }
498    
499            public static void setUsers(long pk,
500                    java.util.List<com.liferay.portal.model.User> users)
501                    throws com.liferay.portal.kernel.exception.SystemException {
502                    getPersistence().setUsers(pk, users);
503            }
504    
505            public static UserGroupPersistence getPersistence() {
506                    if (_persistence == null) {
507                            _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
508                    }
509    
510                    return _persistence;
511            }
512    
513            public void setPersistence(UserGroupPersistence persistence) {
514                    _persistence = persistence;
515            }
516    
517            private static UserGroupPersistence _persistence;
518    }