001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * 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.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see UserGroupGroupRoleLocalService
032     * @see com.liferay.portal.service.base.UserGroupGroupRoleLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl
034     * @generated
035     */
036    public class UserGroupGroupRoleLocalServiceUtil {
037            /**
038            * Adds the user group group role to the database. Also notifies the appropriate model listeners.
039            *
040            * @param userGroupGroupRole the user group group role to add
041            * @return the user group group role that was added
042            * @throws SystemException if a system exception occurred
043            */
044            public static com.liferay.portal.model.UserGroupGroupRole addUserGroupGroupRole(
045                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
046                    throws com.liferay.portal.kernel.exception.SystemException {
047                    return getService().addUserGroupGroupRole(userGroupGroupRole);
048            }
049    
050            /**
051            * Creates a new user group group role with the primary key. Does not add the user group group role to the database.
052            *
053            * @param userGroupGroupRolePK the primary key for the new user group group role
054            * @return the new user group group role
055            */
056            public static com.liferay.portal.model.UserGroupGroupRole createUserGroupGroupRole(
057                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
058                    return getService().createUserGroupGroupRole(userGroupGroupRolePK);
059            }
060    
061            /**
062            * Deletes the user group group role with the primary key from the database. Also notifies the appropriate model listeners.
063            *
064            * @param userGroupGroupRolePK the primary key of the user group group role to delete
065            * @throws PortalException if a user group group role with the primary key could not be found
066            * @throws SystemException if a system exception occurred
067            */
068            public static void deleteUserGroupGroupRole(
069                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    getService().deleteUserGroupGroupRole(userGroupGroupRolePK);
073            }
074    
075            /**
076            * Deletes the user group group role from the database. Also notifies the appropriate model listeners.
077            *
078            * @param userGroupGroupRole the user group group role to delete
079            * @throws SystemException if a system exception occurred
080            */
081            public static void deleteUserGroupGroupRole(
082                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
083                    throws com.liferay.portal.kernel.exception.SystemException {
084                    getService().deleteUserGroupGroupRole(userGroupGroupRole);
085            }
086    
087            /**
088            * Performs a dynamic query on the database and returns the matching rows.
089            *
090            * @param dynamicQuery the dynamic query to search with
091            * @return the matching rows
092            * @throws SystemException if a system exception occurred
093            */
094            @SuppressWarnings("rawtypes")
095            public static java.util.List dynamicQuery(
096                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().dynamicQuery(dynamicQuery);
099            }
100    
101            /**
102            * Performs a dynamic query on the database and returns a range of the matching rows.
103            *
104            * <p>
105            * 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.
106            * </p>
107            *
108            * @param dynamicQuery the dynamic query to search with
109            * @param start the lower bound of the range of model instances to return
110            * @param end the upper bound of the range of model instances to return (not inclusive)
111            * @return the range of matching rows
112            * @throws SystemException if a system exception occurred
113            */
114            @SuppressWarnings("rawtypes")
115            public static java.util.List dynamicQuery(
116                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
117                    int end) throws com.liferay.portal.kernel.exception.SystemException {
118                    return getService().dynamicQuery(dynamicQuery, start, end);
119            }
120    
121            /**
122            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
123            *
124            * <p>
125            * 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.
126            * </p>
127            *
128            * @param dynamicQuery the dynamic query to search with
129            * @param start the lower bound of the range of model instances to return
130            * @param end the upper bound of the range of model instances to return (not inclusive)
131            * @param orderByComparator the comparator to order the results by
132            * @return the ordered range of matching rows
133            * @throws SystemException if a system exception occurred
134            */
135            @SuppressWarnings("rawtypes")
136            public static java.util.List dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
138                    int end,
139                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getService()
142                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
143            }
144    
145            /**
146            * Counts the number of rows that match the dynamic query.
147            *
148            * @param dynamicQuery the dynamic query to search with
149            * @return the number of rows that match the dynamic query
150            * @throws SystemException if a system exception occurred
151            */
152            public static long dynamicQueryCount(
153                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return getService().dynamicQueryCount(dynamicQuery);
156            }
157    
158            /**
159            * Gets the user group group role with the primary key.
160            *
161            * @param userGroupGroupRolePK the primary key of the user group group role to get
162            * @return the user group group role
163            * @throws PortalException if a user group group role with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public static com.liferay.portal.model.UserGroupGroupRole getUserGroupGroupRole(
167                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService().getUserGroupGroupRole(userGroupGroupRolePK);
171            }
172    
173            /**
174            * Gets a range of all the user group group roles.
175            *
176            * <p>
177            * 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.
178            * </p>
179            *
180            * @param start the lower bound of the range of user group group roles to return
181            * @param end the upper bound of the range of user group group roles to return (not inclusive)
182            * @return the range of user group group roles
183            * @throws SystemException if a system exception occurred
184            */
185            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
186                    int start, int end)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getService().getUserGroupGroupRoles(start, end);
189            }
190    
191            /**
192            * Gets the number of user group group roles.
193            *
194            * @return the number of user group group roles
195            * @throws SystemException if a system exception occurred
196            */
197            public static int getUserGroupGroupRolesCount()
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getService().getUserGroupGroupRolesCount();
200            }
201    
202            /**
203            * Updates the user group group role in the database. Also notifies the appropriate model listeners.
204            *
205            * @param userGroupGroupRole the user group group role to update
206            * @return the user group group role that was updated
207            * @throws SystemException if a system exception occurred
208            */
209            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
210                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getService().updateUserGroupGroupRole(userGroupGroupRole);
213            }
214    
215            /**
216            * Updates the user group group role in the database. Also notifies the appropriate model listeners.
217            *
218            * @param userGroupGroupRole the user group group role to update
219            * @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.
220            * @return the user group group role that was updated
221            * @throws SystemException if a system exception occurred
222            */
223            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
224                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
225                    boolean merge)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService().updateUserGroupGroupRole(userGroupGroupRole, merge);
228            }
229    
230            public static void addUserGroupGroupRoles(long userGroupId, long groupId,
231                    long[] roleIds)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    getService().addUserGroupGroupRoles(userGroupId, groupId, roleIds);
235            }
236    
237            public static void addUserGroupGroupRoles(long[] userGroupIds,
238                    long groupId, long roleId)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    getService().addUserGroupGroupRoles(userGroupIds, groupId, roleId);
242            }
243    
244            public static void deleteUserGroupGroupRoles(long userGroupId,
245                    long groupId, long[] roleIds)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds);
248            }
249    
250            public static void deleteUserGroupGroupRoles(long userGroupId,
251                    long[] groupIds)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    getService().deleteUserGroupGroupRoles(userGroupId, groupIds);
254            }
255    
256            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
257                    long groupId)
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId);
260            }
261    
262            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
263                    long groupId, long roleId)
264                    throws com.liferay.portal.kernel.exception.SystemException {
265                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId);
266            }
267    
268            public static void deleteUserGroupGroupRolesByGroupId(long groupId)
269                    throws com.liferay.portal.kernel.exception.SystemException {
270                    getService().deleteUserGroupGroupRolesByGroupId(groupId);
271            }
272    
273            public static void deleteUserGroupGroupRolesByRoleId(long roleId)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    getService().deleteUserGroupGroupRolesByRoleId(roleId);
276            }
277    
278            public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId)
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId);
281            }
282    
283            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
284                    long userGroupId)
285                    throws com.liferay.portal.kernel.exception.SystemException {
286                    return getService().getUserGroupGroupRoles(userGroupId);
287            }
288    
289            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
290                    long userGroupId, long groupId)
291                    throws com.liferay.portal.kernel.exception.SystemException {
292                    return getService().getUserGroupGroupRoles(userGroupId, groupId);
293            }
294    
295            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole(
296                    long groupId, long roleId)
297                    throws com.liferay.portal.kernel.exception.SystemException {
298                    return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId);
299            }
300    
301            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
302                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
303                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleId);
304            }
305    
306            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
307                    java.lang.String roleName)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName);
311            }
312    
313            public static UserGroupGroupRoleLocalService getService() {
314                    if (_service == null) {
315                            _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName());
316                    }
317    
318                    return _service;
319            }
320    
321            public void setService(UserGroupGroupRoleLocalService service) {
322                    _service = service;
323            }
324    
325            private static UserGroupGroupRoleLocalService _service;
326    }