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