001    /**
002     * Copyright (c) 2000-2012 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            public static com.liferay.portal.model.UserGroupGroupRole fetchUserGroupGroupRole(
163                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return getService().fetchUserGroupGroupRole(userGroupGroupRolePK);
166            }
167    
168            /**
169            * Returns the user group group role with the primary key.
170            *
171            * @param userGroupGroupRolePK the primary key of the user group group role
172            * @return the user group group role
173            * @throws PortalException if a user group group role with the primary key could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public static com.liferay.portal.model.UserGroupGroupRole getUserGroupGroupRole(
177                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getService().getUserGroupGroupRole(userGroupGroupRolePK);
181            }
182    
183            public static com.liferay.portal.model.PersistedModel getPersistedModel(
184                    java.io.Serializable primaryKeyObj)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getService().getPersistedModel(primaryKeyObj);
188            }
189    
190            /**
191            * Returns a range of all the user group group roles.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param start the lower bound of the range of user group group roles
198            * @param end the upper bound of the range of user group group roles (not inclusive)
199            * @return the range of user group group roles
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
203                    int start, int end)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getService().getUserGroupGroupRoles(start, end);
206            }
207    
208            /**
209            * Returns the number of user group group roles.
210            *
211            * @return the number of user group group roles
212            * @throws SystemException if a system exception occurred
213            */
214            public static int getUserGroupGroupRolesCount()
215                    throws com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getUserGroupGroupRolesCount();
217            }
218    
219            /**
220            * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
221            *
222            * @param userGroupGroupRole the user group group role
223            * @return the user group group role that was updated
224            * @throws SystemException if a system exception occurred
225            */
226            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
227                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
228                    throws com.liferay.portal.kernel.exception.SystemException {
229                    return getService().updateUserGroupGroupRole(userGroupGroupRole);
230            }
231    
232            /**
233            * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
234            *
235            * @param userGroupGroupRole the user group group role
236            * @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.
237            * @return the user group group role that was updated
238            * @throws SystemException if a system exception occurred
239            */
240            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
241                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
242                    boolean merge)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getService().updateUserGroupGroupRole(userGroupGroupRole, merge);
245            }
246    
247            /**
248            * Returns the Spring bean ID for this bean.
249            *
250            * @return the Spring bean ID for this bean
251            */
252            public static java.lang.String getBeanIdentifier() {
253                    return getService().getBeanIdentifier();
254            }
255    
256            /**
257            * Sets the Spring bean ID for this bean.
258            *
259            * @param beanIdentifier the Spring bean ID for this bean
260            */
261            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
262                    getService().setBeanIdentifier(beanIdentifier);
263            }
264    
265            public static void addUserGroupGroupRoles(long userGroupId, long groupId,
266                    long[] roleIds)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    getService().addUserGroupGroupRoles(userGroupId, groupId, roleIds);
270            }
271    
272            public static void addUserGroupGroupRoles(long[] userGroupIds,
273                    long groupId, long roleId)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException {
276                    getService().addUserGroupGroupRoles(userGroupIds, groupId, roleId);
277            }
278    
279            public static void deleteUserGroupGroupRoles(long userGroupId,
280                    long groupId, long[] roleIds)
281                    throws com.liferay.portal.kernel.exception.SystemException {
282                    getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds);
283            }
284    
285            public static void deleteUserGroupGroupRoles(long userGroupId,
286                    long[] groupIds)
287                    throws com.liferay.portal.kernel.exception.SystemException {
288                    getService().deleteUserGroupGroupRoles(userGroupId, groupIds);
289            }
290    
291            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
292                    long groupId)
293                    throws com.liferay.portal.kernel.exception.SystemException {
294                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId);
295            }
296    
297            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
298                    long groupId, long roleId)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId);
301            }
302    
303            public static void deleteUserGroupGroupRolesByGroupId(long groupId)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    getService().deleteUserGroupGroupRolesByGroupId(groupId);
306            }
307    
308            public static void deleteUserGroupGroupRolesByRoleId(long roleId)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    getService().deleteUserGroupGroupRolesByRoleId(roleId);
311            }
312    
313            public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId);
316            }
317    
318            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
319                    long userGroupId)
320                    throws com.liferay.portal.kernel.exception.SystemException {
321                    return getService().getUserGroupGroupRoles(userGroupId);
322            }
323    
324            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
325                    long userGroupId, long groupId)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getService().getUserGroupGroupRoles(userGroupId, groupId);
328            }
329    
330            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole(
331                    long groupId, long roleId)
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId);
334            }
335    
336            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
337                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
338                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleId);
339            }
340    
341            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
342                    java.lang.String roleName)
343                    throws com.liferay.portal.kernel.exception.PortalException,
344                            com.liferay.portal.kernel.exception.SystemException {
345                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName);
346            }
347    
348            public static UserGroupGroupRoleLocalService getService() {
349                    if (_service == null) {
350                            _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName());
351    
352                            ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
353                                    "_service");
354                            MethodCache.remove(UserGroupGroupRoleLocalService.class);
355                    }
356    
357                    return _service;
358            }
359    
360            public void setService(UserGroupGroupRoleLocalService service) {
361                    MethodCache.remove(UserGroupGroupRoleLocalService.class);
362    
363                    _service = service;
364    
365                    ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
366                            "_service");
367                    MethodCache.remove(UserGroupGroupRoleLocalService.class);
368            }
369    
370            private static UserGroupGroupRoleLocalService _service;
371    }