001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link UserGroupLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       UserGroupLocalService
030     * @generated
031     */
032    public class UserGroupLocalServiceUtil {
033            public static com.liferay.portal.model.UserGroup addUserGroup(
034                    com.liferay.portal.model.UserGroup userGroup)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addUserGroup(userGroup);
037            }
038    
039            public static com.liferay.portal.model.UserGroup createUserGroup(
040                    long userGroupId) {
041                    return getService().createUserGroup(userGroupId);
042            }
043    
044            public static void deleteUserGroup(long userGroupId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteUserGroup(userGroupId);
048            }
049    
050            public static void deleteUserGroup(
051                    com.liferay.portal.model.UserGroup userGroup)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteUserGroup(userGroup);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portal.model.UserGroup getUserGroup(
087                    long userGroupId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getUserGroup(userGroupId);
091            }
092    
093            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getUserGroups(start, end);
097            }
098    
099            public static int getUserGroupsCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getUserGroupsCount();
102            }
103    
104            public static com.liferay.portal.model.UserGroup updateUserGroup(
105                    com.liferay.portal.model.UserGroup userGroup)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateUserGroup(userGroup);
108            }
109    
110            public static com.liferay.portal.model.UserGroup updateUserGroup(
111                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().updateUserGroup(userGroup, merge);
114            }
115    
116            public static void addGroupUserGroups(long groupId, long[] userGroupIds)
117                    throws com.liferay.portal.kernel.exception.SystemException {
118                    getService().addGroupUserGroups(groupId, userGroupIds);
119            }
120    
121            public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
122                    long companyId, java.lang.String name, java.lang.String description)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException {
125                    return getService().addUserGroup(userId, companyId, name, description);
126            }
127    
128            public static void clearUserUserGroups(long userId)
129                    throws com.liferay.portal.kernel.exception.SystemException {
130                    getService().clearUserUserGroups(userId);
131            }
132    
133            public static void copyUserGroupLayouts(long userGroupId, long[] userIds)
134                    throws com.liferay.portal.kernel.exception.PortalException,
135                            com.liferay.portal.kernel.exception.SystemException {
136                    getService().copyUserGroupLayouts(userGroupId, userIds);
137            }
138    
139            public static void copyUserGroupLayouts(long[] userGroupIds, long userId)
140                    throws com.liferay.portal.kernel.exception.PortalException,
141                            com.liferay.portal.kernel.exception.SystemException {
142                    getService().copyUserGroupLayouts(userGroupIds, userId);
143            }
144    
145            public static void copyUserGroupLayouts(long userGroupId, long userId)
146                    throws com.liferay.portal.kernel.exception.PortalException,
147                            com.liferay.portal.kernel.exception.SystemException {
148                    getService().copyUserGroupLayouts(userGroupId, userId);
149            }
150    
151            public static com.liferay.portal.model.UserGroup getUserGroup(
152                    long companyId, java.lang.String name)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getService().getUserGroup(companyId, name);
156            }
157    
158            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
159                    long companyId)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getService().getUserGroups(companyId);
162            }
163    
164            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
165                    long[] userGroupIds)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getService().getUserGroups(userGroupIds);
169            }
170    
171            public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
172                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
173                    return getService().getUserUserGroups(userId);
174            }
175    
176            public static boolean hasGroupUserGroup(long groupId, long userGroupId)
177                    throws com.liferay.portal.kernel.exception.SystemException {
178                    return getService().hasGroupUserGroup(groupId, userGroupId);
179            }
180    
181            public static java.util.List<com.liferay.portal.model.UserGroup> search(
182                    long companyId, java.lang.String name, java.lang.String description,
183                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
184                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
185                    throws com.liferay.portal.kernel.exception.SystemException {
186                    return getService()
187                                       .search(companyId, name, description, params, start, end, obc);
188            }
189    
190            public static int searchCount(long companyId, java.lang.String name,
191                    java.lang.String description,
192                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getService().searchCount(companyId, name, description, params);
195            }
196    
197            public static void setUserUserGroups(long userId, long[] userGroupIds)
198                    throws com.liferay.portal.kernel.exception.PortalException,
199                            com.liferay.portal.kernel.exception.SystemException {
200                    getService().setUserUserGroups(userId, userGroupIds);
201            }
202    
203            public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    getService().unsetGroupUserGroups(groupId, userGroupIds);
206            }
207    
208            public static com.liferay.portal.model.UserGroup updateUserGroup(
209                    long companyId, long userGroupId, java.lang.String name,
210                    java.lang.String description)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getService()
214                                       .updateUserGroup(companyId, userGroupId, name, description);
215            }
216    
217            public static UserGroupLocalService getService() {
218                    if (_service == null) {
219                            _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName());
220                    }
221    
222                    return _service;
223            }
224    
225            public void setService(UserGroupLocalService service) {
226                    _service = service;
227            }
228    
229            private static UserGroupLocalService _service;
230    }