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 UserGroup. This utility wraps 024 * {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} 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 UserGroupLocalService 032 * @see com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class UserGroupLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static void addGroupUserGroup(long groupId, 044 com.liferay.portal.model.UserGroup userGroup) { 045 getService().addGroupUserGroup(groupId, userGroup); 046 } 047 048 public static void addGroupUserGroup(long groupId, long userGroupId) { 049 getService().addGroupUserGroup(groupId, userGroupId); 050 } 051 052 public static void addGroupUserGroups(long groupId, 053 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) { 054 getService().addGroupUserGroups(groupId, UserGroups); 055 } 056 057 public static void addGroupUserGroups(long groupId, long[] userGroupIds) { 058 getService().addGroupUserGroups(groupId, userGroupIds); 059 } 060 061 public static void addTeamUserGroup(long teamId, 062 com.liferay.portal.model.UserGroup userGroup) { 063 getService().addTeamUserGroup(teamId, userGroup); 064 } 065 066 public static void addTeamUserGroup(long teamId, long userGroupId) { 067 getService().addTeamUserGroup(teamId, userGroupId); 068 } 069 070 public static void addTeamUserGroups(long teamId, 071 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) { 072 getService().addTeamUserGroups(teamId, UserGroups); 073 } 074 075 public static void addTeamUserGroups(long teamId, long[] userGroupIds) { 076 getService().addTeamUserGroups(teamId, userGroupIds); 077 } 078 079 /** 080 * Adds the user group to the database. Also notifies the appropriate model listeners. 081 * 082 * @param userGroup the user group 083 * @return the user group that was added 084 */ 085 public static com.liferay.portal.model.UserGroup addUserGroup( 086 com.liferay.portal.model.UserGroup userGroup) { 087 return getService().addUserGroup(userGroup); 088 } 089 090 /** 091 * Adds a user group. 092 * 093 * <p> 094 * This method handles the creation and bookkeeping of the user group, 095 * including its resources, metadata, and internal data structures. It is 096 * not necessary to make subsequent calls to setup default groups and 097 * resources for the user group. 098 * </p> 099 * 100 * @param userId the primary key of the user 101 * @param companyId the primary key of the user group's company 102 * @param name the user group's name 103 * @param description the user group's description 104 * @return the user group 105 * @throws PortalException if the user group's information was invalid 106 * @deprecated As of 6.2.0, replaced by {@link #addUserGroup(long, long, 107 String, String, ServiceContext)} 108 */ 109 @Deprecated 110 public static com.liferay.portal.model.UserGroup addUserGroup(long userId, 111 long companyId, java.lang.String name, java.lang.String description) 112 throws com.liferay.portal.kernel.exception.PortalException { 113 return getService().addUserGroup(userId, companyId, name, description); 114 } 115 116 /** 117 * Adds a user group. 118 * 119 * <p> 120 * This method handles the creation and bookkeeping of the user group, 121 * including its resources, metadata, and internal data structures. It is 122 * not necessary to make subsequent calls to setup default groups and 123 * resources for the user group. 124 * </p> 125 * 126 * @param userId the primary key of the user 127 * @param companyId the primary key of the user group's company 128 * @param name the user group's name 129 * @param description the user group's description 130 * @param serviceContext the service context to be applied (optionally 131 <code>null</code>). Can set expando bridge attributes for the 132 user group. 133 * @return the user group 134 * @throws PortalException if the user group's information was invalid 135 */ 136 public static com.liferay.portal.model.UserGroup addUserGroup(long userId, 137 long companyId, java.lang.String name, java.lang.String description, 138 com.liferay.portal.service.ServiceContext serviceContext) 139 throws com.liferay.portal.kernel.exception.PortalException { 140 return getService() 141 .addUserGroup(userId, companyId, name, description, 142 serviceContext); 143 } 144 145 public static void addUserUserGroup(long userId, 146 com.liferay.portal.model.UserGroup userGroup) { 147 getService().addUserUserGroup(userId, userGroup); 148 } 149 150 public static void addUserUserGroup(long userId, long userGroupId) { 151 getService().addUserUserGroup(userId, userGroupId); 152 } 153 154 public static void addUserUserGroups(long userId, 155 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) { 156 getService().addUserUserGroups(userId, UserGroups); 157 } 158 159 public static void addUserUserGroups(long userId, long[] userGroupIds) { 160 getService().addUserUserGroups(userId, userGroupIds); 161 } 162 163 public static void clearGroupUserGroups(long groupId) { 164 getService().clearGroupUserGroups(groupId); 165 } 166 167 public static void clearTeamUserGroups(long teamId) { 168 getService().clearTeamUserGroups(teamId); 169 } 170 171 public static void clearUserUserGroups(long userId) { 172 getService().clearUserUserGroups(userId); 173 } 174 175 /** 176 * Copies the user group's layout to the user. 177 * 178 * @param userGroupId the primary key of the user group 179 * @param userId the primary key of the user 180 * @throws PortalException if a user with the primary key could not be 181 found or if a portal exception occurred 182 * @deprecated As of 6.2.0 183 */ 184 @Deprecated 185 public static void copyUserGroupLayouts(long userGroupId, long userId) 186 throws com.liferay.portal.kernel.exception.PortalException { 187 getService().copyUserGroupLayouts(userGroupId, userId); 188 } 189 190 /** 191 * Copies the user group's layouts to the users who are not already members 192 * of the user group. 193 * 194 * @param userGroupId the primary key of the user group 195 * @param userIds the primary keys of the users 196 * @throws PortalException if any one of the users could not be found or 197 if a portal exception occurred 198 * @deprecated As of 6.1.0 199 */ 200 @Deprecated 201 public static void copyUserGroupLayouts(long userGroupId, long[] userIds) 202 throws com.liferay.portal.kernel.exception.PortalException { 203 getService().copyUserGroupLayouts(userGroupId, userIds); 204 } 205 206 /** 207 * Copies the user groups' layouts to the user. 208 * 209 * @param userGroupIds the primary keys of the user groups 210 * @param userId the primary key of the user 211 * @throws PortalException if a user with the primary key could not be 212 found or if a portal exception occurred 213 * @deprecated As of 6.1.0 214 */ 215 @Deprecated 216 public static void copyUserGroupLayouts(long[] userGroupIds, long userId) 217 throws com.liferay.portal.kernel.exception.PortalException { 218 getService().copyUserGroupLayouts(userGroupIds, userId); 219 } 220 221 /** 222 * Creates a new user group with the primary key. Does not add the user group to the database. 223 * 224 * @param userGroupId the primary key for the new user group 225 * @return the new user group 226 */ 227 public static com.liferay.portal.model.UserGroup createUserGroup( 228 long userGroupId) { 229 return getService().createUserGroup(userGroupId); 230 } 231 232 public static void deleteGroupUserGroup(long groupId, 233 com.liferay.portal.model.UserGroup userGroup) { 234 getService().deleteGroupUserGroup(groupId, userGroup); 235 } 236 237 public static void deleteGroupUserGroup(long groupId, long userGroupId) { 238 getService().deleteGroupUserGroup(groupId, userGroupId); 239 } 240 241 public static void deleteGroupUserGroups(long groupId, 242 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) { 243 getService().deleteGroupUserGroups(groupId, UserGroups); 244 } 245 246 public static void deleteGroupUserGroups(long groupId, long[] userGroupIds) { 247 getService().deleteGroupUserGroups(groupId, userGroupIds); 248 } 249 250 /** 251 * @throws PortalException 252 */ 253 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 254 com.liferay.portal.model.PersistedModel persistedModel) 255 throws com.liferay.portal.kernel.exception.PortalException { 256 return getService().deletePersistedModel(persistedModel); 257 } 258 259 public static void deleteTeamUserGroup(long teamId, 260 com.liferay.portal.model.UserGroup userGroup) { 261 getService().deleteTeamUserGroup(teamId, userGroup); 262 } 263 264 public static void deleteTeamUserGroup(long teamId, long userGroupId) { 265 getService().deleteTeamUserGroup(teamId, userGroupId); 266 } 267 268 public static void deleteTeamUserGroups(long teamId, 269 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) { 270 getService().deleteTeamUserGroups(teamId, UserGroups); 271 } 272 273 public static void deleteTeamUserGroups(long teamId, long[] userGroupIds) { 274 getService().deleteTeamUserGroups(teamId, userGroupIds); 275 } 276 277 /** 278 * Deletes the user group from the database. Also notifies the appropriate model listeners. 279 * 280 * @param userGroup the user group 281 * @return the user group that was removed 282 * @throws PortalException 283 */ 284 public static com.liferay.portal.model.UserGroup deleteUserGroup( 285 com.liferay.portal.model.UserGroup userGroup) 286 throws com.liferay.portal.kernel.exception.PortalException { 287 return getService().deleteUserGroup(userGroup); 288 } 289 290 /** 291 * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners. 292 * 293 * @param userGroupId the primary key of the user group 294 * @return the user group that was removed 295 * @throws PortalException if a user group with the primary key could not be found 296 */ 297 public static com.liferay.portal.model.UserGroup deleteUserGroup( 298 long userGroupId) 299 throws com.liferay.portal.kernel.exception.PortalException { 300 return getService().deleteUserGroup(userGroupId); 301 } 302 303 public static void deleteUserGroups(long companyId) 304 throws com.liferay.portal.kernel.exception.PortalException { 305 getService().deleteUserGroups(companyId); 306 } 307 308 public static void deleteUserUserGroup(long userId, 309 com.liferay.portal.model.UserGroup userGroup) { 310 getService().deleteUserUserGroup(userId, userGroup); 311 } 312 313 public static void deleteUserUserGroup(long userId, long userGroupId) { 314 getService().deleteUserUserGroup(userId, userGroupId); 315 } 316 317 public static void deleteUserUserGroups(long userId, 318 java.util.List<com.liferay.portal.model.UserGroup> UserGroups) { 319 getService().deleteUserUserGroups(userId, UserGroups); 320 } 321 322 public static void deleteUserUserGroups(long userId, long[] userGroupIds) { 323 getService().deleteUserUserGroups(userId, userGroupIds); 324 } 325 326 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 327 return getService().dynamicQuery(); 328 } 329 330 /** 331 * Performs a dynamic query on the database and returns the matching rows. 332 * 333 * @param dynamicQuery the dynamic query 334 * @return the matching rows 335 */ 336 public static <T> java.util.List<T> dynamicQuery( 337 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 338 return getService().dynamicQuery(dynamicQuery); 339 } 340 341 /** 342 * Performs a dynamic query on the database and returns a range of the matching rows. 343 * 344 * <p> 345 * 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.UserGroupModelImpl}. 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. 346 * </p> 347 * 348 * @param dynamicQuery the dynamic query 349 * @param start the lower bound of the range of model instances 350 * @param end the upper bound of the range of model instances (not inclusive) 351 * @return the range of matching rows 352 */ 353 public static <T> java.util.List<T> dynamicQuery( 354 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 355 int end) { 356 return getService().dynamicQuery(dynamicQuery, start, end); 357 } 358 359 /** 360 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 361 * 362 * <p> 363 * 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.UserGroupModelImpl}. 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. 364 * </p> 365 * 366 * @param dynamicQuery the dynamic query 367 * @param start the lower bound of the range of model instances 368 * @param end the upper bound of the range of model instances (not inclusive) 369 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 370 * @return the ordered range of matching rows 371 */ 372 public static <T> java.util.List<T> dynamicQuery( 373 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 374 int end, 375 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 376 return getService() 377 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 378 } 379 380 /** 381 * Returns the number of rows matching the dynamic query. 382 * 383 * @param dynamicQuery the dynamic query 384 * @return the number of rows matching the dynamic query 385 */ 386 public static long dynamicQueryCount( 387 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 388 return getService().dynamicQueryCount(dynamicQuery); 389 } 390 391 /** 392 * Returns the number of rows matching the dynamic query. 393 * 394 * @param dynamicQuery the dynamic query 395 * @param projection the projection to apply to the query 396 * @return the number of rows matching the dynamic query 397 */ 398 public static long dynamicQueryCount( 399 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 400 com.liferay.portal.kernel.dao.orm.Projection projection) { 401 return getService().dynamicQueryCount(dynamicQuery, projection); 402 } 403 404 public static com.liferay.portal.model.UserGroup fetchUserGroup( 405 long companyId, java.lang.String name) { 406 return getService().fetchUserGroup(companyId, name); 407 } 408 409 public static com.liferay.portal.model.UserGroup fetchUserGroup( 410 long userGroupId) { 411 return getService().fetchUserGroup(userGroupId); 412 } 413 414 /** 415 * Returns the user group with the matching UUID and company. 416 * 417 * @param uuid the user group's UUID 418 * @param companyId the primary key of the company 419 * @return the matching user group, or <code>null</code> if a matching user group could not be found 420 */ 421 public static com.liferay.portal.model.UserGroup fetchUserGroupByUuidAndCompanyId( 422 java.lang.String uuid, long companyId) { 423 return getService().fetchUserGroupByUuidAndCompanyId(uuid, companyId); 424 } 425 426 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 427 return getService().getActionableDynamicQuery(); 428 } 429 430 /** 431 * Returns the Spring bean ID for this bean. 432 * 433 * @return the Spring bean ID for this bean 434 */ 435 public static java.lang.String getBeanIdentifier() { 436 return getService().getBeanIdentifier(); 437 } 438 439 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 440 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 441 return getService().getExportActionableDynamicQuery(portletDataContext); 442 } 443 444 /** 445 * Returns the groupIds of the groups associated with the user group. 446 * 447 * @param userGroupId the userGroupId of the user group 448 * @return long[] the groupIds of groups associated with the user group 449 */ 450 public static long[] getGroupPrimaryKeys(long userGroupId) { 451 return getService().getGroupPrimaryKeys(userGroupId); 452 } 453 454 public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 455 long groupId) { 456 return getService().getGroupUserGroups(groupId); 457 } 458 459 public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 460 long groupId, int start, int end) { 461 return getService().getGroupUserGroups(groupId, start, end); 462 } 463 464 public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 465 long groupId, int start, int end, 466 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator) { 467 return getService() 468 .getGroupUserGroups(groupId, start, end, orderByComparator); 469 } 470 471 public static int getGroupUserGroupsCount(long groupId) { 472 return getService().getGroupUserGroupsCount(groupId); 473 } 474 475 public static java.util.List<com.liferay.portal.model.UserGroup> getGroupUserUserGroups( 476 long groupId, long userId) 477 throws com.liferay.portal.kernel.exception.PortalException { 478 return getService().getGroupUserUserGroups(groupId, userId); 479 } 480 481 public static com.liferay.portal.model.PersistedModel getPersistedModel( 482 java.io.Serializable primaryKeyObj) 483 throws com.liferay.portal.kernel.exception.PortalException { 484 return getService().getPersistedModel(primaryKeyObj); 485 } 486 487 /** 488 * Returns the teamIds of the teams associated with the user group. 489 * 490 * @param userGroupId the userGroupId of the user group 491 * @return long[] the teamIds of teams associated with the user group 492 */ 493 public static long[] getTeamPrimaryKeys(long userGroupId) { 494 return getService().getTeamPrimaryKeys(userGroupId); 495 } 496 497 public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 498 long teamId) { 499 return getService().getTeamUserGroups(teamId); 500 } 501 502 public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 503 long teamId, int start, int end) { 504 return getService().getTeamUserGroups(teamId, start, end); 505 } 506 507 public static java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 508 long teamId, int start, int end, 509 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator) { 510 return getService() 511 .getTeamUserGroups(teamId, start, end, orderByComparator); 512 } 513 514 public static int getTeamUserGroupsCount(long teamId) { 515 return getService().getTeamUserGroupsCount(teamId); 516 } 517 518 /** 519 * Returns the user group with the name. 520 * 521 * @param companyId the primary key of the user group's company 522 * @param name the user group's name 523 * @return Returns the user group with the name 524 * @throws PortalException if a user group with the name could not be found 525 */ 526 public static com.liferay.portal.model.UserGroup getUserGroup( 527 long companyId, java.lang.String name) 528 throws com.liferay.portal.kernel.exception.PortalException { 529 return getService().getUserGroup(companyId, name); 530 } 531 532 /** 533 * Returns the user group with the primary key. 534 * 535 * @param userGroupId the primary key of the user group 536 * @return the user group 537 * @throws PortalException if a user group with the primary key could not be found 538 */ 539 public static com.liferay.portal.model.UserGroup getUserGroup( 540 long userGroupId) 541 throws com.liferay.portal.kernel.exception.PortalException { 542 return getService().getUserGroup(userGroupId); 543 } 544 545 /** 546 * Returns the user group with the matching UUID and company. 547 * 548 * @param uuid the user group's UUID 549 * @param companyId the primary key of the company 550 * @return the matching user group 551 * @throws PortalException if a matching user group could not be found 552 */ 553 public static com.liferay.portal.model.UserGroup getUserGroupByUuidAndCompanyId( 554 java.lang.String uuid, long companyId) 555 throws com.liferay.portal.kernel.exception.PortalException { 556 return getService().getUserGroupByUuidAndCompanyId(uuid, companyId); 557 } 558 559 /** 560 * Returns all the user groups belonging to the company. 561 * 562 * @param companyId the primary key of the user groups' company 563 * @return the user groups belonging to the company 564 */ 565 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 566 long companyId) { 567 return getService().getUserGroups(companyId); 568 } 569 570 /** 571 * Returns a range of all the user groups. 572 * 573 * <p> 574 * 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.UserGroupModelImpl}. 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. 575 * </p> 576 * 577 * @param start the lower bound of the range of user groups 578 * @param end the upper bound of the range of user groups (not inclusive) 579 * @return the range of user groups 580 */ 581 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 582 int start, int end) { 583 return getService().getUserGroups(start, end); 584 } 585 586 /** 587 * Returns all the user groups with the primary keys. 588 * 589 * @param userGroupIds the primary keys of the user groups 590 * @return the user groups with the primary keys 591 * @throws PortalException if any one of the user groups could not be found 592 */ 593 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 594 long[] userGroupIds) 595 throws com.liferay.portal.kernel.exception.PortalException { 596 return getService().getUserGroups(userGroupIds); 597 } 598 599 /** 600 * Returns the number of user groups. 601 * 602 * @return the number of user groups 603 */ 604 public static int getUserGroupsCount() { 605 return getService().getUserGroupsCount(); 606 } 607 608 /** 609 * Returns the userIds of the users associated with the user group. 610 * 611 * @param userGroupId the userGroupId of the user group 612 * @return long[] the userIds of users associated with the user group 613 */ 614 public static long[] getUserPrimaryKeys(long userGroupId) { 615 return getService().getUserPrimaryKeys(userGroupId); 616 } 617 618 public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 619 long userId) { 620 return getService().getUserUserGroups(userId); 621 } 622 623 public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 624 long userId, int start, int end) { 625 return getService().getUserUserGroups(userId, start, end); 626 } 627 628 public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 629 long userId, int start, int end, 630 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator) { 631 return getService() 632 .getUserUserGroups(userId, start, end, orderByComparator); 633 } 634 635 public static int getUserUserGroupsCount(long userId) { 636 return getService().getUserUserGroupsCount(userId); 637 } 638 639 public static boolean hasGroupUserGroup(long groupId, long userGroupId) { 640 return getService().hasGroupUserGroup(groupId, userGroupId); 641 } 642 643 public static boolean hasGroupUserGroups(long groupId) { 644 return getService().hasGroupUserGroups(groupId); 645 } 646 647 public static boolean hasTeamUserGroup(long teamId, long userGroupId) { 648 return getService().hasTeamUserGroup(teamId, userGroupId); 649 } 650 651 public static boolean hasTeamUserGroups(long teamId) { 652 return getService().hasTeamUserGroups(teamId); 653 } 654 655 public static boolean hasUserUserGroup(long userId, long userGroupId) { 656 return getService().hasUserUserGroup(userId, userGroupId); 657 } 658 659 public static boolean hasUserUserGroups(long userId) { 660 return getService().hasUserUserGroups(userId); 661 } 662 663 /** 664 * Returns an ordered range of all the user groups that match the keywords. 665 * 666 * <p> 667 * Useful when paginating results. Returns a maximum of <code>end - 668 * start</code> instances. <code>start</code> and <code>end</code> are not 669 * primary keys, they are indexes in the result set. Thus, <code>0</code> 670 * refers to the first result in the set. Setting both <code>start</code> 671 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 672 * result set. 673 * </p> 674 * 675 * @param companyId the primary key of the user group's company 676 * @param keywords the keywords (space separated), which may occur in the 677 user group's name or description (optionally <code>null</code>) 678 * @param params the finder params (optionally <code>null</code>). For more 679 information see {@link 680 com.liferay.portal.service.persistence.UserGroupFinder} 681 * @param start the lower bound of the range of user groups to return 682 * @param end the upper bound of the range of user groups to return (not 683 inclusive) 684 * @param obc the comparator to order the user groups (optionally 685 <code>null</code>) 686 * @return the matching user groups ordered by comparator <code>obc</code> 687 * @see com.liferay.portal.service.persistence.UserGroupFinder 688 */ 689 public static java.util.List<com.liferay.portal.model.UserGroup> search( 690 long companyId, java.lang.String keywords, 691 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 692 int start, int end, 693 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc) { 694 return getService().search(companyId, keywords, params, start, end, obc); 695 } 696 697 /** 698 * Returns an ordered range of all the user groups that match the keywords, 699 * using the indexer. It is preferable to use this method instead of the 700 * non-indexed version whenever possible for performance reasons. 701 * 702 * <p> 703 * Useful when paginating results. Returns a maximum of <code>end - 704 * start</code> instances. <code>start</code> and <code>end</code> are not 705 * primary keys, they are indexes in the result set. Thus, <code>0</code> 706 * refers to the first result in the set. Setting both <code>start</code> 707 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 708 * result set. 709 * </p> 710 * 711 * @param companyId the primary key of the user group's company 712 * @param keywords the keywords (space separated), which may occur in the 713 user group's name or description (optionally <code>null</code>) 714 * @param params the finder params (optionally <code>null</code>). For more 715 information see {@link 716 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 717 * @param start the lower bound of the range of user groups to return 718 * @param end the upper bound of the range of user groups to return (not 719 inclusive) 720 * @param sort the field and direction by which to sort (optionally 721 <code>null</code>) 722 * @return the matching user groups ordered by sort 723 * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer 724 */ 725 public static com.liferay.portal.kernel.search.Hits search(long companyId, 726 java.lang.String keywords, 727 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 728 int start, int end, com.liferay.portal.kernel.search.Sort sort) { 729 return getService().search(companyId, keywords, params, start, end, sort); 730 } 731 732 /** 733 * Returns an ordered range of all the user groups that match the name and 734 * description. 735 * 736 * <p> 737 * Useful when paginating results. Returns a maximum of <code>end - 738 * start</code> instances. <code>start</code> and <code>end</code> are not 739 * primary keys, they are indexes in the result set. Thus, <code>0</code> 740 * refers to the first result in the set. Setting both <code>start</code> 741 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 742 * result set. 743 * </p> 744 * 745 * @param companyId the primary key of the user group's company 746 * @param name the user group's name (optionally <code>null</code>) 747 * @param description the user group's description (optionally 748 <code>null</code>) 749 * @param params the finder params (optionally <code>null</code>). For more 750 information see {@link 751 com.liferay.portal.service.persistence.UserGroupFinder} 752 * @param andOperator whether every field must match its keywords or just 753 one field 754 * @param start the lower bound of the range of user groups to return 755 * @param end the upper bound of the range of user groups to return (not 756 inclusive) 757 * @param obc the comparator to order the user groups (optionally 758 <code>null</code>) 759 * @return the matching user groups ordered by comparator <code>obc</code> 760 * @see com.liferay.portal.service.persistence.UserGroupFinder 761 */ 762 public static java.util.List<com.liferay.portal.model.UserGroup> search( 763 long companyId, java.lang.String name, java.lang.String description, 764 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 765 boolean andOperator, int start, int end, 766 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc) { 767 return getService() 768 .search(companyId, name, description, params, andOperator, 769 start, end, obc); 770 } 771 772 /** 773 * Returns an ordered range of all the user groups that match the name and 774 * description. It is preferable to use this method instead of the 775 * non-indexed version whenever possible for performance reasons. 776 * 777 * <p> 778 * Useful when paginating results. Returns a maximum of <code>end - 779 * start</code> instances. <code>start</code> and <code>end</code> are not 780 * primary keys, they are indexes in the result set. Thus, <code>0</code> 781 * refers to the first result in the set. Setting both <code>start</code> 782 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 783 * result set. 784 * </p> 785 * 786 * @param companyId the primary key of the user group's company 787 * @param name the user group's name (optionally <code>null</code>) 788 * @param description the user group's description (optionally 789 <code>null</code>) 790 * @param params the finder params (optionally <code>null</code>). For more 791 information see {@link 792 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 793 * @param andSearch whether every field must match its keywords or just one 794 field 795 * @param start the lower bound of the range of user groups to return 796 * @param end the upper bound of the range of user groups to return (not 797 inclusive) 798 * @param sort the field and direction by which to sort (optionally 799 <code>null</code>) 800 * @return the matching user groups ordered by sort 801 * @see com.liferay.portal.service.persistence.UserGroupFinder 802 */ 803 public static com.liferay.portal.kernel.search.Hits search(long companyId, 804 java.lang.String name, java.lang.String description, 805 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 806 boolean andSearch, int start, int end, 807 com.liferay.portal.kernel.search.Sort sort) { 808 return getService() 809 .search(companyId, name, description, params, andSearch, 810 start, end, sort); 811 } 812 813 /** 814 * Returns the number of user groups that match the keywords 815 * 816 * @param companyId the primary key of the user group's company 817 * @param keywords the keywords (space separated), which may occur in the 818 user group's name or description (optionally <code>null</code>) 819 * @param params the finder params (optionally <code>null</code>). For more 820 information see {@link 821 com.liferay.portal.service.persistence.UserGroupFinder} 822 * @return the number of matching user groups 823 * @see com.liferay.portal.service.persistence.UserGroupFinder 824 */ 825 public static int searchCount(long companyId, java.lang.String keywords, 826 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 827 return getService().searchCount(companyId, keywords, params); 828 } 829 830 /** 831 * Returns the number of user groups that match the name and description. 832 * 833 * @param companyId the primary key of the user group's company 834 * @param name the user group's name (optionally <code>null</code>) 835 * @param description the user group's description (optionally 836 <code>null</code>) 837 * @param params the finder params (optionally <code>null</code>). For more 838 information see {@link 839 com.liferay.portal.service.persistence.UserGroupFinder} 840 * @param andOperator whether every field must match its keywords or just 841 one field 842 * @return the number of matching user groups 843 * @see com.liferay.portal.service.persistence.UserGroupFinder 844 */ 845 public static int searchCount(long companyId, java.lang.String name, 846 java.lang.String description, 847 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 848 boolean andOperator) { 849 return getService() 850 .searchCount(companyId, name, description, params, 851 andOperator); 852 } 853 854 public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.UserGroup> searchUserGroups( 855 long companyId, java.lang.String keywords, 856 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 857 int start, int end, com.liferay.portal.kernel.search.Sort sort) 858 throws com.liferay.portal.kernel.exception.PortalException { 859 return getService() 860 .searchUserGroups(companyId, keywords, params, start, end, 861 sort); 862 } 863 864 public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.UserGroup> searchUserGroups( 865 long companyId, java.lang.String name, java.lang.String description, 866 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 867 boolean andSearch, int start, int end, 868 com.liferay.portal.kernel.search.Sort sort) 869 throws com.liferay.portal.kernel.exception.PortalException { 870 return getService() 871 .searchUserGroups(companyId, name, description, params, 872 andSearch, start, end, sort); 873 } 874 875 /** 876 * Sets the Spring bean ID for this bean. 877 * 878 * @param beanIdentifier the Spring bean ID for this bean 879 */ 880 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 881 getService().setBeanIdentifier(beanIdentifier); 882 } 883 884 public static void setGroupUserGroups(long groupId, long[] userGroupIds) { 885 getService().setGroupUserGroups(groupId, userGroupIds); 886 } 887 888 public static void setTeamUserGroups(long teamId, long[] userGroupIds) { 889 getService().setTeamUserGroups(teamId, userGroupIds); 890 } 891 892 /** 893 * @throws PortalException 894 */ 895 public static void setUserUserGroups(long userId, long[] userGroupIds) 896 throws com.liferay.portal.kernel.exception.PortalException { 897 getService().setUserUserGroups(userId, userGroupIds); 898 } 899 900 /** 901 * Removes the user groups from the group. 902 * 903 * @param groupId the primary key of the group 904 * @param userGroupIds the primary keys of the user groups 905 */ 906 public static void unsetGroupUserGroups(long groupId, long[] userGroupIds) { 907 getService().unsetGroupUserGroups(groupId, userGroupIds); 908 } 909 910 /** 911 * Removes the user groups from the team. 912 * 913 * @param teamId the primary key of the team 914 * @param userGroupIds the primary keys of the user groups 915 */ 916 public static void unsetTeamUserGroups(long teamId, long[] userGroupIds) { 917 getService().unsetTeamUserGroups(teamId, userGroupIds); 918 } 919 920 /** 921 * Updates the user group. 922 * 923 * @param companyId the primary key of the user group's company 924 * @param userGroupId the primary key of the user group 925 * @param name the user group's name 926 * @param description the user group's description 927 * @return the user group 928 * @throws PortalException if a user group with the primary key could 929 not be found or if the new information was invalid 930 * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, long, 931 String, String, ServiceContext)} 932 */ 933 @Deprecated 934 public static com.liferay.portal.model.UserGroup updateUserGroup( 935 long companyId, long userGroupId, java.lang.String name, 936 java.lang.String description) 937 throws com.liferay.portal.kernel.exception.PortalException { 938 return getService() 939 .updateUserGroup(companyId, userGroupId, name, description); 940 } 941 942 /** 943 * Updates the user group. 944 * 945 * @param companyId the primary key of the user group's company 946 * @param userGroupId the primary key of the user group 947 * @param name the user group's name 948 * @param description the user group's description 949 * @param serviceContext the service context to be applied (optionally 950 <code>null</code>). Can set expando bridge attributes for the 951 user group. 952 * @return the user group 953 * @throws PortalException if a user group with the primary key could not be 954 found or if the new information was invalid 955 */ 956 public static com.liferay.portal.model.UserGroup updateUserGroup( 957 long companyId, long userGroupId, java.lang.String name, 958 java.lang.String description, 959 com.liferay.portal.service.ServiceContext serviceContext) 960 throws com.liferay.portal.kernel.exception.PortalException { 961 return getService() 962 .updateUserGroup(companyId, userGroupId, name, description, 963 serviceContext); 964 } 965 966 /** 967 * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 968 * 969 * @param userGroup the user group 970 * @return the user group that was updated 971 */ 972 public static com.liferay.portal.model.UserGroup updateUserGroup( 973 com.liferay.portal.model.UserGroup userGroup) { 974 return getService().updateUserGroup(userGroup); 975 } 976 977 public static UserGroupLocalService getService() { 978 if (_service == null) { 979 _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName()); 980 981 ReferenceRegistry.registerReference(UserGroupLocalServiceUtil.class, 982 "_service"); 983 } 984 985 return _service; 986 } 987 988 /** 989 * @deprecated As of 6.2.0 990 */ 991 @Deprecated 992 public void setService(UserGroupLocalService service) { 993 } 994 995 private static UserGroupLocalService _service; 996 }