001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="UserGroupUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class UserGroupUtil {
030: public static com.liferay.portal.model.UserGroup create(
031: long userGroupId) {
032: return getPersistence().create(userGroupId);
033: }
034:
035: public static com.liferay.portal.model.UserGroup remove(
036: long userGroupId)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portal.NoSuchUserGroupException {
039: return getPersistence().remove(userGroupId);
040: }
041:
042: public static com.liferay.portal.model.UserGroup remove(
043: com.liferay.portal.model.UserGroup userGroup)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(userGroup);
046: }
047:
048: public static com.liferay.portal.model.UserGroup update(
049: com.liferay.portal.model.UserGroup userGroup)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(userGroup);
052: }
053:
054: public static com.liferay.portal.model.UserGroup update(
055: com.liferay.portal.model.UserGroup userGroup, boolean merge)
056: throws com.liferay.portal.SystemException {
057: return getPersistence().update(userGroup, merge);
058: }
059:
060: public static com.liferay.portal.model.UserGroup updateImpl(
061: com.liferay.portal.model.UserGroup userGroup, boolean merge)
062: throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(userGroup, merge);
064: }
065:
066: public static com.liferay.portal.model.UserGroup findByPrimaryKey(
067: long userGroupId)
068: throws com.liferay.portal.SystemException,
069: com.liferay.portal.NoSuchUserGroupException {
070: return getPersistence().findByPrimaryKey(userGroupId);
071: }
072:
073: public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
074: long userGroupId) throws com.liferay.portal.SystemException {
075: return getPersistence().fetchByPrimaryKey(userGroupId);
076: }
077:
078: public static java.util.List findByCompanyId(long companyId)
079: throws com.liferay.portal.SystemException {
080: return getPersistence().findByCompanyId(companyId);
081: }
082:
083: public static java.util.List findByCompanyId(long companyId,
084: int begin, int end)
085: throws com.liferay.portal.SystemException {
086: return getPersistence().findByCompanyId(companyId, begin, end);
087: }
088:
089: public static java.util.List findByCompanyId(long companyId,
090: int begin, int end,
091: com.liferay.portal.kernel.util.OrderByComparator obc)
092: throws com.liferay.portal.SystemException {
093: return getPersistence().findByCompanyId(companyId, begin, end,
094: obc);
095: }
096:
097: public static com.liferay.portal.model.UserGroup findByCompanyId_First(
098: long companyId,
099: com.liferay.portal.kernel.util.OrderByComparator obc)
100: throws com.liferay.portal.SystemException,
101: com.liferay.portal.NoSuchUserGroupException {
102: return getPersistence().findByCompanyId_First(companyId, obc);
103: }
104:
105: public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
106: long companyId,
107: com.liferay.portal.kernel.util.OrderByComparator obc)
108: throws com.liferay.portal.SystemException,
109: com.liferay.portal.NoSuchUserGroupException {
110: return getPersistence().findByCompanyId_Last(companyId, obc);
111: }
112:
113: public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
114: long userGroupId, long companyId,
115: com.liferay.portal.kernel.util.OrderByComparator obc)
116: throws com.liferay.portal.SystemException,
117: com.liferay.portal.NoSuchUserGroupException {
118: return getPersistence().findByCompanyId_PrevAndNext(
119: userGroupId, companyId, obc);
120: }
121:
122: public static java.util.List findByC_P(long companyId,
123: long parentUserGroupId)
124: throws com.liferay.portal.SystemException {
125: return getPersistence().findByC_P(companyId, parentUserGroupId);
126: }
127:
128: public static java.util.List findByC_P(long companyId,
129: long parentUserGroupId, int begin, int end)
130: throws com.liferay.portal.SystemException {
131: return getPersistence().findByC_P(companyId, parentUserGroupId,
132: begin, end);
133: }
134:
135: public static java.util.List findByC_P(long companyId,
136: long parentUserGroupId, int begin, int end,
137: com.liferay.portal.kernel.util.OrderByComparator obc)
138: throws com.liferay.portal.SystemException {
139: return getPersistence().findByC_P(companyId, parentUserGroupId,
140: begin, end, obc);
141: }
142:
143: public static com.liferay.portal.model.UserGroup findByC_P_First(
144: long companyId, long parentUserGroupId,
145: com.liferay.portal.kernel.util.OrderByComparator obc)
146: throws com.liferay.portal.SystemException,
147: com.liferay.portal.NoSuchUserGroupException {
148: return getPersistence().findByC_P_First(companyId,
149: parentUserGroupId, obc);
150: }
151:
152: public static com.liferay.portal.model.UserGroup findByC_P_Last(
153: long companyId, long parentUserGroupId,
154: com.liferay.portal.kernel.util.OrderByComparator obc)
155: throws com.liferay.portal.SystemException,
156: com.liferay.portal.NoSuchUserGroupException {
157: return getPersistence().findByC_P_Last(companyId,
158: parentUserGroupId, obc);
159: }
160:
161: public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
162: long userGroupId, long companyId, long parentUserGroupId,
163: com.liferay.portal.kernel.util.OrderByComparator obc)
164: throws com.liferay.portal.SystemException,
165: com.liferay.portal.NoSuchUserGroupException {
166: return getPersistence().findByC_P_PrevAndNext(userGroupId,
167: companyId, parentUserGroupId, obc);
168: }
169:
170: public static com.liferay.portal.model.UserGroup findByC_N(
171: long companyId, java.lang.String name)
172: throws com.liferay.portal.SystemException,
173: com.liferay.portal.NoSuchUserGroupException {
174: return getPersistence().findByC_N(companyId, name);
175: }
176:
177: public static com.liferay.portal.model.UserGroup fetchByC_N(
178: long companyId, java.lang.String name)
179: throws com.liferay.portal.SystemException {
180: return getPersistence().fetchByC_N(companyId, name);
181: }
182:
183: public static java.util.List findWithDynamicQuery(
184: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
185: throws com.liferay.portal.SystemException {
186: return getPersistence().findWithDynamicQuery(queryInitializer);
187: }
188:
189: public static java.util.List findWithDynamicQuery(
190: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
191: int begin, int end)
192: throws com.liferay.portal.SystemException {
193: return getPersistence().findWithDynamicQuery(queryInitializer,
194: begin, end);
195: }
196:
197: public static java.util.List findAll()
198: throws com.liferay.portal.SystemException {
199: return getPersistence().findAll();
200: }
201:
202: public static java.util.List findAll(int begin, int end)
203: throws com.liferay.portal.SystemException {
204: return getPersistence().findAll(begin, end);
205: }
206:
207: public static java.util.List findAll(int begin, int end,
208: com.liferay.portal.kernel.util.OrderByComparator obc)
209: throws com.liferay.portal.SystemException {
210: return getPersistence().findAll(begin, end, obc);
211: }
212:
213: public static void removeByCompanyId(long companyId)
214: throws com.liferay.portal.SystemException {
215: getPersistence().removeByCompanyId(companyId);
216: }
217:
218: public static void removeByC_P(long companyId,
219: long parentUserGroupId)
220: throws com.liferay.portal.SystemException {
221: getPersistence().removeByC_P(companyId, parentUserGroupId);
222: }
223:
224: public static void removeByC_N(long companyId, java.lang.String name)
225: throws com.liferay.portal.SystemException,
226: com.liferay.portal.NoSuchUserGroupException {
227: getPersistence().removeByC_N(companyId, name);
228: }
229:
230: public static void removeAll()
231: throws com.liferay.portal.SystemException {
232: getPersistence().removeAll();
233: }
234:
235: public static int countByCompanyId(long companyId)
236: throws com.liferay.portal.SystemException {
237: return getPersistence().countByCompanyId(companyId);
238: }
239:
240: public static int countByC_P(long companyId, long parentUserGroupId)
241: throws com.liferay.portal.SystemException {
242: return getPersistence()
243: .countByC_P(companyId, parentUserGroupId);
244: }
245:
246: public static int countByC_N(long companyId, java.lang.String name)
247: throws com.liferay.portal.SystemException {
248: return getPersistence().countByC_N(companyId, name);
249: }
250:
251: public static int countAll()
252: throws com.liferay.portal.SystemException {
253: return getPersistence().countAll();
254: }
255:
256: public static java.util.List getUsers(long pk)
257: throws com.liferay.portal.SystemException,
258: com.liferay.portal.NoSuchUserGroupException {
259: return getPersistence().getUsers(pk);
260: }
261:
262: public static java.util.List getUsers(long pk, int begin, int end)
263: throws com.liferay.portal.SystemException,
264: com.liferay.portal.NoSuchUserGroupException {
265: return getPersistence().getUsers(pk, begin, end);
266: }
267:
268: public static java.util.List getUsers(long pk, int begin, int end,
269: com.liferay.portal.kernel.util.OrderByComparator obc)
270: throws com.liferay.portal.SystemException,
271: com.liferay.portal.NoSuchUserGroupException {
272: return getPersistence().getUsers(pk, begin, end, obc);
273: }
274:
275: public static int getUsersSize(long pk)
276: throws com.liferay.portal.SystemException {
277: return getPersistence().getUsersSize(pk);
278: }
279:
280: public static boolean containsUser(long pk, long userPK)
281: throws com.liferay.portal.SystemException {
282: return getPersistence().containsUser(pk, userPK);
283: }
284:
285: public static boolean containsUsers(long pk)
286: throws com.liferay.portal.SystemException {
287: return getPersistence().containsUsers(pk);
288: }
289:
290: public static void addUser(long pk, long userPK)
291: throws com.liferay.portal.SystemException,
292: com.liferay.portal.NoSuchUserGroupException,
293: com.liferay.portal.NoSuchUserException {
294: getPersistence().addUser(pk, userPK);
295: }
296:
297: public static void addUser(long pk,
298: com.liferay.portal.model.User user)
299: throws com.liferay.portal.SystemException,
300: com.liferay.portal.NoSuchUserGroupException,
301: com.liferay.portal.NoSuchUserException {
302: getPersistence().addUser(pk, user);
303: }
304:
305: public static void addUsers(long pk, long[] userPKs)
306: throws com.liferay.portal.SystemException,
307: com.liferay.portal.NoSuchUserGroupException,
308: com.liferay.portal.NoSuchUserException {
309: getPersistence().addUsers(pk, userPKs);
310: }
311:
312: public static void addUsers(long pk, java.util.List users)
313: throws com.liferay.portal.SystemException,
314: com.liferay.portal.NoSuchUserGroupException,
315: com.liferay.portal.NoSuchUserException {
316: getPersistence().addUsers(pk, users);
317: }
318:
319: public static void clearUsers(long pk)
320: throws com.liferay.portal.SystemException,
321: com.liferay.portal.NoSuchUserGroupException {
322: getPersistence().clearUsers(pk);
323: }
324:
325: public static void removeUser(long pk, long userPK)
326: throws com.liferay.portal.SystemException,
327: com.liferay.portal.NoSuchUserGroupException,
328: com.liferay.portal.NoSuchUserException {
329: getPersistence().removeUser(pk, userPK);
330: }
331:
332: public static void removeUser(long pk,
333: com.liferay.portal.model.User user)
334: throws com.liferay.portal.SystemException,
335: com.liferay.portal.NoSuchUserGroupException,
336: com.liferay.portal.NoSuchUserException {
337: getPersistence().removeUser(pk, user);
338: }
339:
340: public static void removeUsers(long pk, long[] userPKs)
341: throws com.liferay.portal.SystemException,
342: com.liferay.portal.NoSuchUserGroupException,
343: com.liferay.portal.NoSuchUserException {
344: getPersistence().removeUsers(pk, userPKs);
345: }
346:
347: public static void removeUsers(long pk, java.util.List users)
348: throws com.liferay.portal.SystemException,
349: com.liferay.portal.NoSuchUserGroupException,
350: com.liferay.portal.NoSuchUserException {
351: getPersistence().removeUsers(pk, users);
352: }
353:
354: public static void setUsers(long pk, long[] userPKs)
355: throws com.liferay.portal.SystemException,
356: com.liferay.portal.NoSuchUserGroupException,
357: com.liferay.portal.NoSuchUserException {
358: getPersistence().setUsers(pk, userPKs);
359: }
360:
361: public static void setUsers(long pk, java.util.List users)
362: throws com.liferay.portal.SystemException,
363: com.liferay.portal.NoSuchUserGroupException,
364: com.liferay.portal.NoSuchUserException {
365: getPersistence().setUsers(pk, users);
366: }
367:
368: public static UserGroupPersistence getPersistence() {
369: return _getUtil()._persistence;
370: }
371:
372: public void setPersistence(UserGroupPersistence persistence) {
373: _persistence = persistence;
374: }
375:
376: private static UserGroupUtil _getUtil() {
377: if (_util == null) {
378: _util = (UserGroupUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
379: .locate(_UTIL);
380: }
381:
382: return _util;
383: }
384:
385: private static final String _UTIL = UserGroupUtil.class.getName();
386: private static UserGroupUtil _util;
387: private UserGroupPersistence _persistence;
388: }
|