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