1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
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  /**
25   * <a href="UserGroupUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       UserGroupPersistence
34   * @see       UserGroupPersistenceImpl
35   * @generated
36   */
37  public class UserGroupUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
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      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static UserGroup remove(UserGroup userGroup)
65          throws SystemException {
66          return getPersistence().remove(userGroup);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
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 obc)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().findByCompanyId(companyId, start, end, obc);
132     }
133 
134     public static com.liferay.portal.model.UserGroup findByCompanyId_First(
135         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.NoSuchUserGroupException,
137             com.liferay.portal.kernel.exception.SystemException {
138         return getPersistence().findByCompanyId_First(companyId, obc);
139     }
140 
141     public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
142         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.NoSuchUserGroupException,
144             com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByCompanyId_Last(companyId, obc);
146     }
147 
148     public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
149         long userGroupId, long companyId,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.NoSuchUserGroupException,
152             com.liferay.portal.kernel.exception.SystemException {
153         return getPersistence()
154                    .findByCompanyId_PrevAndNext(userGroupId, companyId, obc);
155     }
156 
157     public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
158         long companyId, long parentUserGroupId)
159         throws com.liferay.portal.kernel.exception.SystemException {
160         return getPersistence().findByC_P(companyId, parentUserGroupId);
161     }
162 
163     public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
164         long companyId, long parentUserGroupId, int start, int end)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence()
167                    .findByC_P(companyId, parentUserGroupId, start, end);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
171         long companyId, long parentUserGroupId, int start, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence()
175                    .findByC_P(companyId, parentUserGroupId, start, end, obc);
176     }
177 
178     public static com.liferay.portal.model.UserGroup findByC_P_First(
179         long companyId, long parentUserGroupId,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.NoSuchUserGroupException,
182             com.liferay.portal.kernel.exception.SystemException {
183         return getPersistence()
184                    .findByC_P_First(companyId, parentUserGroupId, obc);
185     }
186 
187     public static com.liferay.portal.model.UserGroup findByC_P_Last(
188         long companyId, long parentUserGroupId,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.NoSuchUserGroupException,
191             com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findByC_P_Last(companyId, parentUserGroupId, obc);
193     }
194 
195     public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
196         long userGroupId, long companyId, long parentUserGroupId,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.NoSuchUserGroupException,
199             com.liferay.portal.kernel.exception.SystemException {
200         return getPersistence()
201                    .findByC_P_PrevAndNext(userGroupId, companyId,
202             parentUserGroupId, obc);
203     }
204 
205     public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
206         java.lang.String name)
207         throws com.liferay.portal.NoSuchUserGroupException,
208             com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().findByC_N(companyId, name);
210     }
211 
212     public static com.liferay.portal.model.UserGroup fetchByC_N(
213         long companyId, java.lang.String name)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence().fetchByC_N(companyId, name);
216     }
217 
218     public static com.liferay.portal.model.UserGroup fetchByC_N(
219         long companyId, java.lang.String name, boolean retrieveFromCache)
220         throws com.liferay.portal.kernel.exception.SystemException {
221         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
222     }
223 
224     public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
225         throws com.liferay.portal.kernel.exception.SystemException {
226         return getPersistence().findAll();
227     }
228 
229     public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
230         int start, int end)
231         throws com.liferay.portal.kernel.exception.SystemException {
232         return getPersistence().findAll(start, end);
233     }
234 
235     public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
236         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.kernel.exception.SystemException {
238         return getPersistence().findAll(start, end, obc);
239     }
240 
241     public static void removeByCompanyId(long companyId)
242         throws com.liferay.portal.kernel.exception.SystemException {
243         getPersistence().removeByCompanyId(companyId);
244     }
245 
246     public static void removeByC_P(long companyId, long parentUserGroupId)
247         throws com.liferay.portal.kernel.exception.SystemException {
248         getPersistence().removeByC_P(companyId, parentUserGroupId);
249     }
250 
251     public static void removeByC_N(long companyId, java.lang.String name)
252         throws com.liferay.portal.NoSuchUserGroupException,
253             com.liferay.portal.kernel.exception.SystemException {
254         getPersistence().removeByC_N(companyId, name);
255     }
256 
257     public static void removeAll()
258         throws com.liferay.portal.kernel.exception.SystemException {
259         getPersistence().removeAll();
260     }
261 
262     public static int countByCompanyId(long companyId)
263         throws com.liferay.portal.kernel.exception.SystemException {
264         return getPersistence().countByCompanyId(companyId);
265     }
266 
267     public static int countByC_P(long companyId, long parentUserGroupId)
268         throws com.liferay.portal.kernel.exception.SystemException {
269         return getPersistence().countByC_P(companyId, parentUserGroupId);
270     }
271 
272     public static int countByC_N(long companyId, java.lang.String name)
273         throws com.liferay.portal.kernel.exception.SystemException {
274         return getPersistence().countByC_N(companyId, name);
275     }
276 
277     public static int countAll()
278         throws com.liferay.portal.kernel.exception.SystemException {
279         return getPersistence().countAll();
280     }
281 
282     public static java.util.List<com.liferay.portal.model.User> getUsers(
283         long pk) throws com.liferay.portal.kernel.exception.SystemException {
284         return getPersistence().getUsers(pk);
285     }
286 
287     public static java.util.List<com.liferay.portal.model.User> getUsers(
288         long pk, int start, int end)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence().getUsers(pk, start, end);
291     }
292 
293     public static java.util.List<com.liferay.portal.model.User> getUsers(
294         long pk, int start, int end,
295         com.liferay.portal.kernel.util.OrderByComparator obc)
296         throws com.liferay.portal.kernel.exception.SystemException {
297         return getPersistence().getUsers(pk, start, end, obc);
298     }
299 
300     public static int getUsersSize(long pk)
301         throws com.liferay.portal.kernel.exception.SystemException {
302         return getPersistence().getUsersSize(pk);
303     }
304 
305     public static boolean containsUser(long pk, long userPK)
306         throws com.liferay.portal.kernel.exception.SystemException {
307         return getPersistence().containsUser(pk, userPK);
308     }
309 
310     public static boolean containsUsers(long pk)
311         throws com.liferay.portal.kernel.exception.SystemException {
312         return getPersistence().containsUsers(pk);
313     }
314 
315     public static void addUser(long pk, long userPK)
316         throws com.liferay.portal.kernel.exception.SystemException {
317         getPersistence().addUser(pk, userPK);
318     }
319 
320     public static void addUser(long pk, com.liferay.portal.model.User user)
321         throws com.liferay.portal.kernel.exception.SystemException {
322         getPersistence().addUser(pk, user);
323     }
324 
325     public static void addUsers(long pk, long[] userPKs)
326         throws com.liferay.portal.kernel.exception.SystemException {
327         getPersistence().addUsers(pk, userPKs);
328     }
329 
330     public static void addUsers(long pk,
331         java.util.List<com.liferay.portal.model.User> users)
332         throws com.liferay.portal.kernel.exception.SystemException {
333         getPersistence().addUsers(pk, users);
334     }
335 
336     public static void clearUsers(long pk)
337         throws com.liferay.portal.kernel.exception.SystemException {
338         getPersistence().clearUsers(pk);
339     }
340 
341     public static void removeUser(long pk, long userPK)
342         throws com.liferay.portal.kernel.exception.SystemException {
343         getPersistence().removeUser(pk, userPK);
344     }
345 
346     public static void removeUser(long pk, com.liferay.portal.model.User user)
347         throws com.liferay.portal.kernel.exception.SystemException {
348         getPersistence().removeUser(pk, user);
349     }
350 
351     public static void removeUsers(long pk, long[] userPKs)
352         throws com.liferay.portal.kernel.exception.SystemException {
353         getPersistence().removeUsers(pk, userPKs);
354     }
355 
356     public static void removeUsers(long pk,
357         java.util.List<com.liferay.portal.model.User> users)
358         throws com.liferay.portal.kernel.exception.SystemException {
359         getPersistence().removeUsers(pk, users);
360     }
361 
362     public static void setUsers(long pk, long[] userPKs)
363         throws com.liferay.portal.kernel.exception.SystemException {
364         getPersistence().setUsers(pk, userPKs);
365     }
366 
367     public static void setUsers(long pk,
368         java.util.List<com.liferay.portal.model.User> users)
369         throws com.liferay.portal.kernel.exception.SystemException {
370         getPersistence().setUsers(pk, users);
371     }
372 
373     public static UserGroupPersistence getPersistence() {
374         if (_persistence == null) {
375             _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
376         }
377 
378         return _persistence;
379     }
380 
381     public void setPersistence(UserGroupPersistence persistence) {
382         _persistence = persistence;
383     }
384 
385     private static UserGroupPersistence _persistence;
386 }