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="UserGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class UserGroupRoleUtil {
030: public static com.liferay.portal.model.UserGroupRole create(
031: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
032: return getPersistence().create(userGroupRolePK);
033: }
034:
035: public static com.liferay.portal.model.UserGroupRole remove(
036: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portal.NoSuchUserGroupRoleException {
039: return getPersistence().remove(userGroupRolePK);
040: }
041:
042: public static com.liferay.portal.model.UserGroupRole remove(
043: com.liferay.portal.model.UserGroupRole userGroupRole)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(userGroupRole);
046: }
047:
048: public static com.liferay.portal.model.UserGroupRole update(
049: com.liferay.portal.model.UserGroupRole userGroupRole)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(userGroupRole);
052: }
053:
054: public static com.liferay.portal.model.UserGroupRole update(
055: com.liferay.portal.model.UserGroupRole userGroupRole,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(userGroupRole, merge);
058: }
059:
060: public static com.liferay.portal.model.UserGroupRole updateImpl(
061: com.liferay.portal.model.UserGroupRole userGroupRole,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(userGroupRole, merge);
064: }
065:
066: public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
067: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
068: throws com.liferay.portal.SystemException,
069: com.liferay.portal.NoSuchUserGroupRoleException {
070: return getPersistence().findByPrimaryKey(userGroupRolePK);
071: }
072:
073: public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
074: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
075: throws com.liferay.portal.SystemException {
076: return getPersistence().fetchByPrimaryKey(userGroupRolePK);
077: }
078:
079: public static java.util.List findByUserId(long userId)
080: throws com.liferay.portal.SystemException {
081: return getPersistence().findByUserId(userId);
082: }
083:
084: public static java.util.List findByUserId(long userId, int begin,
085: int end) throws com.liferay.portal.SystemException {
086: return getPersistence().findByUserId(userId, begin, end);
087: }
088:
089: public static java.util.List findByUserId(long userId, int begin,
090: int end,
091: com.liferay.portal.kernel.util.OrderByComparator obc)
092: throws com.liferay.portal.SystemException {
093: return getPersistence().findByUserId(userId, begin, end, obc);
094: }
095:
096: public static com.liferay.portal.model.UserGroupRole findByUserId_First(
097: long userId,
098: com.liferay.portal.kernel.util.OrderByComparator obc)
099: throws com.liferay.portal.SystemException,
100: com.liferay.portal.NoSuchUserGroupRoleException {
101: return getPersistence().findByUserId_First(userId, obc);
102: }
103:
104: public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
105: long userId,
106: com.liferay.portal.kernel.util.OrderByComparator obc)
107: throws com.liferay.portal.SystemException,
108: com.liferay.portal.NoSuchUserGroupRoleException {
109: return getPersistence().findByUserId_Last(userId, obc);
110: }
111:
112: public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
113: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
114: long userId,
115: com.liferay.portal.kernel.util.OrderByComparator obc)
116: throws com.liferay.portal.SystemException,
117: com.liferay.portal.NoSuchUserGroupRoleException {
118: return getPersistence().findByUserId_PrevAndNext(
119: userGroupRolePK, userId, obc);
120: }
121:
122: public static java.util.List findByGroupId(long groupId)
123: throws com.liferay.portal.SystemException {
124: return getPersistence().findByGroupId(groupId);
125: }
126:
127: public static java.util.List findByGroupId(long groupId, int begin,
128: int end) throws com.liferay.portal.SystemException {
129: return getPersistence().findByGroupId(groupId, begin, end);
130: }
131:
132: public static java.util.List findByGroupId(long groupId, int begin,
133: int end,
134: com.liferay.portal.kernel.util.OrderByComparator obc)
135: throws com.liferay.portal.SystemException {
136: return getPersistence().findByGroupId(groupId, begin, end, obc);
137: }
138:
139: public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
140: long groupId,
141: com.liferay.portal.kernel.util.OrderByComparator obc)
142: throws com.liferay.portal.SystemException,
143: com.liferay.portal.NoSuchUserGroupRoleException {
144: return getPersistence().findByGroupId_First(groupId, obc);
145: }
146:
147: public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
148: long groupId,
149: com.liferay.portal.kernel.util.OrderByComparator obc)
150: throws com.liferay.portal.SystemException,
151: com.liferay.portal.NoSuchUserGroupRoleException {
152: return getPersistence().findByGroupId_Last(groupId, obc);
153: }
154:
155: public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
156: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
157: long groupId,
158: com.liferay.portal.kernel.util.OrderByComparator obc)
159: throws com.liferay.portal.SystemException,
160: com.liferay.portal.NoSuchUserGroupRoleException {
161: return getPersistence().findByGroupId_PrevAndNext(
162: userGroupRolePK, groupId, obc);
163: }
164:
165: public static java.util.List findByRoleId(long roleId)
166: throws com.liferay.portal.SystemException {
167: return getPersistence().findByRoleId(roleId);
168: }
169:
170: public static java.util.List findByRoleId(long roleId, int begin,
171: int end) throws com.liferay.portal.SystemException {
172: return getPersistence().findByRoleId(roleId, begin, end);
173: }
174:
175: public static java.util.List findByRoleId(long roleId, int begin,
176: int end,
177: com.liferay.portal.kernel.util.OrderByComparator obc)
178: throws com.liferay.portal.SystemException {
179: return getPersistence().findByRoleId(roleId, begin, end, obc);
180: }
181:
182: public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
183: long roleId,
184: com.liferay.portal.kernel.util.OrderByComparator obc)
185: throws com.liferay.portal.SystemException,
186: com.liferay.portal.NoSuchUserGroupRoleException {
187: return getPersistence().findByRoleId_First(roleId, obc);
188: }
189:
190: public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
191: long roleId,
192: com.liferay.portal.kernel.util.OrderByComparator obc)
193: throws com.liferay.portal.SystemException,
194: com.liferay.portal.NoSuchUserGroupRoleException {
195: return getPersistence().findByRoleId_Last(roleId, obc);
196: }
197:
198: public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
199: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
200: long roleId,
201: com.liferay.portal.kernel.util.OrderByComparator obc)
202: throws com.liferay.portal.SystemException,
203: com.liferay.portal.NoSuchUserGroupRoleException {
204: return getPersistence().findByRoleId_PrevAndNext(
205: userGroupRolePK, roleId, obc);
206: }
207:
208: public static java.util.List findByU_G(long userId, long groupId)
209: throws com.liferay.portal.SystemException {
210: return getPersistence().findByU_G(userId, groupId);
211: }
212:
213: public static java.util.List findByU_G(long userId, long groupId,
214: int begin, int end)
215: throws com.liferay.portal.SystemException {
216: return getPersistence().findByU_G(userId, groupId, begin, end);
217: }
218:
219: public static java.util.List findByU_G(long userId, long groupId,
220: int begin, int end,
221: com.liferay.portal.kernel.util.OrderByComparator obc)
222: throws com.liferay.portal.SystemException {
223: return getPersistence().findByU_G(userId, groupId, begin, end,
224: obc);
225: }
226:
227: public static com.liferay.portal.model.UserGroupRole findByU_G_First(
228: long userId, long groupId,
229: com.liferay.portal.kernel.util.OrderByComparator obc)
230: throws com.liferay.portal.SystemException,
231: com.liferay.portal.NoSuchUserGroupRoleException {
232: return getPersistence().findByU_G_First(userId, groupId, obc);
233: }
234:
235: public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
236: long userId, long groupId,
237: com.liferay.portal.kernel.util.OrderByComparator obc)
238: throws com.liferay.portal.SystemException,
239: com.liferay.portal.NoSuchUserGroupRoleException {
240: return getPersistence().findByU_G_Last(userId, groupId, obc);
241: }
242:
243: public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
244: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
245: long userId, long groupId,
246: com.liferay.portal.kernel.util.OrderByComparator obc)
247: throws com.liferay.portal.SystemException,
248: com.liferay.portal.NoSuchUserGroupRoleException {
249: return getPersistence().findByU_G_PrevAndNext(userGroupRolePK,
250: userId, groupId, obc);
251: }
252:
253: public static java.util.List findByG_R(long groupId, long roleId)
254: throws com.liferay.portal.SystemException {
255: return getPersistence().findByG_R(groupId, roleId);
256: }
257:
258: public static java.util.List findByG_R(long groupId, long roleId,
259: int begin, int end)
260: throws com.liferay.portal.SystemException {
261: return getPersistence().findByG_R(groupId, roleId, begin, end);
262: }
263:
264: public static java.util.List findByG_R(long groupId, long roleId,
265: int begin, int end,
266: com.liferay.portal.kernel.util.OrderByComparator obc)
267: throws com.liferay.portal.SystemException {
268: return getPersistence().findByG_R(groupId, roleId, begin, end,
269: obc);
270: }
271:
272: public static com.liferay.portal.model.UserGroupRole findByG_R_First(
273: long groupId, long roleId,
274: com.liferay.portal.kernel.util.OrderByComparator obc)
275: throws com.liferay.portal.SystemException,
276: com.liferay.portal.NoSuchUserGroupRoleException {
277: return getPersistence().findByG_R_First(groupId, roleId, obc);
278: }
279:
280: public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
281: long groupId, long roleId,
282: com.liferay.portal.kernel.util.OrderByComparator obc)
283: throws com.liferay.portal.SystemException,
284: com.liferay.portal.NoSuchUserGroupRoleException {
285: return getPersistence().findByG_R_Last(groupId, roleId, obc);
286: }
287:
288: public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
289: com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
290: long groupId, long roleId,
291: com.liferay.portal.kernel.util.OrderByComparator obc)
292: throws com.liferay.portal.SystemException,
293: com.liferay.portal.NoSuchUserGroupRoleException {
294: return getPersistence().findByG_R_PrevAndNext(userGroupRolePK,
295: groupId, roleId, obc);
296: }
297:
298: public static java.util.List findWithDynamicQuery(
299: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
300: throws com.liferay.portal.SystemException {
301: return getPersistence().findWithDynamicQuery(queryInitializer);
302: }
303:
304: public static java.util.List findWithDynamicQuery(
305: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
306: int begin, int end)
307: throws com.liferay.portal.SystemException {
308: return getPersistence().findWithDynamicQuery(queryInitializer,
309: begin, end);
310: }
311:
312: public static java.util.List findAll()
313: throws com.liferay.portal.SystemException {
314: return getPersistence().findAll();
315: }
316:
317: public static java.util.List findAll(int begin, int end)
318: throws com.liferay.portal.SystemException {
319: return getPersistence().findAll(begin, end);
320: }
321:
322: public static java.util.List findAll(int begin, int end,
323: com.liferay.portal.kernel.util.OrderByComparator obc)
324: throws com.liferay.portal.SystemException {
325: return getPersistence().findAll(begin, end, obc);
326: }
327:
328: public static void removeByUserId(long userId)
329: throws com.liferay.portal.SystemException {
330: getPersistence().removeByUserId(userId);
331: }
332:
333: public static void removeByGroupId(long groupId)
334: throws com.liferay.portal.SystemException {
335: getPersistence().removeByGroupId(groupId);
336: }
337:
338: public static void removeByRoleId(long roleId)
339: throws com.liferay.portal.SystemException {
340: getPersistence().removeByRoleId(roleId);
341: }
342:
343: public static void removeByU_G(long userId, long groupId)
344: throws com.liferay.portal.SystemException {
345: getPersistence().removeByU_G(userId, groupId);
346: }
347:
348: public static void removeByG_R(long groupId, long roleId)
349: throws com.liferay.portal.SystemException {
350: getPersistence().removeByG_R(groupId, roleId);
351: }
352:
353: public static void removeAll()
354: throws com.liferay.portal.SystemException {
355: getPersistence().removeAll();
356: }
357:
358: public static int countByUserId(long userId)
359: throws com.liferay.portal.SystemException {
360: return getPersistence().countByUserId(userId);
361: }
362:
363: public static int countByGroupId(long groupId)
364: throws com.liferay.portal.SystemException {
365: return getPersistence().countByGroupId(groupId);
366: }
367:
368: public static int countByRoleId(long roleId)
369: throws com.liferay.portal.SystemException {
370: return getPersistence().countByRoleId(roleId);
371: }
372:
373: public static int countByU_G(long userId, long groupId)
374: throws com.liferay.portal.SystemException {
375: return getPersistence().countByU_G(userId, groupId);
376: }
377:
378: public static int countByG_R(long groupId, long roleId)
379: throws com.liferay.portal.SystemException {
380: return getPersistence().countByG_R(groupId, roleId);
381: }
382:
383: public static int countAll()
384: throws com.liferay.portal.SystemException {
385: return getPersistence().countAll();
386: }
387:
388: public static UserGroupRolePersistence getPersistence() {
389: return _getUtil()._persistence;
390: }
391:
392: public void setPersistence(UserGroupRolePersistence persistence) {
393: _persistence = persistence;
394: }
395:
396: private static UserGroupRoleUtil _getUtil() {
397: if (_util == null) {
398: _util = (UserGroupRoleUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
399: .locate(_UTIL);
400: }
401:
402: return _util;
403: }
404:
405: private static final String _UTIL = UserGroupRoleUtil.class
406: .getName();
407: private static UserGroupRoleUtil _util;
408: private UserGroupRolePersistence _persistence;
409: }
|