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 userGroupId,
110                    long groupId, long[] roleIds) {
111                    getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds);
112            }
113    
114            public static void deleteUserGroupGroupRoles(long userGroupId,
115                    long[] groupIds) {
116                    getService().deleteUserGroupGroupRoles(userGroupId, groupIds);
117            }
118    
119            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
120                    long groupId) {
121                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId);
122            }
123    
124            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
125                    long groupId, long roleId) {
126                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId);
127            }
128    
129            public static void deleteUserGroupGroupRolesByGroupId(long groupId) {
130                    getService().deleteUserGroupGroupRolesByGroupId(groupId);
131            }
132    
133            public static void deleteUserGroupGroupRolesByRoleId(long roleId) {
134                    getService().deleteUserGroupGroupRolesByRoleId(roleId);
135            }
136    
137            public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId) {
138                    getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId);
139            }
140    
141            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
142                    return getService().dynamicQuery();
143            }
144    
145            /**
146            * Performs a dynamic query on the database and returns the matching rows.
147            *
148            * @param dynamicQuery the dynamic query
149            * @return the matching rows
150            */
151            public static <T> java.util.List<T> dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
153                    return getService().dynamicQuery(dynamicQuery);
154            }
155    
156            /**
157            * Performs a dynamic query on the database and returns a range of the matching rows.
158            *
159            * <p>
160            * 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.
161            * </p>
162            *
163            * @param dynamicQuery the dynamic query
164            * @param start the lower bound of the range of model instances
165            * @param end the upper bound of the range of model instances (not inclusive)
166            * @return the range of matching rows
167            */
168            public static <T> java.util.List<T> dynamicQuery(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
170                    int end) {
171                    return getService().dynamicQuery(dynamicQuery, start, end);
172            }
173    
174            /**
175            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
176            *
177            * <p>
178            * 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.
179            * </p>
180            *
181            * @param dynamicQuery the dynamic query
182            * @param start the lower bound of the range of model instances
183            * @param end the upper bound of the range of model instances (not inclusive)
184            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
185            * @return the ordered range of matching rows
186            */
187            public static <T> java.util.List<T> dynamicQuery(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
189                    int end,
190                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
191                    return getService()
192                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
193            }
194    
195            /**
196            * Returns the number of rows matching the dynamic query.
197            *
198            * @param dynamicQuery the dynamic query
199            * @return the number of rows matching the dynamic query
200            */
201            public static long dynamicQueryCount(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
203                    return getService().dynamicQueryCount(dynamicQuery);
204            }
205    
206            /**
207            * Returns the number of rows matching the dynamic query.
208            *
209            * @param dynamicQuery the dynamic query
210            * @param projection the projection to apply to the query
211            * @return the number of rows matching the dynamic query
212            */
213            public static long dynamicQueryCount(
214                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
215                    com.liferay.portal.kernel.dao.orm.Projection projection) {
216                    return getService().dynamicQueryCount(dynamicQuery, projection);
217            }
218    
219            public static com.liferay.portal.model.UserGroupGroupRole fetchUserGroupGroupRole(
220                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
221                    return getService().fetchUserGroupGroupRole(userGroupGroupRolePK);
222            }
223    
224            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
225                    return getService().getActionableDynamicQuery();
226            }
227    
228            /**
229            * Returns the Spring bean ID for this bean.
230            *
231            * @return the Spring bean ID for this bean
232            */
233            public static java.lang.String getBeanIdentifier() {
234                    return getService().getBeanIdentifier();
235            }
236    
237            public static com.liferay.portal.model.PersistedModel getPersistedModel(
238                    java.io.Serializable primaryKeyObj)
239                    throws com.liferay.portal.kernel.exception.PortalException {
240                    return getService().getPersistedModel(primaryKeyObj);
241            }
242    
243            /**
244            * Returns the user group group role with the primary key.
245            *
246            * @param userGroupGroupRolePK the primary key of the user group group role
247            * @return the user group group role
248            * @throws PortalException if a user group group role with the primary key could not be found
249            */
250            public static com.liferay.portal.model.UserGroupGroupRole getUserGroupGroupRole(
251                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
252                    throws com.liferay.portal.kernel.exception.PortalException {
253                    return getService().getUserGroupGroupRole(userGroupGroupRolePK);
254            }
255    
256            /**
257            * Returns a range of all the user group group roles.
258            *
259            * <p>
260            * 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.
261            * </p>
262            *
263            * @param start the lower bound of the range of user group group roles
264            * @param end the upper bound of the range of user group group roles (not inclusive)
265            * @return the range of user group group roles
266            */
267            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
268                    int start, int end) {
269                    return getService().getUserGroupGroupRoles(start, end);
270            }
271    
272            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
273                    long userGroupId) {
274                    return getService().getUserGroupGroupRoles(userGroupId);
275            }
276    
277            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
278                    long userGroupId, long groupId) {
279                    return getService().getUserGroupGroupRoles(userGroupId, groupId);
280            }
281    
282            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole(
283                    long groupId, long roleId) {
284                    return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId);
285            }
286    
287            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByUser(
288                    long userId) {
289                    return getService().getUserGroupGroupRolesByUser(userId);
290            }
291    
292            /**
293            * Returns the number of user group group roles.
294            *
295            * @return the number of user group group roles
296            */
297            public static int getUserGroupGroupRolesCount() {
298                    return getService().getUserGroupGroupRolesCount();
299            }
300    
301            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
302                    long roleId) {
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                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName);
310            }
311    
312            /**
313            * Sets the Spring bean ID for this bean.
314            *
315            * @param beanIdentifier the Spring bean ID for this bean
316            */
317            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
318                    getService().setBeanIdentifier(beanIdentifier);
319            }
320    
321            /**
322            * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
323            *
324            * @param userGroupGroupRole the user group group role
325            * @return the user group group role that was updated
326            */
327            public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
328                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
329                    return getService().updateUserGroupGroupRole(userGroupGroupRole);
330            }
331    
332            public static UserGroupGroupRoleLocalService getService() {
333                    if (_service == null) {
334                            _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName());
335    
336                            ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
337                                    "_service");
338                    }
339    
340                    return _service;
341            }
342    
343            /**
344             * @deprecated As of 6.2.0
345             */
346            @Deprecated
347            public void setService(UserGroupGroupRoleLocalService service) {
348            }
349    
350            private static UserGroupGroupRoleLocalService _service;
351    }