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.kernel.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            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
044                    java.lang.String roleName)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName);
047            }
048    
049            public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
050                    long roleId) {
051                    return getService().hasUserGroupGroupRole(userGroupId, groupId, roleId);
052            }
053    
054            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
055                    return getService().getActionableDynamicQuery();
056            }
057    
058            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
059                    return getService().dynamicQuery();
060            }
061    
062            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
063                    return getService().getIndexableActionableDynamicQuery();
064            }
065    
066            /**
067            * @throws PortalException
068            */
069            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
070                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    return getService().deletePersistedModel(persistedModel);
073            }
074    
075            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
076                    java.io.Serializable primaryKeyObj)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    return getService().getPersistedModel(primaryKeyObj);
079            }
080    
081            /**
082            * Adds the user group group role to the database. Also notifies the appropriate model listeners.
083            *
084            * @param userGroupGroupRole the user group group role
085            * @return the user group group role that was added
086            */
087            public static com.liferay.portal.kernel.model.UserGroupGroupRole addUserGroupGroupRole(
088                    com.liferay.portal.kernel.model.UserGroupGroupRole userGroupGroupRole) {
089                    return getService().addUserGroupGroupRole(userGroupGroupRole);
090            }
091    
092            /**
093            * Creates a new user group group role with the primary key. Does not add the user group group role to the database.
094            *
095            * @param userGroupGroupRolePK the primary key for the new user group group role
096            * @return the new user group group role
097            */
098            public static com.liferay.portal.kernel.model.UserGroupGroupRole createUserGroupGroupRole(
099                    com.liferay.portal.kernel.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
100                    return getService().createUserGroupGroupRole(userGroupGroupRolePK);
101            }
102    
103            /**
104            * Deletes the user group group role from the database. Also notifies the appropriate model listeners.
105            *
106            * @param userGroupGroupRole the user group group role
107            * @return the user group group role that was removed
108            */
109            public static com.liferay.portal.kernel.model.UserGroupGroupRole deleteUserGroupGroupRole(
110                    com.liferay.portal.kernel.model.UserGroupGroupRole userGroupGroupRole) {
111                    return getService().deleteUserGroupGroupRole(userGroupGroupRole);
112            }
113    
114            /**
115            * Deletes the user group group role with the primary key from the database. Also notifies the appropriate model listeners.
116            *
117            * @param userGroupGroupRolePK the primary key of the user group group role
118            * @return the user group group role that was removed
119            * @throws PortalException if a user group group role with the primary key could not be found
120            */
121            public static com.liferay.portal.kernel.model.UserGroupGroupRole deleteUserGroupGroupRole(
122                    com.liferay.portal.kernel.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    return getService().deleteUserGroupGroupRole(userGroupGroupRolePK);
125            }
126    
127            public static com.liferay.portal.kernel.model.UserGroupGroupRole fetchUserGroupGroupRole(
128                    com.liferay.portal.kernel.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
129                    return getService().fetchUserGroupGroupRole(userGroupGroupRolePK);
130            }
131    
132            /**
133            * Returns the user group group role with the primary key.
134            *
135            * @param userGroupGroupRolePK the primary key of the user group group role
136            * @return the user group group role
137            * @throws PortalException if a user group group role with the primary key could not be found
138            */
139            public static com.liferay.portal.kernel.model.UserGroupGroupRole getUserGroupGroupRole(
140                    com.liferay.portal.kernel.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
141                    throws com.liferay.portal.kernel.exception.PortalException {
142                    return getService().getUserGroupGroupRole(userGroupGroupRolePK);
143            }
144    
145            /**
146            * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
147            *
148            * @param userGroupGroupRole the user group group role
149            * @return the user group group role that was updated
150            */
151            public static com.liferay.portal.kernel.model.UserGroupGroupRole updateUserGroupGroupRole(
152                    com.liferay.portal.kernel.model.UserGroupGroupRole userGroupGroupRole) {
153                    return getService().updateUserGroupGroupRole(userGroupGroupRole);
154            }
155    
156            /**
157            * Returns the number of user group group roles.
158            *
159            * @return the number of user group group roles
160            */
161            public static int getUserGroupGroupRolesCount() {
162                    return getService().getUserGroupGroupRolesCount();
163            }
164    
165            /**
166            * Returns the OSGi service identifier.
167            *
168            * @return the OSGi service identifier
169            */
170            public static java.lang.String getOSGiServiceIdentifier() {
171                    return getService().getOSGiServiceIdentifier();
172            }
173    
174            /**
175            * Performs a dynamic query on the database and returns the matching rows.
176            *
177            * @param dynamicQuery the dynamic query
178            * @return the matching rows
179            */
180            public static <T> java.util.List<T> dynamicQuery(
181                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
182                    return getService().dynamicQuery(dynamicQuery);
183            }
184    
185            /**
186            * Performs a dynamic query on the database and returns a range of the matching rows.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param dynamicQuery the dynamic query
193            * @param start the lower bound of the range of model instances
194            * @param end the upper bound of the range of model instances (not inclusive)
195            * @return the range of matching rows
196            */
197            public static <T> java.util.List<T> dynamicQuery(
198                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
199                    int end) {
200                    return getService().dynamicQuery(dynamicQuery, start, end);
201            }
202    
203            /**
204            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
205            *
206            * <p>
207            * 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.
208            * </p>
209            *
210            * @param dynamicQuery the dynamic query
211            * @param start the lower bound of the range of model instances
212            * @param end the upper bound of the range of model instances (not inclusive)
213            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
214            * @return the ordered range of matching rows
215            */
216            public static <T> java.util.List<T> dynamicQuery(
217                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
218                    int end,
219                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
220                    return getService()
221                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
222            }
223    
224            /**
225            * Returns a range of all the user group group roles.
226            *
227            * <p>
228            * 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.
229            * </p>
230            *
231            * @param start the lower bound of the range of user group group roles
232            * @param end the upper bound of the range of user group group roles (not inclusive)
233            * @return the range of user group group roles
234            */
235            public static java.util.List<com.liferay.portal.kernel.model.UserGroupGroupRole> getUserGroupGroupRoles(
236                    int start, int end) {
237                    return getService().getUserGroupGroupRoles(start, end);
238            }
239    
240            public static java.util.List<com.liferay.portal.kernel.model.UserGroupGroupRole> getUserGroupGroupRoles(
241                    long userGroupId) {
242                    return getService().getUserGroupGroupRoles(userGroupId);
243            }
244    
245            public static java.util.List<com.liferay.portal.kernel.model.UserGroupGroupRole> getUserGroupGroupRoles(
246                    long userGroupId, long groupId) {
247                    return getService().getUserGroupGroupRoles(userGroupId, groupId);
248            }
249    
250            public static java.util.List<com.liferay.portal.kernel.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole(
251                    long groupId, long roleId) {
252                    return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId);
253            }
254    
255            public static java.util.List<com.liferay.portal.kernel.model.UserGroupGroupRole> getUserGroupGroupRolesByUser(
256                    long userId) {
257                    return getService().getUserGroupGroupRolesByUser(userId);
258            }
259    
260            /**
261            * Returns the number of rows matching the dynamic query.
262            *
263            * @param dynamicQuery the dynamic query
264            * @return the number of rows matching the dynamic query
265            */
266            public static long dynamicQueryCount(
267                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
268                    return getService().dynamicQueryCount(dynamicQuery);
269            }
270    
271            /**
272            * Returns the number of rows matching the dynamic query.
273            *
274            * @param dynamicQuery the dynamic query
275            * @param projection the projection to apply to the query
276            * @return the number of rows matching the dynamic query
277            */
278            public static long dynamicQueryCount(
279                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
280                    com.liferay.portal.kernel.dao.orm.Projection projection) {
281                    return getService().dynamicQueryCount(dynamicQuery, projection);
282            }
283    
284            public static void addUserGroupGroupRoles(long userGroupId, long groupId,
285                    long[] roleIds) {
286                    getService().addUserGroupGroupRoles(userGroupId, groupId, roleIds);
287            }
288    
289            public static void addUserGroupGroupRoles(long[] userGroupIds,
290                    long groupId, long roleId) {
291                    getService().addUserGroupGroupRoles(userGroupIds, groupId, roleId);
292            }
293    
294            public static void deleteUserGroupGroupRoles(long groupId, int roleType) {
295                    getService().deleteUserGroupGroupRoles(groupId, roleType);
296            }
297    
298            public static void deleteUserGroupGroupRoles(long userGroupId,
299                    long groupId, long[] roleIds) {
300                    getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds);
301            }
302    
303            public static void deleteUserGroupGroupRoles(long userGroupId,
304                    long[] groupIds) {
305                    getService().deleteUserGroupGroupRoles(userGroupId, groupIds);
306            }
307    
308            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
309                    long groupId) {
310                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId);
311            }
312    
313            public static void deleteUserGroupGroupRoles(long[] userGroupIds,
314                    long groupId, long roleId) {
315                    getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId);
316            }
317    
318            public static void deleteUserGroupGroupRolesByGroupId(long groupId) {
319                    getService().deleteUserGroupGroupRolesByGroupId(groupId);
320            }
321    
322            public static void deleteUserGroupGroupRolesByRoleId(long roleId) {
323                    getService().deleteUserGroupGroupRolesByRoleId(roleId);
324            }
325    
326            public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId) {
327                    getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId);
328            }
329    
330            public static UserGroupGroupRoleLocalService getService() {
331                    if (_service == null) {
332                            _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName());
333    
334                            ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
335                                    "_service");
336                    }
337    
338                    return _service;
339            }
340    
341            private static UserGroupGroupRoleLocalService _service;
342    }