001    /**
002     * Copyright (c) 2000-2011 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;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the user group group role local service. This utility wraps {@link com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see UserGroupGroupRoleLocalService
030     * @see com.liferay.portal.service.base.UserGroupGroupRoleLocalServiceBaseImpl
031     * @see com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl
032     * @generated
033     */
034    public class UserGroupGroupRoleLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the user group group role to the database. Also notifies the appropriate model listeners.
043            *
044            * @param userGroupGroupRole the user group group role
045            * @return the user group group role that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portal.model.UserGroupGroupRole addUserGroupGroupRole(
049                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addUserGroupGroupRole(userGroupGroupRole);
052            }
053    
054            /**
055            * Creates a new user group group role with the primary key. Does not add the user group group role to the database.
056            *
057            * @param userGroupGroupRolePK the primary key for the new user group group role
058            * @return the new user group group role
059            */
060            public static com.liferay.portal.model.UserGroupGroupRole createUserGroupGroupRole(
061                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
062                    return getService().createUserGroupGroupRole(userGroupGroupRolePK);
063            }
064    
065            /**
066            * Deletes the user group group role with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param userGroupGroupRolePK the primary key of the user group group role
069            * @throws PortalException if a user group group role with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static void deleteUserGroupGroupRole(
073                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    getService().deleteUserGroupGroupRole(userGroupGroupRolePK);
077            }
078    
079            /**
080            * Deletes the user group group role from the database. Also notifies the appropriate model listeners.
081            *
082            * @param userGroupGroupRole the user group group role
083            * @throws SystemException if a system exception occurred
084            */
085            public static void deleteUserGroupGroupRole(
086                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    getService().deleteUserGroupGroupRole(userGroupGroupRole);
089            }
090    
091            /**
092            * Performs a dynamic query on the database and returns the matching rows.
093            *
094            * @param dynamicQuery the dynamic query
095            * @return the matching rows
096            * @throws SystemException if a system exception occurred
097            */
098            @SuppressWarnings("rawtypes")
099            public static java.util.List dynamicQuery(
100                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
101                    throws com.liferay.portal.kernel.exception.SystemException {
102                    return getService().dynamicQuery(dynamicQuery);
103            }
104    
105            /**
106            * Performs a dynamic query on the database and returns a range of the matching rows.
107            *
108            * <p>
109            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
110            * </p>
111            *
112            * @param dynamicQuery the dynamic query
113            * @param start the lower bound of the range of model instances
114            * @param end the upper bound of the range of model instances (not inclusive)
115            * @return the range of matching rows
116            * @throws SystemException if a system exception occurred
117            */
118            @SuppressWarnings("rawtypes")
119            public static java.util.List dynamicQuery(
120                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
121                    int end) throws com.liferay.portal.kernel.exception.SystemException {
122                    return getService().dynamicQuery(dynamicQuery, start, end);
123            }
124    
125            /**
126            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
127            *
128            * <p>
129            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
130            * </p>
131            *
132            * @param dynamicQuery the dynamic query
133            * @param start the lower bound of the range of model instances
134            * @param end the upper bound of the range of model instances (not inclusive)
135            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
136            * @return the ordered range of matching rows
137            * @throws SystemException if a system exception occurred
138            */
139            @SuppressWarnings("rawtypes")
140            public static java.util.List dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142                    int end,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getService()
146                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
147            }
148    
149            /**
150            * Returns the number of rows that match the dynamic query.
151            *
152            * @param dynamicQuery the dynamic query
153            * @return the number of rows that match the dynamic query
154            * @throws SystemException if a system exception occurred
155            */
156            public static long dynamicQueryCount(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    return getService().dynamicQueryCount(dynamicQuery);
160            }
161    
162            /**
163            * Returns the user group group role with the primary key.
164            *
165            * @param userGroupGroupRolePK the primary key of the user group group role
166            * @return the user group group role
167            * @throws PortalException if a user group group role with the primary key could not be found
168            * @throws SystemException if a system exception occurred
169            */
170            public static com.liferay.portal.model.UserGroupGroupRole getUserGroupGroupRole(
171                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getService().getUserGroupGroupRole(userGroupGroupRolePK);
175            }
176    
177            public static com.liferay.portal.model.PersistedModel getPersistedModel(
178                    java.io.Serializable primaryKeyObj)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getService().getPersistedModel(primaryKeyObj);
182            }
183    
184            /**
185            * Returns a range of all the user group group roles.
186            *
187            * <p>
188            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
189            * </p>
190            *
191            * @param start the lower bound of the range of user group group roles
192            * @param end the upper bound of the range of user group group roles (not inclusive)
193            * @return the range of user group group roles
194            * @throws SystemException if a system exception occurred
195            */
196            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
197                    int start, int end)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getService().getUserGroupGroupRoles(start, end);
200            }
201    
202            /**
203            * Returns the number of user group group roles.
204            *
205            * @return the number of user group group roles
206            * @throws SystemException if a system exception occurred
207            */
208            public static int getUserGroupGroupRolesCount()
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getService().getUserGroupGroupRolesCount();
211            }
212    
213            /**
214            * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
215            *
216            * @param userGroupGroupRole the user group group role
217            * @return the user group group role that was updated
218            * @throws SystemException if a system exception occurred
219            */
220            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
221                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getService().updateUserGroupGroupRole(userGroupGroupRole);
224            }
225    
226            /**
227            * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
228            *
229            * @param userGroupGroupRole the user group group role
230            * @param merge whether to merge the user group group role with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
231            * @return the user group group role that was updated
232            * @throws SystemException if a system exception occurred
233            */
234            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
235                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
236                    boolean merge)
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getService().updateUserGroupGroupRole(userGroupGroupRole, merge);
239            }
240    
241            /**
242            * Returns the Spring bean ID for this bean.
243            *
244            * @return the Spring bean ID for this bean
245            */
246            public static java.lang.String getBeanIdentifier() {
247                    return getService().getBeanIdentifier();
248            }
249    
250            /**
251            * Sets the Spring bean ID for this bean.
252            *
253            * @param beanIdentifier the Spring bean ID for this bean
254            */
255            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
256                    getService().setBeanIdentifier(beanIdentifier);
257            }
258    
259            public static void addUserGroupGroupRoles(long userGroupId, long groupId,
260                    long[] roleIds)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    getService().addUserGroupGroupRoles(userGroupId, groupId, roleIds);
264            }
265    
266            public static void addUserGroupGroupRoles(long[] userGroupIds,
267                    long groupId, long roleId)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    getService().addUserGroupGroupRoles(userGroupIds, groupId, roleId);
271            }
272    
273            public static void deleteUserGroupGroupRoles(long userGroupId,
274                    long groupId, long[] roleIds)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds);
277            }
278    
279            public static void deleteUserGroupGroupRoles(long userGroupId,
280                    long[] groupIds)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    getService().deleteUserGroupGroupRoles(userGroupId, groupIds);
283            }
284    
285            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
286                    long groupId)
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId);
289            }
290    
291            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
292                    long groupId, long roleId)
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId);
295            }
296    
297            public static void deleteUserGroupGroupRolesByGroupId(long groupId)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    getService().deleteUserGroupGroupRolesByGroupId(groupId);
300            }
301    
302            public static void deleteUserGroupGroupRolesByRoleId(long roleId)
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    getService().deleteUserGroupGroupRolesByRoleId(roleId);
305            }
306    
307            public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId)
308                    throws com.liferay.portal.kernel.exception.SystemException {
309                    getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId);
310            }
311    
312            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
313                    long userGroupId)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return getService().getUserGroupGroupRoles(userGroupId);
316            }
317    
318            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
319                    long userGroupId, long groupId)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return getService().getUserGroupGroupRoles(userGroupId, groupId);
322            }
323    
324            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole(
325                    long groupId, long roleId)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId);
328            }
329    
330            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
331                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
332                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleId);
333            }
334    
335            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
336                    java.lang.String roleName)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException {
339                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName);
340            }
341    
342            public static UserGroupGroupRoleLocalService getService() {
343                    if (_service == null) {
344                            _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName());
345    
346                            ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
347                                    "_service");
348                            MethodCache.remove(UserGroupGroupRoleLocalService.class);
349                    }
350    
351                    return _service;
352            }
353    
354            public void setService(UserGroupGroupRoleLocalService service) {
355                    MethodCache.remove(UserGroupGroupRoleLocalService.class);
356    
357                    _service = service;
358    
359                    ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
360                            "_service");
361                    MethodCache.remove(UserGroupGroupRoleLocalService.class);
362            }
363    
364            private static UserGroupGroupRoleLocalService _service;
365    }