001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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 Group. This utility wraps 024 * {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} 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 GroupLocalService 032 * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.GroupLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class GroupLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the group to the database. Also notifies the appropriate model listeners. 046 * 047 * @param group the group 048 * @return the group that was added 049 * @throws SystemException if a system exception occurred 050 */ 051 public static com.liferay.portal.model.Group addGroup( 052 com.liferay.portal.model.Group group) 053 throws com.liferay.portal.kernel.exception.SystemException { 054 return getService().addGroup(group); 055 } 056 057 /** 058 * Creates a new group with the primary key. Does not add the group to the database. 059 * 060 * @param groupId the primary key for the new group 061 * @return the new group 062 */ 063 public static com.liferay.portal.model.Group createGroup(long groupId) { 064 return getService().createGroup(groupId); 065 } 066 067 /** 068 * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners. 069 * 070 * @param groupId the primary key of the group 071 * @return the group that was removed 072 * @throws PortalException if a group with the primary key could not be found 073 * @throws SystemException if a system exception occurred 074 */ 075 public static com.liferay.portal.model.Group deleteGroup(long groupId) 076 throws com.liferay.portal.kernel.exception.PortalException, 077 com.liferay.portal.kernel.exception.SystemException { 078 return getService().deleteGroup(groupId); 079 } 080 081 /** 082 * Deletes the group from the database. Also notifies the appropriate model listeners. 083 * 084 * @param group the group 085 * @return the group that was removed 086 * @throws PortalException 087 * @throws SystemException if a system exception occurred 088 */ 089 public static com.liferay.portal.model.Group deleteGroup( 090 com.liferay.portal.model.Group group) 091 throws com.liferay.portal.kernel.exception.PortalException, 092 com.liferay.portal.kernel.exception.SystemException { 093 return getService().deleteGroup(group); 094 } 095 096 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 097 return getService().dynamicQuery(); 098 } 099 100 /** 101 * Performs a dynamic query on the database and returns the matching rows. 102 * 103 * @param dynamicQuery the dynamic query 104 * @return the matching rows 105 * @throws SystemException if a system exception occurred 106 */ 107 @SuppressWarnings("rawtypes") 108 public static java.util.List dynamicQuery( 109 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 110 throws com.liferay.portal.kernel.exception.SystemException { 111 return getService().dynamicQuery(dynamicQuery); 112 } 113 114 /** 115 * Performs a dynamic query on the database and returns a range of the matching rows. 116 * 117 * <p> 118 * 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.GroupModelImpl}. 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. 119 * </p> 120 * 121 * @param dynamicQuery the dynamic query 122 * @param start the lower bound of the range of model instances 123 * @param end the upper bound of the range of model instances (not inclusive) 124 * @return the range of matching rows 125 * @throws SystemException if a system exception occurred 126 */ 127 @SuppressWarnings("rawtypes") 128 public static java.util.List dynamicQuery( 129 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 130 int end) throws com.liferay.portal.kernel.exception.SystemException { 131 return getService().dynamicQuery(dynamicQuery, start, end); 132 } 133 134 /** 135 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 136 * 137 * <p> 138 * 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.GroupModelImpl}. 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. 139 * </p> 140 * 141 * @param dynamicQuery the dynamic query 142 * @param start the lower bound of the range of model instances 143 * @param end the upper bound of the range of model instances (not inclusive) 144 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 145 * @return the ordered range of matching rows 146 * @throws SystemException if a system exception occurred 147 */ 148 @SuppressWarnings("rawtypes") 149 public static java.util.List dynamicQuery( 150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 151 int end, 152 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 153 throws com.liferay.portal.kernel.exception.SystemException { 154 return getService() 155 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 156 } 157 158 /** 159 * Returns the number of rows that match the dynamic query. 160 * 161 * @param dynamicQuery the dynamic query 162 * @return the number of rows that match the dynamic query 163 * @throws SystemException if a system exception occurred 164 */ 165 public static long dynamicQueryCount( 166 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 167 throws com.liferay.portal.kernel.exception.SystemException { 168 return getService().dynamicQueryCount(dynamicQuery); 169 } 170 171 /** 172 * Returns the number of rows that match the dynamic query. 173 * 174 * @param dynamicQuery the dynamic query 175 * @param projection the projection to apply to the query 176 * @return the number of rows that match the dynamic query 177 * @throws SystemException if a system exception occurred 178 */ 179 public static long dynamicQueryCount( 180 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 181 com.liferay.portal.kernel.dao.orm.Projection projection) 182 throws com.liferay.portal.kernel.exception.SystemException { 183 return getService().dynamicQueryCount(dynamicQuery, projection); 184 } 185 186 public static com.liferay.portal.model.Group fetchGroup(long groupId) 187 throws com.liferay.portal.kernel.exception.SystemException { 188 return getService().fetchGroup(groupId); 189 } 190 191 /** 192 * Returns the group with the matching UUID and company. 193 * 194 * @param uuid the group's UUID 195 * @param companyId the primary key of the company 196 * @return the matching group, or <code>null</code> if a matching group could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public static com.liferay.portal.model.Group fetchGroupByUuidAndCompanyId( 200 java.lang.String uuid, long companyId) 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return getService().fetchGroupByUuidAndCompanyId(uuid, companyId); 203 } 204 205 /** 206 * Returns the group with the primary key. 207 * 208 * @param groupId the primary key of the group 209 * @return the group 210 * @throws PortalException if a 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.Group getGroup(long groupId) 214 throws com.liferay.portal.kernel.exception.PortalException, 215 com.liferay.portal.kernel.exception.SystemException { 216 return getService().getGroup(groupId); 217 } 218 219 public static com.liferay.portal.model.PersistedModel getPersistedModel( 220 java.io.Serializable primaryKeyObj) 221 throws com.liferay.portal.kernel.exception.PortalException, 222 com.liferay.portal.kernel.exception.SystemException { 223 return getService().getPersistedModel(primaryKeyObj); 224 } 225 226 /** 227 * Returns the group with the matching UUID and company. 228 * 229 * @param uuid the group's UUID 230 * @param companyId the primary key of the company 231 * @return the matching group 232 * @throws PortalException if a matching group could not be found 233 * @throws SystemException if a system exception occurred 234 */ 235 public static com.liferay.portal.model.Group getGroupByUuidAndCompanyId( 236 java.lang.String uuid, long companyId) 237 throws com.liferay.portal.kernel.exception.PortalException, 238 com.liferay.portal.kernel.exception.SystemException { 239 return getService().getGroupByUuidAndCompanyId(uuid, companyId); 240 } 241 242 /** 243 * Returns a range of all the groups. 244 * 245 * <p> 246 * 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.GroupModelImpl}. 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. 247 * </p> 248 * 249 * @param start the lower bound of the range of groups 250 * @param end the upper bound of the range of groups (not inclusive) 251 * @return the range of groups 252 * @throws SystemException if a system exception occurred 253 */ 254 public static java.util.List<com.liferay.portal.model.Group> getGroups( 255 int start, int end) 256 throws com.liferay.portal.kernel.exception.SystemException { 257 return getService().getGroups(start, end); 258 } 259 260 /** 261 * Returns the number of groups. 262 * 263 * @return the number of groups 264 * @throws SystemException if a system exception occurred 265 */ 266 public static int getGroupsCount() 267 throws com.liferay.portal.kernel.exception.SystemException { 268 return getService().getGroupsCount(); 269 } 270 271 /** 272 * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 273 * 274 * @param group the group 275 * @return the group that was updated 276 * @throws SystemException if a system exception occurred 277 */ 278 public static com.liferay.portal.model.Group updateGroup( 279 com.liferay.portal.model.Group group) 280 throws com.liferay.portal.kernel.exception.SystemException { 281 return getService().updateGroup(group); 282 } 283 284 /** 285 * @throws SystemException if a system exception occurred 286 */ 287 public static void addOrganizationGroup(long organizationId, long groupId) 288 throws com.liferay.portal.kernel.exception.SystemException { 289 getService().addOrganizationGroup(organizationId, groupId); 290 } 291 292 /** 293 * @throws SystemException if a system exception occurred 294 */ 295 public static void addOrganizationGroup(long organizationId, 296 com.liferay.portal.model.Group group) 297 throws com.liferay.portal.kernel.exception.SystemException { 298 getService().addOrganizationGroup(organizationId, group); 299 } 300 301 /** 302 * @throws SystemException if a system exception occurred 303 */ 304 public static void addOrganizationGroups(long organizationId, 305 long[] groupIds) 306 throws com.liferay.portal.kernel.exception.SystemException { 307 getService().addOrganizationGroups(organizationId, groupIds); 308 } 309 310 /** 311 * @throws SystemException if a system exception occurred 312 */ 313 public static void addOrganizationGroups(long organizationId, 314 java.util.List<com.liferay.portal.model.Group> Groups) 315 throws com.liferay.portal.kernel.exception.SystemException { 316 getService().addOrganizationGroups(organizationId, Groups); 317 } 318 319 /** 320 * @throws SystemException if a system exception occurred 321 */ 322 public static void clearOrganizationGroups(long organizationId) 323 throws com.liferay.portal.kernel.exception.SystemException { 324 getService().clearOrganizationGroups(organizationId); 325 } 326 327 /** 328 * @throws SystemException if a system exception occurred 329 */ 330 public static void deleteOrganizationGroup(long organizationId, long groupId) 331 throws com.liferay.portal.kernel.exception.SystemException { 332 getService().deleteOrganizationGroup(organizationId, groupId); 333 } 334 335 /** 336 * @throws SystemException if a system exception occurred 337 */ 338 public static void deleteOrganizationGroup(long organizationId, 339 com.liferay.portal.model.Group group) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 getService().deleteOrganizationGroup(organizationId, group); 342 } 343 344 /** 345 * @throws SystemException if a system exception occurred 346 */ 347 public static void deleteOrganizationGroups(long organizationId, 348 long[] groupIds) 349 throws com.liferay.portal.kernel.exception.SystemException { 350 getService().deleteOrganizationGroups(organizationId, groupIds); 351 } 352 353 /** 354 * @throws SystemException if a system exception occurred 355 */ 356 public static void deleteOrganizationGroups(long organizationId, 357 java.util.List<com.liferay.portal.model.Group> Groups) 358 throws com.liferay.portal.kernel.exception.SystemException { 359 getService().deleteOrganizationGroups(organizationId, Groups); 360 } 361 362 /** 363 * @throws SystemException if a system exception occurred 364 */ 365 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 366 long organizationId) 367 throws com.liferay.portal.kernel.exception.SystemException { 368 return getService().getOrganizationGroups(organizationId); 369 } 370 371 /** 372 * @throws SystemException if a system exception occurred 373 */ 374 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 375 long organizationId, int start, int end) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return getService().getOrganizationGroups(organizationId, start, end); 378 } 379 380 /** 381 * @throws SystemException if a system exception occurred 382 */ 383 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 384 long organizationId, int start, int end, 385 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 386 throws com.liferay.portal.kernel.exception.SystemException { 387 return getService() 388 .getOrganizationGroups(organizationId, start, end, 389 orderByComparator); 390 } 391 392 /** 393 * @throws SystemException if a system exception occurred 394 */ 395 public static int getOrganizationGroupsCount(long organizationId) 396 throws com.liferay.portal.kernel.exception.SystemException { 397 return getService().getOrganizationGroupsCount(organizationId); 398 } 399 400 /** 401 * @throws SystemException if a system exception occurred 402 */ 403 public static boolean hasOrganizationGroup(long organizationId, long groupId) 404 throws com.liferay.portal.kernel.exception.SystemException { 405 return getService().hasOrganizationGroup(organizationId, groupId); 406 } 407 408 /** 409 * @throws SystemException if a system exception occurred 410 */ 411 public static boolean hasOrganizationGroups(long organizationId) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getService().hasOrganizationGroups(organizationId); 414 } 415 416 /** 417 * @throws SystemException if a system exception occurred 418 */ 419 public static void setOrganizationGroups(long organizationId, 420 long[] groupIds) 421 throws com.liferay.portal.kernel.exception.SystemException { 422 getService().setOrganizationGroups(organizationId, groupIds); 423 } 424 425 /** 426 * @throws SystemException if a system exception occurred 427 */ 428 public static void addRoleGroup(long roleId, long groupId) 429 throws com.liferay.portal.kernel.exception.SystemException { 430 getService().addRoleGroup(roleId, groupId); 431 } 432 433 /** 434 * @throws SystemException if a system exception occurred 435 */ 436 public static void addRoleGroup(long roleId, 437 com.liferay.portal.model.Group group) 438 throws com.liferay.portal.kernel.exception.SystemException { 439 getService().addRoleGroup(roleId, group); 440 } 441 442 /** 443 * @throws SystemException if a system exception occurred 444 */ 445 public static void addRoleGroups(long roleId, long[] groupIds) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 getService().addRoleGroups(roleId, groupIds); 448 } 449 450 /** 451 * @throws SystemException if a system exception occurred 452 */ 453 public static void addRoleGroups(long roleId, 454 java.util.List<com.liferay.portal.model.Group> Groups) 455 throws com.liferay.portal.kernel.exception.SystemException { 456 getService().addRoleGroups(roleId, Groups); 457 } 458 459 /** 460 * @throws SystemException if a system exception occurred 461 */ 462 public static void clearRoleGroups(long roleId) 463 throws com.liferay.portal.kernel.exception.SystemException { 464 getService().clearRoleGroups(roleId); 465 } 466 467 /** 468 * @throws SystemException if a system exception occurred 469 */ 470 public static void deleteRoleGroup(long roleId, long groupId) 471 throws com.liferay.portal.kernel.exception.SystemException { 472 getService().deleteRoleGroup(roleId, groupId); 473 } 474 475 /** 476 * @throws SystemException if a system exception occurred 477 */ 478 public static void deleteRoleGroup(long roleId, 479 com.liferay.portal.model.Group group) 480 throws com.liferay.portal.kernel.exception.SystemException { 481 getService().deleteRoleGroup(roleId, group); 482 } 483 484 /** 485 * @throws SystemException if a system exception occurred 486 */ 487 public static void deleteRoleGroups(long roleId, long[] groupIds) 488 throws com.liferay.portal.kernel.exception.SystemException { 489 getService().deleteRoleGroups(roleId, groupIds); 490 } 491 492 /** 493 * @throws SystemException if a system exception occurred 494 */ 495 public static void deleteRoleGroups(long roleId, 496 java.util.List<com.liferay.portal.model.Group> Groups) 497 throws com.liferay.portal.kernel.exception.SystemException { 498 getService().deleteRoleGroups(roleId, Groups); 499 } 500 501 /** 502 * @throws SystemException if a system exception occurred 503 */ 504 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 505 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 506 return getService().getRoleGroups(roleId); 507 } 508 509 /** 510 * @throws SystemException if a system exception occurred 511 */ 512 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 513 long roleId, int start, int end) 514 throws com.liferay.portal.kernel.exception.SystemException { 515 return getService().getRoleGroups(roleId, start, end); 516 } 517 518 /** 519 * @throws SystemException if a system exception occurred 520 */ 521 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 522 long roleId, int start, int end, 523 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 524 throws com.liferay.portal.kernel.exception.SystemException { 525 return getService().getRoleGroups(roleId, start, end, orderByComparator); 526 } 527 528 /** 529 * @throws SystemException if a system exception occurred 530 */ 531 public static int getRoleGroupsCount(long roleId) 532 throws com.liferay.portal.kernel.exception.SystemException { 533 return getService().getRoleGroupsCount(roleId); 534 } 535 536 /** 537 * @throws SystemException if a system exception occurred 538 */ 539 public static boolean hasRoleGroup(long roleId, long groupId) 540 throws com.liferay.portal.kernel.exception.SystemException { 541 return getService().hasRoleGroup(roleId, groupId); 542 } 543 544 /** 545 * @throws SystemException if a system exception occurred 546 */ 547 public static boolean hasRoleGroups(long roleId) 548 throws com.liferay.portal.kernel.exception.SystemException { 549 return getService().hasRoleGroups(roleId); 550 } 551 552 /** 553 * @throws SystemException if a system exception occurred 554 */ 555 public static void setRoleGroups(long roleId, long[] groupIds) 556 throws com.liferay.portal.kernel.exception.SystemException { 557 getService().setRoleGroups(roleId, groupIds); 558 } 559 560 /** 561 * @throws SystemException if a system exception occurred 562 */ 563 public static void addUserGroupGroup(long userGroupId, long groupId) 564 throws com.liferay.portal.kernel.exception.SystemException { 565 getService().addUserGroupGroup(userGroupId, groupId); 566 } 567 568 /** 569 * @throws SystemException if a system exception occurred 570 */ 571 public static void addUserGroupGroup(long userGroupId, 572 com.liferay.portal.model.Group group) 573 throws com.liferay.portal.kernel.exception.SystemException { 574 getService().addUserGroupGroup(userGroupId, group); 575 } 576 577 /** 578 * @throws SystemException if a system exception occurred 579 */ 580 public static void addUserGroupGroups(long userGroupId, long[] groupIds) 581 throws com.liferay.portal.kernel.exception.SystemException { 582 getService().addUserGroupGroups(userGroupId, groupIds); 583 } 584 585 /** 586 * @throws SystemException if a system exception occurred 587 */ 588 public static void addUserGroupGroups(long userGroupId, 589 java.util.List<com.liferay.portal.model.Group> Groups) 590 throws com.liferay.portal.kernel.exception.SystemException { 591 getService().addUserGroupGroups(userGroupId, Groups); 592 } 593 594 /** 595 * @throws SystemException if a system exception occurred 596 */ 597 public static void clearUserGroupGroups(long userGroupId) 598 throws com.liferay.portal.kernel.exception.SystemException { 599 getService().clearUserGroupGroups(userGroupId); 600 } 601 602 /** 603 * @throws SystemException if a system exception occurred 604 */ 605 public static void deleteUserGroupGroup(long userGroupId, long groupId) 606 throws com.liferay.portal.kernel.exception.SystemException { 607 getService().deleteUserGroupGroup(userGroupId, groupId); 608 } 609 610 /** 611 * @throws SystemException if a system exception occurred 612 */ 613 public static void deleteUserGroupGroup(long userGroupId, 614 com.liferay.portal.model.Group group) 615 throws com.liferay.portal.kernel.exception.SystemException { 616 getService().deleteUserGroupGroup(userGroupId, group); 617 } 618 619 /** 620 * @throws SystemException if a system exception occurred 621 */ 622 public static void deleteUserGroupGroups(long userGroupId, long[] groupIds) 623 throws com.liferay.portal.kernel.exception.SystemException { 624 getService().deleteUserGroupGroups(userGroupId, groupIds); 625 } 626 627 /** 628 * @throws SystemException if a system exception occurred 629 */ 630 public static void deleteUserGroupGroups(long userGroupId, 631 java.util.List<com.liferay.portal.model.Group> Groups) 632 throws com.liferay.portal.kernel.exception.SystemException { 633 getService().deleteUserGroupGroups(userGroupId, Groups); 634 } 635 636 /** 637 * @throws SystemException if a system exception occurred 638 */ 639 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 640 long userGroupId) 641 throws com.liferay.portal.kernel.exception.SystemException { 642 return getService().getUserGroupGroups(userGroupId); 643 } 644 645 /** 646 * @throws SystemException if a system exception occurred 647 */ 648 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 649 long userGroupId, int start, int end) 650 throws com.liferay.portal.kernel.exception.SystemException { 651 return getService().getUserGroupGroups(userGroupId, start, end); 652 } 653 654 /** 655 * @throws SystemException if a system exception occurred 656 */ 657 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 658 long userGroupId, int start, int end, 659 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 660 throws com.liferay.portal.kernel.exception.SystemException { 661 return getService() 662 .getUserGroupGroups(userGroupId, start, end, 663 orderByComparator); 664 } 665 666 /** 667 * @throws SystemException if a system exception occurred 668 */ 669 public static int getUserGroupGroupsCount(long userGroupId) 670 throws com.liferay.portal.kernel.exception.SystemException { 671 return getService().getUserGroupGroupsCount(userGroupId); 672 } 673 674 /** 675 * @throws SystemException if a system exception occurred 676 */ 677 public static boolean hasUserGroupGroup(long userGroupId, long groupId) 678 throws com.liferay.portal.kernel.exception.SystemException { 679 return getService().hasUserGroupGroup(userGroupId, groupId); 680 } 681 682 /** 683 * @throws SystemException if a system exception occurred 684 */ 685 public static boolean hasUserGroupGroups(long userGroupId) 686 throws com.liferay.portal.kernel.exception.SystemException { 687 return getService().hasUserGroupGroups(userGroupId); 688 } 689 690 /** 691 * @throws SystemException if a system exception occurred 692 */ 693 public static void setUserGroupGroups(long userGroupId, long[] groupIds) 694 throws com.liferay.portal.kernel.exception.SystemException { 695 getService().setUserGroupGroups(userGroupId, groupIds); 696 } 697 698 /** 699 * @throws SystemException if a system exception occurred 700 */ 701 public static void addUserGroup(long userId, long groupId) 702 throws com.liferay.portal.kernel.exception.SystemException { 703 getService().addUserGroup(userId, groupId); 704 } 705 706 /** 707 * @throws SystemException if a system exception occurred 708 */ 709 public static void addUserGroup(long userId, 710 com.liferay.portal.model.Group group) 711 throws com.liferay.portal.kernel.exception.SystemException { 712 getService().addUserGroup(userId, group); 713 } 714 715 /** 716 * @throws SystemException if a system exception occurred 717 */ 718 public static void addUserGroups(long userId, long[] groupIds) 719 throws com.liferay.portal.kernel.exception.SystemException { 720 getService().addUserGroups(userId, groupIds); 721 } 722 723 /** 724 * @throws SystemException if a system exception occurred 725 */ 726 public static void addUserGroups(long userId, 727 java.util.List<com.liferay.portal.model.Group> Groups) 728 throws com.liferay.portal.kernel.exception.SystemException { 729 getService().addUserGroups(userId, Groups); 730 } 731 732 /** 733 * @throws SystemException if a system exception occurred 734 */ 735 public static void clearUserGroups(long userId) 736 throws com.liferay.portal.kernel.exception.SystemException { 737 getService().clearUserGroups(userId); 738 } 739 740 /** 741 * @throws SystemException if a system exception occurred 742 */ 743 public static void deleteUserGroup(long userId, long groupId) 744 throws com.liferay.portal.kernel.exception.SystemException { 745 getService().deleteUserGroup(userId, groupId); 746 } 747 748 /** 749 * @throws SystemException if a system exception occurred 750 */ 751 public static void deleteUserGroup(long userId, 752 com.liferay.portal.model.Group group) 753 throws com.liferay.portal.kernel.exception.SystemException { 754 getService().deleteUserGroup(userId, group); 755 } 756 757 /** 758 * @throws SystemException if a system exception occurred 759 */ 760 public static void deleteUserGroups(long userId, long[] groupIds) 761 throws com.liferay.portal.kernel.exception.SystemException { 762 getService().deleteUserGroups(userId, groupIds); 763 } 764 765 /** 766 * @throws SystemException if a system exception occurred 767 */ 768 public static void deleteUserGroups(long userId, 769 java.util.List<com.liferay.portal.model.Group> Groups) 770 throws com.liferay.portal.kernel.exception.SystemException { 771 getService().deleteUserGroups(userId, Groups); 772 } 773 774 /** 775 * @throws SystemException if a system exception occurred 776 */ 777 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 778 long userId) throws com.liferay.portal.kernel.exception.SystemException { 779 return getService().getUserGroups(userId); 780 } 781 782 /** 783 * @throws SystemException if a system exception occurred 784 */ 785 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 786 long userId, int start, int end) 787 throws com.liferay.portal.kernel.exception.SystemException { 788 return getService().getUserGroups(userId, start, end); 789 } 790 791 /** 792 * @throws PortalException 793 * @throws SystemException if a system exception occurred 794 */ 795 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 796 long userId, int start, int end, 797 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 798 throws com.liferay.portal.kernel.exception.PortalException, 799 com.liferay.portal.kernel.exception.SystemException { 800 return getService().getUserGroups(userId, start, end, orderByComparator); 801 } 802 803 /** 804 * @throws SystemException if a system exception occurred 805 */ 806 public static int getUserGroupsCount(long userId) 807 throws com.liferay.portal.kernel.exception.SystemException { 808 return getService().getUserGroupsCount(userId); 809 } 810 811 /** 812 * @throws SystemException if a system exception occurred 813 */ 814 public static boolean hasUserGroup(long userId, long groupId) 815 throws com.liferay.portal.kernel.exception.SystemException { 816 return getService().hasUserGroup(userId, groupId); 817 } 818 819 /** 820 * @throws SystemException if a system exception occurred 821 */ 822 public static boolean hasUserGroups(long userId) 823 throws com.liferay.portal.kernel.exception.SystemException { 824 return getService().hasUserGroups(userId); 825 } 826 827 /** 828 * @throws SystemException if a system exception occurred 829 */ 830 public static void setUserGroups(long userId, long[] groupIds) 831 throws com.liferay.portal.kernel.exception.SystemException { 832 getService().setUserGroups(userId, groupIds); 833 } 834 835 /** 836 * Returns the Spring bean ID for this bean. 837 * 838 * @return the Spring bean ID for this bean 839 */ 840 public static java.lang.String getBeanIdentifier() { 841 return getService().getBeanIdentifier(); 842 } 843 844 /** 845 * Sets the Spring bean ID for this bean. 846 * 847 * @param beanIdentifier the Spring bean ID for this bean 848 */ 849 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 850 getService().setBeanIdentifier(beanIdentifier); 851 } 852 853 /** 854 * Adds a group. 855 * 856 * @param userId the primary key of the group's creator/owner 857 * @param parentGroupId the primary key of the parent group 858 * @param className the entity's class name 859 * @param classPK the primary key of the entity's instance 860 * @param liveGroupId the primary key of the live group 861 * @param name the entity's name 862 * @param description the group's description (optionally 863 <code>null</code>) 864 * @param type the group's type. For more information see {@link 865 com.liferay.portal.model.GroupConstants} 866 * @param friendlyURL the group's friendlyURL (optionally 867 <code>null</code>) 868 * @param site whether the group is to be associated with a main site 869 * @param active whether the group is active 870 * @param serviceContext the service context to be applied (optionally 871 <code>null</code>). Can set asset category IDs and asset tag 872 names for the group, and whether the group is for staging. 873 * @return the group 874 * @throws PortalException if a creator could not be found, if the group's 875 information was invalid, if a layout could not be found, or if a 876 valid friendly URL could not be created for the group 877 * @throws SystemException if a system exception occurred 878 */ 879 public static com.liferay.portal.model.Group addGroup(long userId, 880 long parentGroupId, java.lang.String className, long classPK, 881 long liveGroupId, java.lang.String name, java.lang.String description, 882 int type, boolean manualMembership, int membershipRestriction, 883 java.lang.String friendlyURL, boolean site, boolean active, 884 com.liferay.portal.service.ServiceContext serviceContext) 885 throws com.liferay.portal.kernel.exception.PortalException, 886 com.liferay.portal.kernel.exception.SystemException { 887 return getService() 888 .addGroup(userId, parentGroupId, className, classPK, 889 liveGroupId, name, description, type, manualMembership, 890 membershipRestriction, friendlyURL, site, active, serviceContext); 891 } 892 893 /** 894 * Adds the group using the default live group. 895 * 896 * @param userId the primary key of the group's creator/owner 897 * @param parentGroupId the primary key of the parent group 898 * @param className the entity's class name 899 * @param classPK the primary key of the entity's instance 900 * @param name the entity's name 901 * @param description the group's description (optionally 902 <code>null</code>) 903 * @param type the group's type. For more information see {@link 904 com.liferay.portal.model.GroupConstants} 905 * @param friendlyURL the group's friendlyURL 906 * @param site whether the group is to be associated with a main site 907 * @param active whether the group is active 908 * @param serviceContext the service context to be applied (optionally 909 <code>null</code>). Can set asset category IDs and asset tag 910 names for the group, and whether the group is for staging. 911 * @return the group 912 * @throws PortalException if a creator could not be found, if the 913 group's information was invalid, if a layout could not be 914 found, or if a valid friendly URL could not be created for 915 the group 916 * @throws SystemException if a system exception occurred 917 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String, 918 long, long, String, String, int, boolean, int, String, 919 boolean, boolean, ServiceContext)} 920 */ 921 public static com.liferay.portal.model.Group addGroup(long userId, 922 long parentGroupId, java.lang.String className, long classPK, 923 java.lang.String name, java.lang.String description, int type, 924 java.lang.String friendlyURL, boolean site, boolean active, 925 com.liferay.portal.service.ServiceContext serviceContext) 926 throws com.liferay.portal.kernel.exception.PortalException, 927 com.liferay.portal.kernel.exception.SystemException { 928 return getService() 929 .addGroup(userId, parentGroupId, className, classPK, name, 930 description, type, friendlyURL, site, active, serviceContext); 931 } 932 933 /** 934 * Adds a group. 935 * 936 * @param userId the primary key of the group's creator/owner 937 * @param className the entity's class name 938 * @param classPK the primary key of the entity's instance 939 * @param liveGroupId the primary key of the live group 940 * @param name the entity's name 941 * @param description the group's description (optionally 942 <code>null</code>) 943 * @param type the group's type. For more information see {@link 944 com.liferay.portal.model.GroupConstants} 945 * @param friendlyURL the group's friendlyURL (optionally 946 <code>null</code>) 947 * @param site whether the group is to be associated with a main site 948 * @param active whether the group is active 949 * @param serviceContext the service context to be applied (optionally 950 <code>null</code>). Can set asset category IDs and asset tag 951 names for the group, and whether the group is for staging. 952 * @return the group 953 * @throws PortalException if a creator could not be found, if the 954 group's information was invalid, if a layout could not be 955 found, or if a valid friendly URL could not be created for 956 the group 957 * @throws SystemException if a system exception occurred 958 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String, 959 long, long, String, String, int, boolean, int, String, 960 boolean, boolean, ServiceContext)} 961 */ 962 public static com.liferay.portal.model.Group addGroup(long userId, 963 java.lang.String className, long classPK, long liveGroupId, 964 java.lang.String name, java.lang.String description, int type, 965 java.lang.String friendlyURL, boolean site, boolean active, 966 com.liferay.portal.service.ServiceContext serviceContext) 967 throws com.liferay.portal.kernel.exception.PortalException, 968 com.liferay.portal.kernel.exception.SystemException { 969 return getService() 970 .addGroup(userId, className, classPK, liveGroupId, name, 971 description, type, friendlyURL, site, active, serviceContext); 972 } 973 974 /** 975 * Adds the group using the default live group. 976 * 977 * @param userId the primary key of the group's creator/owner 978 * @param className the entity's class name 979 * @param classPK the primary key of the entity's instance 980 * @param name the entity's name 981 * @param description the group's description (optionally 982 <code>null</code>) 983 * @param type the group's type. For more information see {@link 984 com.liferay.portal.model.GroupConstants} 985 * @param friendlyURL the group's friendlyURL 986 * @param site whether the group is to be associated with a main site 987 * @param active whether the group is active 988 * @param serviceContext the service context to be applied (optionally 989 <code>null</code>). Can set asset category IDs and asset tag 990 names for the group, and whether the group is for staging. 991 * @return the group 992 * @throws PortalException if a creator could not be found, if the 993 group's information was invalid, if a layout could not be 994 found, or if a valid friendly URL could not be created for 995 the group 996 * @throws SystemException if a system exception occurred 997 * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String, 998 long, long, String, String, int, boolean, int, String, 999 boolean, boolean, ServiceContext)} 1000 */ 1001 public static com.liferay.portal.model.Group addGroup(long userId, 1002 java.lang.String className, long classPK, java.lang.String name, 1003 java.lang.String description, int type, java.lang.String friendlyURL, 1004 boolean site, boolean active, 1005 com.liferay.portal.service.ServiceContext serviceContext) 1006 throws com.liferay.portal.kernel.exception.PortalException, 1007 com.liferay.portal.kernel.exception.SystemException { 1008 return getService() 1009 .addGroup(userId, className, classPK, name, description, 1010 type, friendlyURL, site, active, serviceContext); 1011 } 1012 1013 /** 1014 * Adds a company group if it does not exist. This method is typically used 1015 * when a virtual host is added. 1016 * 1017 * @param companyId the primary key of the company 1018 * @throws PortalException if a default user for the company could not be 1019 found, if the group's information was invalid, if a layout could 1020 not be found, or if a valid friendly URL could not be created for 1021 the group 1022 * @throws SystemException if a system exception occurred 1023 */ 1024 public static void checkCompanyGroup(long companyId) 1025 throws com.liferay.portal.kernel.exception.PortalException, 1026 com.liferay.portal.kernel.exception.SystemException { 1027 getService().checkCompanyGroup(companyId); 1028 } 1029 1030 /** 1031 * Creates systems groups and other related data needed by the system on the 1032 * very first startup. Also takes care of creating the Control Panel groups 1033 * and layouts. 1034 * 1035 * @param companyId the primary key of the company 1036 * @throws PortalException if a new system group could not be created 1037 * @throws SystemException if a system exception occurred 1038 */ 1039 public static void checkSystemGroups(long companyId) 1040 throws com.liferay.portal.kernel.exception.PortalException, 1041 com.liferay.portal.kernel.exception.SystemException { 1042 getService().checkSystemGroups(companyId); 1043 } 1044 1045 public static void disableStaging(long groupId) 1046 throws com.liferay.portal.kernel.exception.PortalException, 1047 com.liferay.portal.kernel.exception.SystemException { 1048 getService().disableStaging(groupId); 1049 } 1050 1051 public static void enableStaging(long groupId) 1052 throws com.liferay.portal.kernel.exception.PortalException, 1053 com.liferay.portal.kernel.exception.SystemException { 1054 getService().enableStaging(groupId); 1055 } 1056 1057 /** 1058 * Returns the group with the matching friendly URL. 1059 * 1060 * @param companyId the primary key of the company 1061 * @param friendlyURL the friendly URL 1062 * @return the group with the friendly URL, or <code>null</code> if a 1063 matching group could not be found 1064 * @throws SystemException if a system exception occurred 1065 */ 1066 public static com.liferay.portal.model.Group fetchFriendlyURLGroup( 1067 long companyId, java.lang.String friendlyURL) 1068 throws com.liferay.portal.kernel.exception.SystemException { 1069 return getService().fetchFriendlyURLGroup(companyId, friendlyURL); 1070 } 1071 1072 /** 1073 * Returns the group with the matching group name by first searching the 1074 * system groups and then using the finder cache. 1075 * 1076 * @param companyId the primary key of the company 1077 * @param name the group's name 1078 * @return the group with the name and associated company, or 1079 <code>null</code> if a matching group could not be found 1080 * @throws SystemException if a system exception occurred 1081 */ 1082 public static com.liferay.portal.model.Group fetchGroup(long companyId, 1083 java.lang.String name) 1084 throws com.liferay.portal.kernel.exception.SystemException { 1085 return getService().fetchGroup(companyId, name); 1086 } 1087 1088 /** 1089 * Returns all the active or inactive groups associated with the company. 1090 * 1091 * @param companyId the primary key of the company 1092 * @param active whether to return only active groups, or only inactive 1093 groups 1094 * @return the active or inactive groups associated with the company 1095 * @throws SystemException if a system exception occurred 1096 */ 1097 public static java.util.List<com.liferay.portal.model.Group> getActiveGroups( 1098 long companyId, boolean active) 1099 throws com.liferay.portal.kernel.exception.SystemException { 1100 return getService().getActiveGroups(companyId, active); 1101 } 1102 1103 /** 1104 * Returns the company group. 1105 * 1106 * @param companyId the primary key of the company 1107 * @return the group associated with the company 1108 * @throws PortalException if a matching group could not be found 1109 * @throws SystemException if a system exception occurred 1110 */ 1111 public static com.liferay.portal.model.Group getCompanyGroup(long companyId) 1112 throws com.liferay.portal.kernel.exception.PortalException, 1113 com.liferay.portal.kernel.exception.SystemException { 1114 return getService().getCompanyGroup(companyId); 1115 } 1116 1117 /** 1118 * Returns a range of all the groups associated with the company. 1119 * 1120 * <p> 1121 * Useful when paginating results. Returns a maximum of <code>end - 1122 * start</code> instances. <code>start</code> and <code>end</code> are not 1123 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1124 * refers to the first result in the set. Setting both <code>start</code> 1125 * and <code>end</code> to {@link 1126 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1127 * result set. 1128 * </p> 1129 * 1130 * @param companyId the primary key of the company 1131 * @param start the lower bound of the range of groups to return 1132 * @param end the upper bound of the range of groups to return (not 1133 inclusive) 1134 * @return the range of groups associated with the company 1135 * @throws SystemException if a system exception occurred 1136 */ 1137 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups( 1138 long companyId, int start, int end) 1139 throws com.liferay.portal.kernel.exception.SystemException { 1140 return getService().getCompanyGroups(companyId, start, end); 1141 } 1142 1143 /** 1144 * Returns the number of groups associated with the company. 1145 * 1146 * @param companyId the primary key of the company 1147 * @return the number of groups associated with the company 1148 * @throws SystemException if a system exception occurred 1149 */ 1150 public static int getCompanyGroupsCount(long companyId) 1151 throws com.liferay.portal.kernel.exception.SystemException { 1152 return getService().getCompanyGroupsCount(companyId); 1153 } 1154 1155 /** 1156 * Returns the group with the matching friendly URL. 1157 * 1158 * @param companyId the primary key of the company 1159 * @param friendlyURL the group's friendlyURL 1160 * @return the group with the friendly URL 1161 * @throws PortalException if a matching group could not be found, or if the 1162 friendly URL was invalid 1163 * @throws SystemException if a system exception occurred 1164 */ 1165 public static com.liferay.portal.model.Group getFriendlyURLGroup( 1166 long companyId, java.lang.String friendlyURL) 1167 throws com.liferay.portal.kernel.exception.PortalException, 1168 com.liferay.portal.kernel.exception.SystemException { 1169 return getService().getFriendlyURLGroup(companyId, friendlyURL); 1170 } 1171 1172 /** 1173 * Returns the group with the matching group name. 1174 * 1175 * @param companyId the primary key of the company 1176 * @param name the group's name 1177 * @return the group with the name 1178 * @throws PortalException if a matching group could not be found 1179 * @throws SystemException if a system exception occurred 1180 */ 1181 public static com.liferay.portal.model.Group getGroup(long companyId, 1182 java.lang.String name) 1183 throws com.liferay.portal.kernel.exception.PortalException, 1184 com.liferay.portal.kernel.exception.SystemException { 1185 return getService().getGroup(companyId, name); 1186 } 1187 1188 public static java.lang.String getGroupDescriptiveName( 1189 com.liferay.portal.model.Group group, java.util.Locale locale) 1190 throws com.liferay.portal.kernel.exception.PortalException, 1191 com.liferay.portal.kernel.exception.SystemException { 1192 return getService().getGroupDescriptiveName(group, locale); 1193 } 1194 1195 public static java.lang.String getGroupDescriptiveName(long groupId, 1196 java.util.Locale locale) 1197 throws com.liferay.portal.kernel.exception.PortalException, 1198 com.liferay.portal.kernel.exception.SystemException { 1199 return getService().getGroupDescriptiveName(groupId, locale); 1200 } 1201 1202 /** 1203 * Returns all the groups that are direct children of the parent group. 1204 * 1205 * @param companyId the primary key of the company 1206 * @param parentGroupId the primary key of the parent group 1207 * @param site whether the group is to be associated with a main site 1208 * @return the matching groups, or <code>null</code> if no matches were 1209 found 1210 * @throws SystemException if a system exception occurred 1211 */ 1212 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1213 long companyId, long parentGroupId, boolean site) 1214 throws com.liferay.portal.kernel.exception.SystemException { 1215 return getService().getGroups(companyId, parentGroupId, site); 1216 } 1217 1218 /** 1219 * Returns all the groups that are direct children of the parent group with 1220 * the matching className. 1221 * 1222 * @param companyId the primary key of the company 1223 * @param className the class name of the group 1224 * @param parentGroupId the primary key of the parent group 1225 * @return the matching groups, or <code>null</code> if no matches were 1226 found 1227 * @throws SystemException if a system exception occurred 1228 */ 1229 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1230 long companyId, java.lang.String className, long parentGroupId) 1231 throws com.liferay.portal.kernel.exception.SystemException { 1232 return getService().getGroups(companyId, className, parentGroupId); 1233 } 1234 1235 /** 1236 * Returns a range of all the groups that are direct children of the parent 1237 * group with the matching className. 1238 * 1239 * @param companyId the primary key of the company 1240 * @param className the class name of the group 1241 * @param parentGroupId the primary key of the parent group 1242 * @param start the lower bound of the range of results 1243 * @param end the upper bound of the range of results (not inclusive) 1244 * @return the range of matching groups 1245 * @throws SystemException if a system exception occurred 1246 */ 1247 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1248 long companyId, java.lang.String className, long parentGroupId, 1249 int start, int end) 1250 throws com.liferay.portal.kernel.exception.SystemException { 1251 return getService() 1252 .getGroups(companyId, className, parentGroupId, start, end); 1253 } 1254 1255 /** 1256 * Returns the groups with the matching primary keys. 1257 * 1258 * @param groupIds the primary keys of the groups 1259 * @return the groups with the primary keys 1260 * @throws PortalException if any one of the groups could not be found 1261 * @throws SystemException if a system exception occurred 1262 */ 1263 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1264 long[] groupIds) 1265 throws com.liferay.portal.kernel.exception.PortalException, 1266 com.liferay.portal.kernel.exception.SystemException { 1267 return getService().getGroups(groupIds); 1268 } 1269 1270 /** 1271 * Returns the number of groups that are direct children of the parent 1272 * group. 1273 * 1274 * @param companyId the primary key of the company 1275 * @param parentGroupId the primary key of the parent group 1276 * @param site whether the group is to be associated with a main site 1277 * @return the number of matching groups 1278 * @throws SystemException if a system exception occurred 1279 */ 1280 public static int getGroupsCount(long companyId, long parentGroupId, 1281 boolean site) 1282 throws com.liferay.portal.kernel.exception.SystemException { 1283 return getService().getGroupsCount(companyId, parentGroupId, site); 1284 } 1285 1286 /** 1287 * Returns the number of groups that are direct children of the parent group 1288 * with the matching className. 1289 * 1290 * @param companyId the primary key of the company 1291 * @param className the class name of the group 1292 * @param parentGroupId the primary key of the parent group 1293 * @return the number of matching groups 1294 * @throws SystemException if a system exception occurred 1295 */ 1296 public static int getGroupsCount(long companyId, 1297 java.lang.String className, long parentGroupId) 1298 throws com.liferay.portal.kernel.exception.SystemException { 1299 return getService().getGroupsCount(companyId, className, parentGroupId); 1300 } 1301 1302 /** 1303 * Returns the group associated with the layout. 1304 * 1305 * @param companyId the primary key of the company 1306 * @param plid the primary key of the layout 1307 * @return the group associated with the layout 1308 * @throws PortalException if a matching group could not be found 1309 * @throws SystemException if a system exception occurred 1310 */ 1311 public static com.liferay.portal.model.Group getLayoutGroup( 1312 long companyId, long plid) 1313 throws com.liferay.portal.kernel.exception.PortalException, 1314 com.liferay.portal.kernel.exception.SystemException { 1315 return getService().getLayoutGroup(companyId, plid); 1316 } 1317 1318 /** 1319 * Returns the group associated with the layout prototype. 1320 * 1321 * @param companyId the primary key of the company 1322 * @param layoutPrototypeId the primary key of the layout prototype 1323 * @return the group associated with the layout prototype 1324 * @throws PortalException if a matching group could not be found 1325 * @throws SystemException if a system exception occurred 1326 */ 1327 public static com.liferay.portal.model.Group getLayoutPrototypeGroup( 1328 long companyId, long layoutPrototypeId) 1329 throws com.liferay.portal.kernel.exception.PortalException, 1330 com.liferay.portal.kernel.exception.SystemException { 1331 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId); 1332 } 1333 1334 /** 1335 * Returns the group associated with the layout set prototype. 1336 * 1337 * @param companyId the primary key of the company 1338 * @param layoutSetPrototypeId the primary key of the layout set prototype 1339 * @return the group associated with the layout set prototype 1340 * @throws PortalException if a matching group could not be found 1341 * @throws SystemException if a system exception occurred 1342 */ 1343 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup( 1344 long companyId, long layoutSetPrototypeId) 1345 throws com.liferay.portal.kernel.exception.PortalException, 1346 com.liferay.portal.kernel.exception.SystemException { 1347 return getService() 1348 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId); 1349 } 1350 1351 /** 1352 * Returns a range of all groups that are children of the parent group and 1353 * that have at least one layout. 1354 * 1355 * <p> 1356 * Useful when paginating results. Returns a maximum of <code>end - 1357 * start</code> instances. <code>start</code> and <code>end</code> are not 1358 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1359 * refers to the first result in the set. Setting both <code>start</code> 1360 * and <code>end</code> to {@link 1361 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1362 * result set. 1363 * </p> 1364 * 1365 * @param companyId the primary key of the company 1366 * @param parentGroupId the primary key of the parent group 1367 * @param site whether the group is to be associated with a main site 1368 * @param start the lower bound of the range of groups to return 1369 * @param end the upper bound of the range of groups to return (not 1370 inclusive) 1371 * @return the range of matching groups 1372 * @throws SystemException if a system exception occurred 1373 * @deprecated As of 6.2.0, replaced by {@link #getLayoutsGroups(long, long, 1374 boolean, int, int, OrderByComparator)} 1375 */ 1376 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 1377 long companyId, long parentGroupId, boolean site, int start, int end) 1378 throws com.liferay.portal.kernel.exception.SystemException { 1379 return getService() 1380 .getLayoutsGroups(companyId, parentGroupId, site, start, end); 1381 } 1382 1383 /** 1384 * Returns a range of all groups that are children of the parent group and 1385 * that have at least one layout. 1386 * 1387 * <p> 1388 * Useful when paginating results. Returns a maximum of <code>end - 1389 * start</code> instances. <code>start</code> and <code>end</code> are not 1390 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1391 * refers to the first result in the set. Setting both <code>start</code> 1392 * and <code>end</code> to {@link 1393 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1394 * result set. 1395 * </p> 1396 * 1397 * @param companyId the primary key of the company 1398 * @param parentGroupId the primary key of the parent group 1399 * @param site whether the group is to be associated with a main site 1400 * @param start the lower bound of the range of groups to return 1401 * @param end the upper bound of the range of groups to return (not 1402 inclusive) 1403 * @param obc the comparator to order the groups (optionally 1404 <code>null</code>) 1405 * @return the range of matching groups ordered by comparator 1406 <code>obc</code> 1407 * @throws SystemException if a system exception occurred 1408 */ 1409 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 1410 long companyId, long parentGroupId, boolean site, int start, int end, 1411 com.liferay.portal.kernel.util.OrderByComparator obc) 1412 throws com.liferay.portal.kernel.exception.SystemException { 1413 return getService() 1414 .getLayoutsGroups(companyId, parentGroupId, site, start, 1415 end, obc); 1416 } 1417 1418 /** 1419 * Returns the number of groups that are children or the parent group and 1420 * that have at least one layout 1421 * 1422 * @param companyId the primary key of the company 1423 * @param parentGroupId the primary key of the parent group 1424 * @param site whether the group is to be associated with a main site 1425 * @return the number of matching groups 1426 * @throws SystemException if a system exception occurred 1427 */ 1428 public static int getLayoutsGroupsCount(long companyId, long parentGroupId, 1429 boolean site) 1430 throws com.liferay.portal.kernel.exception.SystemException { 1431 return getService().getLayoutsGroupsCount(companyId, parentGroupId, site); 1432 } 1433 1434 /** 1435 * Returns all live groups. 1436 * 1437 * @return all live groups 1438 * @throws SystemException if a system exception occurred 1439 */ 1440 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups() 1441 throws com.liferay.portal.kernel.exception.SystemException { 1442 return getService().getLiveGroups(); 1443 } 1444 1445 /** 1446 * Returns a range of all non-system groups of a specified type (className) 1447 * that have no layouts. 1448 * 1449 * <p> 1450 * Useful when paginating results. Returns a maximum of <code>end - 1451 * start</code> instances. <code>start</code> and <code>end</code> are not 1452 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1453 * refers to the first result in the set. Setting both <code>start</code> 1454 * and <code>end</code> to {@link 1455 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1456 * result set. 1457 * </p> 1458 * 1459 * @param className the entity's class name 1460 * @param privateLayout whether to include groups with private layout sets 1461 or non-private layout sets 1462 * @param start the lower bound of the range of groups to return 1463 * @param end the upper bound of the range of groups to return (not 1464 inclusive) 1465 * @return the range of matching groups 1466 * @throws SystemException if a system exception occurred 1467 */ 1468 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups( 1469 java.lang.String className, boolean privateLayout, int start, int end) 1470 throws com.liferay.portal.kernel.exception.SystemException { 1471 return getService() 1472 .getNoLayoutsGroups(className, privateLayout, start, end); 1473 } 1474 1475 /** 1476 * Returns all non-system groups having <code>null</code> or empty friendly 1477 * URLs. 1478 * 1479 * @return the non-system groups having <code>null</code> or empty friendly 1480 URLs 1481 * @throws SystemException if a system exception occurred 1482 */ 1483 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups() 1484 throws com.liferay.portal.kernel.exception.SystemException { 1485 return getService().getNullFriendlyURLGroups(); 1486 } 1487 1488 /** 1489 * Returns the specified organization group. 1490 * 1491 * @param companyId the primary key of the company 1492 * @param organizationId the primary key of the organization 1493 * @return the group associated with the organization 1494 * @throws PortalException if a matching group could not be found 1495 * @throws SystemException if a system exception occurred 1496 */ 1497 public static com.liferay.portal.model.Group getOrganizationGroup( 1498 long companyId, long organizationId) 1499 throws com.liferay.portal.kernel.exception.PortalException, 1500 com.liferay.portal.kernel.exception.SystemException { 1501 return getService().getOrganizationGroup(companyId, organizationId); 1502 } 1503 1504 /** 1505 * Returns the specified organization groups. 1506 * 1507 * @param organizations the organizations 1508 * @return the groups associated with the organizations 1509 */ 1510 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 1511 java.util.List<com.liferay.portal.model.Organization> organizations) { 1512 return getService().getOrganizationsGroups(organizations); 1513 } 1514 1515 /** 1516 * Returns all the groups related to the organizations. 1517 * 1518 * @param organizations the organizations 1519 * @return the groups related to the organizations 1520 * @throws SystemException if a system exception occurred 1521 */ 1522 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups( 1523 java.util.List<com.liferay.portal.model.Organization> organizations) 1524 throws com.liferay.portal.kernel.exception.SystemException { 1525 return getService().getOrganizationsRelatedGroups(organizations); 1526 } 1527 1528 /** 1529 * Returns the group followed by all its parent groups ordered by closest 1530 * ancestor. 1531 * 1532 * @param groupId the primary key of the group 1533 * @return the group followed by all its parent groups ordered by closest 1534 ancestor 1535 * @throws PortalException if a group with the primary key could not be 1536 found 1537 * @throws SystemException if a system exception occurred 1538 */ 1539 public static java.util.List<com.liferay.portal.model.Group> getParentGroups( 1540 long groupId) 1541 throws com.liferay.portal.kernel.exception.PortalException, 1542 com.liferay.portal.kernel.exception.SystemException { 1543 return getService().getParentGroups(groupId); 1544 } 1545 1546 /** 1547 * Returns the staging group. 1548 * 1549 * @param liveGroupId the primary key of the live group 1550 * @return the staging group 1551 * @throws PortalException if a matching staging group could not be found 1552 * @throws SystemException if a system exception occurred 1553 */ 1554 public static com.liferay.portal.model.Group getStagingGroup( 1555 long liveGroupId) 1556 throws com.liferay.portal.kernel.exception.PortalException, 1557 com.liferay.portal.kernel.exception.SystemException { 1558 return getService().getStagingGroup(liveGroupId); 1559 } 1560 1561 /** 1562 * Returns the group associated with the user. 1563 * 1564 * @param companyId the primary key of the company 1565 * @param userId the primary key of the user 1566 * @return the group associated with the user 1567 * @throws PortalException if a matching group could not be found 1568 * @throws SystemException if a system exception occurred 1569 */ 1570 public static com.liferay.portal.model.Group getUserGroup(long companyId, 1571 long userId) 1572 throws com.liferay.portal.kernel.exception.PortalException, 1573 com.liferay.portal.kernel.exception.SystemException { 1574 return getService().getUserGroup(companyId, userId); 1575 } 1576 1577 /** 1578 * Returns the specified "user group" group. That is, the group that 1579 * represents the {@link com.liferay.portal.model.UserGroup} entity. 1580 * 1581 * @param companyId the primary key of the company 1582 * @param userGroupId the primary key of the user group 1583 * @return the group associated with the user group 1584 * @throws PortalException if a matching group could not be found 1585 * @throws SystemException if a system exception occurred 1586 */ 1587 public static com.liferay.portal.model.Group getUserGroupGroup( 1588 long companyId, long userGroupId) 1589 throws com.liferay.portal.kernel.exception.PortalException, 1590 com.liferay.portal.kernel.exception.SystemException { 1591 return getService().getUserGroupGroup(companyId, userGroupId); 1592 } 1593 1594 /** 1595 * Returns all the user's site groups and immediate organization groups, 1596 * optionally including the user's inherited organization groups and user 1597 * groups. System and staged groups are not included. 1598 * 1599 * @param userId the primary key of the user 1600 * @param inherit whether to include the user's inherited organization 1601 groups and user groups 1602 * @return the user's groups and immediate organization groups 1603 * @throws PortalException if a user with the primary key could not be found 1604 * @throws SystemException if a system exception occurred 1605 */ 1606 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1607 long userId, boolean inherit) 1608 throws com.liferay.portal.kernel.exception.PortalException, 1609 com.liferay.portal.kernel.exception.SystemException { 1610 return getService().getUserGroups(userId, inherit); 1611 } 1612 1613 /** 1614 * Returns an ordered range of all the user's site groups and immediate 1615 * organization groups, optionally including the user's inherited 1616 * organization groups and user groups. System and staged groups are not 1617 * included. 1618 * 1619 * <p> 1620 * Useful when paginating results. Returns a maximum of <code>end - 1621 * start</code> instances. <code>start</code> and <code>end</code> are not 1622 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1623 * refers to the first result in the set. Setting both <code>start</code> 1624 * and <code>end</code> to {@link 1625 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1626 * result set. 1627 * </p> 1628 * 1629 * @param userId the primary key of the user 1630 * @param inherit whether to include the user's inherited organization 1631 groups and user groups 1632 * @param start the lower bound of the range of groups to return 1633 * @param end the upper bound of the range of groups to return (not 1634 inclusive) 1635 * @return the range of the user's groups and immediate organization groups 1636 ordered by name 1637 * @throws PortalException if a user with the primary key could not be found 1638 * @throws SystemException if a system exception occurred 1639 */ 1640 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1641 long userId, boolean inherit, int start, int end) 1642 throws com.liferay.portal.kernel.exception.PortalException, 1643 com.liferay.portal.kernel.exception.SystemException { 1644 return getService().getUserGroups(userId, inherit, start, end); 1645 } 1646 1647 /** 1648 * Returns the groups associated with the user groups. 1649 * 1650 * @param userGroups the user groups 1651 * @return the groups associated with the user groups 1652 * @throws PortalException if any one of the user group's group could not be 1653 found 1654 * @throws SystemException if a system exception occurred 1655 */ 1656 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 1657 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1658 throws com.liferay.portal.kernel.exception.PortalException, 1659 com.liferay.portal.kernel.exception.SystemException { 1660 return getService().getUserGroupsGroups(userGroups); 1661 } 1662 1663 /** 1664 * Returns all the groups related to the user groups. 1665 * 1666 * @param userGroups the user groups 1667 * @return the groups related to the user groups 1668 * @throws SystemException if a system exception occurred 1669 */ 1670 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups( 1671 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1672 throws com.liferay.portal.kernel.exception.SystemException { 1673 return getService().getUserGroupsRelatedGroups(userGroups); 1674 } 1675 1676 /** 1677 * Returns the range of all groups associated with the user's organization 1678 * groups, including the ancestors of the organization groups, unless portal 1679 * property <code>organizations.membership.strict</code> is set to 1680 * <code>true</code>. 1681 * 1682 * <p> 1683 * Useful when paginating results. Returns a maximum of <code>end - 1684 * start</code> instances. <code>start</code> and <code>end</code> are not 1685 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1686 * refers to the first result in the set. Setting both <code>start</code> 1687 * and <code>end</code> to {@link 1688 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1689 * result set. 1690 * </p> 1691 * 1692 * @param userId the primary key of the user 1693 * @param start the lower bound of the range of groups to consider 1694 * @param end the upper bound of the range of groups to consider (not 1695 inclusive) 1696 * @return the range of groups associated with the user's organization 1697 groups 1698 * @throws PortalException if a user with the primary key could not be found 1699 or if another portal exception occurred 1700 * @throws SystemException if a system exception occurred 1701 */ 1702 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 1703 long userId, int start, int end) 1704 throws com.liferay.portal.kernel.exception.PortalException, 1705 com.liferay.portal.kernel.exception.SystemException { 1706 return getService().getUserOrganizationsGroups(userId, start, end); 1707 } 1708 1709 public static com.liferay.portal.model.Group getUserPersonalSiteGroup( 1710 long companyId) 1711 throws com.liferay.portal.kernel.exception.PortalException, 1712 com.liferay.portal.kernel.exception.SystemException { 1713 return getService().getUserPersonalSiteGroup(companyId); 1714 } 1715 1716 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1717 long userId) 1718 throws com.liferay.portal.kernel.exception.PortalException, 1719 com.liferay.portal.kernel.exception.SystemException { 1720 return getService().getUserSitesGroups(userId); 1721 } 1722 1723 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1724 long userId, boolean includeAdministrative) 1725 throws com.liferay.portal.kernel.exception.PortalException, 1726 com.liferay.portal.kernel.exception.SystemException { 1727 return getService().getUserSitesGroups(userId, includeAdministrative); 1728 } 1729 1730 /** 1731 * Returns <code>true</code> if the live group has a staging group. 1732 * 1733 * @param liveGroupId the primary key of the live group 1734 * @return <code>true</code> if the live group has a staging group; 1735 <code>false</code> otherwise 1736 * @throws SystemException if a system exception occurred 1737 */ 1738 public static boolean hasStagingGroup(long liveGroupId) 1739 throws com.liferay.portal.kernel.exception.SystemException { 1740 return getService().hasStagingGroup(liveGroupId); 1741 } 1742 1743 /** 1744 * Returns <code>true</code> if the user is immediately associated with the 1745 * group, or optionally if the user is associated with the group via the 1746 * user's organizations, inherited organizations, or user groups. 1747 * 1748 * @param userId the primary key of the user 1749 * @param groupId the primary key of the group 1750 * @param inherit whether to include organization groups and user groups to 1751 which the user belongs in the determination 1752 * @return <code>true</code> if the user is associated with the group; 1753 <code>false</code> otherwise 1754 * @throws SystemException if a system exception occurred 1755 */ 1756 public static boolean hasUserGroup(long userId, long groupId, 1757 boolean inherit) 1758 throws com.liferay.portal.kernel.exception.SystemException { 1759 return getService().hasUserGroup(userId, groupId, inherit); 1760 } 1761 1762 public static boolean isLiveGroupActive( 1763 com.liferay.portal.model.Group group) { 1764 return getService().isLiveGroupActive(group); 1765 } 1766 1767 /** 1768 * Returns the group with the matching group name by first searching the 1769 * system groups and then using the finder cache. 1770 * 1771 * @param companyId the primary key of the company 1772 * @param name the group's name 1773 * @return the group with the name and associated company, or 1774 <code>null</code> if a matching group could not be found 1775 * @throws SystemException if a system exception occurred 1776 */ 1777 public static com.liferay.portal.model.Group loadFetchGroup( 1778 long companyId, java.lang.String name) 1779 throws com.liferay.portal.kernel.exception.SystemException { 1780 return getService().loadFetchGroup(companyId, name); 1781 } 1782 1783 /** 1784 * Returns the group with the matching group name. 1785 * 1786 * @param companyId the primary key of the company 1787 * @param name the group's name 1788 * @return the group with the name and associated company 1789 * @throws PortalException if a matching group could not be found 1790 * @throws SystemException if a system exception occurred 1791 */ 1792 public static com.liferay.portal.model.Group loadGetGroup(long companyId, 1793 java.lang.String name) 1794 throws com.liferay.portal.kernel.exception.PortalException, 1795 com.liferay.portal.kernel.exception.SystemException { 1796 return getService().loadGetGroup(companyId, name); 1797 } 1798 1799 /** 1800 * Rebuilds the group tree. 1801 * 1802 * <p> 1803 * Only call this method if the tree has become stale through operations 1804 * other than normal CRUD. Under normal circumstances the tree is 1805 * automatically rebuilt whenever necessary. 1806 * </p> 1807 * 1808 * @param companyId the primary key of the group's company 1809 * @throws PortalException if a group with the primary key could not be 1810 found 1811 * @throws SystemException if a system exception occurred 1812 */ 1813 public static void rebuildTree(long companyId) 1814 throws com.liferay.portal.kernel.exception.PortalException, 1815 com.liferay.portal.kernel.exception.SystemException { 1816 getService().rebuildTree(companyId); 1817 } 1818 1819 /** 1820 * Returns an ordered range of all the company's groups, optionally 1821 * including the user's inherited organization groups and user groups. 1822 * System and staged groups are not included. 1823 * 1824 * <p> 1825 * Useful when paginating results. Returns a maximum of <code>end - 1826 * start</code> instances. <code>start</code> and <code>end</code> are not 1827 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1828 * refers to the first result in the set. Setting both <code>start</code> 1829 * and <code>end</code> to {@link 1830 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1831 * result set. 1832 * </p> 1833 * 1834 * @param companyId the primary key of the company 1835 * @param params the finder params (optionally <code>null</code>). To 1836 include a user's organizations, inherited organizations, and user 1837 groups in the search, add an entry with key 1838 "usersGroups" mapped to the user's ID and an entry with 1839 key "inherit" mapped to a non-<code>null</code> object. 1840 For more information see {@link 1841 com.liferay.portal.service.persistence.GroupFinder} 1842 * @param start the lower bound of the range of groups to return 1843 * @param end the upper bound of the range of groups to return (not 1844 inclusive) 1845 * @return the matching groups ordered by name 1846 * @throws SystemException if a system exception occurred 1847 */ 1848 public static java.util.List<com.liferay.portal.model.Group> search( 1849 long companyId, 1850 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1851 int start, int end) 1852 throws com.liferay.portal.kernel.exception.SystemException { 1853 return getService().search(companyId, params, start, end); 1854 } 1855 1856 /** 1857 * Returns an ordered range of all the groups belonging to the parent group 1858 * that match the keywords, optionally including the user's inherited 1859 * organization groups and user groups. System and staged groups are not 1860 * included. 1861 * 1862 * <p> 1863 * Useful when paginating results. Returns a maximum of <code>end - 1864 * start</code> instances. <code>start</code> and <code>end</code> are not 1865 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1866 * refers to the first result in the set. Setting both <code>start</code> 1867 * and <code>end</code> to {@link 1868 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1869 * result set. 1870 * </p> 1871 * 1872 * @param companyId the primary key of the company 1873 * @param parentGroupId the primary key of the parent group 1874 * @param keywords the keywords (space separated), which may occur in the 1875 sites's name, or description (optionally <code>null</code>) 1876 * @param params the finder params (optionally <code>null</code>). To 1877 include the user's inherited organizations and user groups in the 1878 search, add entries having "usersGroups" and 1879 "inherit" as keys mapped to the the user's ID. For more 1880 information see {@link 1881 com.liferay.portal.service.persistence.GroupFinder} 1882 * @param start the lower bound of the range of groups to return 1883 * @param end the upper bound of the range of groups to return (not 1884 inclusive) 1885 * @return the matching groups ordered by name 1886 * @throws SystemException if a system exception occurred 1887 */ 1888 public static java.util.List<com.liferay.portal.model.Group> search( 1889 long companyId, long parentGroupId, java.lang.String keywords, 1890 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1891 int start, int end) 1892 throws com.liferay.portal.kernel.exception.SystemException { 1893 return getService() 1894 .search(companyId, parentGroupId, keywords, params, start, 1895 end); 1896 } 1897 1898 /** 1899 * Returns an ordered range of all the groups belonging to the parent group 1900 * that match the keywords, optionally including the user's inherited 1901 * organization groups and user groups. System and staged groups are not 1902 * included. 1903 * 1904 * <p> 1905 * Useful when paginating results. Returns a maximum of <code>end - 1906 * start</code> instances. <code>start</code> and <code>end</code> are not 1907 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1908 * refers to the first result in the set. Setting both <code>start</code> 1909 * and <code>end</code> to {@link 1910 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1911 * result set. 1912 * </p> 1913 * 1914 * @param companyId the primary key of the company 1915 * @param parentGroupId the primary key of the parent group 1916 * @param keywords the keywords (space separated), which may occur in the 1917 sites's name, or description (optionally <code>null</code>) 1918 * @param params the finder params (optionally <code>null</code>). To 1919 include the user's inherited organizations and user groups in the 1920 search, add entries having "usersGroups" and 1921 "inherit" as keys mapped to the the user's ID. For more 1922 information see {@link 1923 com.liferay.portal.service.persistence.GroupFinder} 1924 * @param start the lower bound of the range of groups to return 1925 * @param end the upper bound of the range of groups to return (not 1926 inclusive) 1927 * @param obc the comparator to order the groups (optionally 1928 <code>null</code>) 1929 * @return the matching groups ordered by comparator <code>obc</code> 1930 * @throws SystemException if a system exception occurred 1931 */ 1932 public static java.util.List<com.liferay.portal.model.Group> search( 1933 long companyId, long parentGroupId, java.lang.String keywords, 1934 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1935 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1936 throws com.liferay.portal.kernel.exception.SystemException { 1937 return getService() 1938 .search(companyId, parentGroupId, keywords, params, start, 1939 end, obc); 1940 } 1941 1942 /** 1943 * Returns an ordered range of all the site groups belonging to the parent 1944 * group and organization groups that match the name and description, 1945 * optionally including the user's inherited organization groups and user 1946 * groups. System and staged groups are not included. 1947 * 1948 * <p> 1949 * Useful when paginating results. Returns a maximum of <code>end - 1950 * start</code> instances. <code>start</code> and <code>end</code> are not 1951 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1952 * refers to the first result in the set. Setting both <code>start</code> 1953 * and <code>end</code> to {@link 1954 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1955 * result set. 1956 * </p> 1957 * 1958 * @param companyId the primary key of the company 1959 * @param parentGroupId the primary key of the parent group 1960 * @param name the group's name (optionally <code>null</code>) 1961 * @param description the group's description (optionally 1962 <code>null</code>) 1963 * @param params the finder params (optionally <code>null</code>). To 1964 include the user's inherited organizations and user groups in the 1965 search, add entries having "usersGroups" and 1966 "inherit" as keys mapped to the the user's ID. For more 1967 information see {@link 1968 com.liferay.portal.service.persistence.GroupFinder} 1969 * @param andOperator whether every field must match its keywords, or just 1970 one field. 1971 * @param start the lower bound of the range of groups to return 1972 * @param end the upper bound of the range of groups to return (not 1973 inclusive) 1974 * @return the matching groups ordered by name 1975 * @throws SystemException if a system exception occurred 1976 */ 1977 public static java.util.List<com.liferay.portal.model.Group> search( 1978 long companyId, long parentGroupId, java.lang.String name, 1979 java.lang.String description, 1980 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1981 boolean andOperator, int start, int end) 1982 throws com.liferay.portal.kernel.exception.SystemException { 1983 return getService() 1984 .search(companyId, parentGroupId, name, description, params, 1985 andOperator, start, end); 1986 } 1987 1988 /** 1989 * Returns an ordered range of all the site groups belonging to the parent 1990 * group and organization groups that match the name and description, 1991 * optionally including the user's inherited organization groups and user 1992 * groups. System and staged groups are not included. 1993 * 1994 * <p> 1995 * Useful when paginating results. Returns a maximum of <code>end - 1996 * start</code> instances. <code>start</code> and <code>end</code> are not 1997 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1998 * refers to the first result in the set. Setting both <code>start</code> 1999 * and <code>end</code> to {@link 2000 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2001 * result set. 2002 * </p> 2003 * 2004 * @param companyId the primary key of the company 2005 * @param parentGroupId the primary key of the parent group 2006 * @param name the group's name (optionally <code>null</code>) 2007 * @param description the group's description (optionally 2008 <code>null</code>) 2009 * @param params the finder params (optionally <code>null</code>). To 2010 include the user's inherited organizations and user groups in the 2011 search, add entries having "usersGroups" and 2012 "inherit" as keys mapped to the the user's ID. For more 2013 information see {@link 2014 com.liferay.portal.service.persistence.GroupFinder} 2015 * @param andOperator whether every field must match its keywords, or just 2016 one field. 2017 * @param start the lower bound of the range of groups to return 2018 * @param end the upper bound of the range of groups to return (not 2019 inclusive) 2020 * @param obc the comparator to order the groups (optionally 2021 <code>null</code>) 2022 * @return the matching groups ordered by comparator <code>obc</code> 2023 * @throws SystemException if a system exception occurred 2024 */ 2025 public static java.util.List<com.liferay.portal.model.Group> search( 2026 long companyId, long parentGroupId, java.lang.String name, 2027 java.lang.String description, 2028 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2029 boolean andOperator, int start, int end, 2030 com.liferay.portal.kernel.util.OrderByComparator obc) 2031 throws com.liferay.portal.kernel.exception.SystemException { 2032 return getService() 2033 .search(companyId, parentGroupId, name, description, params, 2034 andOperator, start, end, obc); 2035 } 2036 2037 /** 2038 * Returns an ordered range of all the groups belonging to the parent group 2039 * that match the class name IDs and keywords, optionally including the 2040 * user's inherited organization groups and user groups. System and staged 2041 * groups are not included. 2042 * 2043 * <p> 2044 * Useful when paginating results. Returns a maximum of <code>end - 2045 * start</code> instances. <code>start</code> and <code>end</code> are not 2046 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2047 * refers to the first result in the set. Setting both <code>start</code> 2048 * and <code>end</code> to {@link 2049 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2050 * result set. 2051 * </p> 2052 * 2053 * @param companyId the primary key of the company 2054 * @param classNameIds the primary keys of the class names of the entities 2055 the groups are related to (optionally <code>null</code>) 2056 * @param parentGroupId the primary key of the parent group 2057 * @param keywords the keywords (space separated), which may occur in the 2058 sites's name, or description (optionally <code>null</code>) 2059 * @param params the finder params (optionally <code>null</code>). To 2060 include a user's organizations, inherited organizations, and user 2061 groups in the search, add an entry with key 2062 "usersGroups" mapped to the user's ID and an entry with 2063 key "inherit" mapped to a non-<code>null</code> object. 2064 For more information see {@link 2065 com.liferay.portal.service.persistence.GroupFinder} 2066 * @param start the lower bound of the range of groups to return 2067 * @param end the upper bound of the range of groups to return (not 2068 inclusive) 2069 * @return the matching groups ordered by name 2070 * @throws SystemException if a system exception occurred 2071 */ 2072 public static java.util.List<com.liferay.portal.model.Group> search( 2073 long companyId, long[] classNameIds, long parentGroupId, 2074 java.lang.String keywords, 2075 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2076 int start, int end) 2077 throws com.liferay.portal.kernel.exception.SystemException { 2078 return getService() 2079 .search(companyId, classNameIds, parentGroupId, keywords, 2080 params, start, end); 2081 } 2082 2083 /** 2084 * Returns an ordered range of all the groups belonging to the parent group 2085 * that match the class name IDs and keywords, optionally including the 2086 * user's inherited organization groups and user groups. System and staged 2087 * groups are not included. 2088 * 2089 * <p> 2090 * Useful when paginating results. Returns a maximum of <code>end - 2091 * start</code> instances. <code>start</code> and <code>end</code> are not 2092 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2093 * refers to the first result in the set. Setting both <code>start</code> 2094 * and <code>end</code> to {@link 2095 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2096 * result set. 2097 * </p> 2098 * 2099 * @param companyId the primary key of the company 2100 * @param classNameIds the primary keys of the class names of the entities 2101 the groups are related to (optionally <code>null</code>) 2102 * @param parentGroupId the primary key of the parent group 2103 * @param keywords the keywords (space separated), which may occur in the 2104 sites's name, or description (optionally <code>null</code>) 2105 * @param params the finder params (optionally <code>null</code>). To 2106 include a user's organizations, inherited organizations, and user 2107 groups in the search, add an entry with key 2108 "usersGroups" mapped to the user's ID and an entry with 2109 key "inherit" mapped to a non-<code>null</code> object. 2110 For more information see {@link 2111 com.liferay.portal.service.persistence.GroupFinder} 2112 * @param start the lower bound of the range of groups to return 2113 * @param end the upper bound of the range of groups to return (not 2114 inclusive) 2115 * @param obc the comparator to order the groups (optionally 2116 <code>null</code>) 2117 * @return the matching groups ordered by comparator <code>obc</code> 2118 * @throws SystemException if a system exception occurred 2119 */ 2120 public static java.util.List<com.liferay.portal.model.Group> search( 2121 long companyId, long[] classNameIds, long parentGroupId, 2122 java.lang.String keywords, 2123 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2124 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2125 throws com.liferay.portal.kernel.exception.SystemException { 2126 return getService() 2127 .search(companyId, classNameIds, parentGroupId, keywords, 2128 params, start, end, obc); 2129 } 2130 2131 /** 2132 * Returns an ordered range of all the groups belonging to the parent group 2133 * that match the class name IDs, name, and description, optionally 2134 * including the user's inherited organization groups and user groups. 2135 * System and staged groups are not included. 2136 * 2137 * <p> 2138 * Useful when paginating results. Returns a maximum of <code>end - 2139 * start</code> instances. <code>start</code> and <code>end</code> are not 2140 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2141 * refers to the first result in the set. Setting both <code>start</code> 2142 * and <code>end</code> to {@link 2143 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2144 * result set. 2145 * </p> 2146 * 2147 * @param companyId the primary key of the company 2148 * @param classNameIds the primary keys of the class names of the entities 2149 the groups are related to (optionally <code>null</code>) 2150 * @param parentGroupId the primary key of the parent group 2151 * @param name the group's name (optionally <code>null</code>) 2152 * @param description the group's description (optionally 2153 <code>null</code>) 2154 * @param params the finder params (optionally <code>null</code>). To 2155 include a user's organizations, inherited organizations, and user 2156 groups in the search, add an entry with key 2157 "usersGroups" mapped to the user's ID and an entry with 2158 key "inherit" mapped to a non-<code>null</code> object. 2159 For more information see {@link 2160 com.liferay.portal.service.persistence.GroupFinder} 2161 * @param andOperator whether every field must match its keywords, or just 2162 one field. 2163 * @param start the lower bound of the range of groups to return 2164 * @param end the upper bound of the range of groups to return (not 2165 inclusive) 2166 * @return the matching groups ordered by name 2167 * @throws SystemException if a system exception occurred 2168 */ 2169 public static java.util.List<com.liferay.portal.model.Group> search( 2170 long companyId, long[] classNameIds, long parentGroupId, 2171 java.lang.String name, java.lang.String description, 2172 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2173 boolean andOperator, int start, int end) 2174 throws com.liferay.portal.kernel.exception.SystemException { 2175 return getService() 2176 .search(companyId, classNameIds, parentGroupId, name, 2177 description, params, andOperator, start, end); 2178 } 2179 2180 /** 2181 * Returns an ordered range of all the groups belonging to the parent group 2182 * that match the class name IDs, name, and description, optionally 2183 * including the user's inherited organization groups and user groups. 2184 * System and staged groups are not included. 2185 * 2186 * <p> 2187 * Useful when paginating results. Returns a maximum of <code>end - 2188 * start</code> instances. <code>start</code> and <code>end</code> are not 2189 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2190 * refers to the first result in the set. Setting both <code>start</code> 2191 * and <code>end</code> to {@link 2192 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2193 * result set. 2194 * </p> 2195 * 2196 * @param companyId the primary key of the company 2197 * @param classNameIds the primary keys of the class names of the entities 2198 the groups are related to (optionally <code>null</code>) 2199 * @param parentGroupId the primary key of the parent group 2200 * @param name the group's name (optionally <code>null</code>) 2201 * @param description the group's description (optionally 2202 <code>null</code>) 2203 * @param params the finder params (optionally <code>null</code>). To 2204 include a user's organizations, inherited organizations, and user 2205 groups in the search, add an entry with key 2206 "usersGroups" mapped to the user's ID and an entry with 2207 key "inherit" mapped to a non-<code>null</code> object. 2208 For more information see {@link 2209 com.liferay.portal.service.persistence.GroupFinder} 2210 * @param andOperator whether every field must match its keywords, or just 2211 one field. 2212 * @param start the lower bound of the range of groups to return 2213 * @param end the upper bound of the range of groups to return (not 2214 inclusive) 2215 * @param obc the comparator to order the groups (optionally 2216 <code>null</code>) 2217 * @return the matching groups ordered by comparator <code>obc</code> 2218 * @throws SystemException if a system exception occurred 2219 */ 2220 public static java.util.List<com.liferay.portal.model.Group> search( 2221 long companyId, long[] classNameIds, long parentGroupId, 2222 java.lang.String name, java.lang.String description, 2223 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2224 boolean andOperator, int start, int end, 2225 com.liferay.portal.kernel.util.OrderByComparator obc) 2226 throws com.liferay.portal.kernel.exception.SystemException { 2227 return getService() 2228 .search(companyId, classNameIds, parentGroupId, name, 2229 description, params, andOperator, start, end, obc); 2230 } 2231 2232 /** 2233 * Returns an ordered range of all the groups that match the class name IDs 2234 * and keywords, optionally including the user's inherited organization 2235 * groups and user groups. System and staged groups are not included. 2236 * 2237 * <p> 2238 * Useful when paginating results. Returns a maximum of <code>end - 2239 * start</code> instances. <code>start</code> and <code>end</code> are not 2240 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2241 * refers to the first result in the set. Setting both <code>start</code> 2242 * and <code>end</code> to {@link 2243 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2244 * result set. 2245 * </p> 2246 * 2247 * @param companyId the primary key of the company 2248 * @param classNameIds the primary keys of the class names of the entities 2249 the groups are related to (optionally <code>null</code>) 2250 * @param keywords the keywords (space separated), which may occur in the 2251 sites's name, or description (optionally <code>null</code>) 2252 * @param params the finder params (optionally <code>null</code>). To 2253 include a user's organizations, inherited organizations, and user 2254 groups in the search, add an entry with key 2255 "usersGroups" mapped to the user's ID and an entry with 2256 key "inherit" mapped to a non-<code>null</code> object. 2257 For more information see {@link 2258 com.liferay.portal.service.persistence.GroupFinder} 2259 * @param start the lower bound of the range of groups to return 2260 * @param end the upper bound of the range of groups to return (not 2261 inclusive) 2262 * @return the matching groups ordered by name 2263 * @throws SystemException if a system exception occurred 2264 */ 2265 public static java.util.List<com.liferay.portal.model.Group> search( 2266 long companyId, long[] classNameIds, java.lang.String keywords, 2267 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2268 int start, int end) 2269 throws com.liferay.portal.kernel.exception.SystemException { 2270 return getService() 2271 .search(companyId, classNameIds, keywords, params, start, end); 2272 } 2273 2274 /** 2275 * Returns an ordered range of all the groups that match the class name IDs 2276 * and keywords, optionally including the user's inherited organization 2277 * groups and user groups. System and staged groups are not included. 2278 * 2279 * <p> 2280 * Useful when paginating results. Returns a maximum of <code>end - 2281 * start</code> instances. <code>start</code> and <code>end</code> are not 2282 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2283 * refers to the first result in the set. Setting both <code>start</code> 2284 * and <code>end</code> to {@link 2285 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2286 * result set. 2287 * </p> 2288 * 2289 * @param companyId the primary key of the company 2290 * @param classNameIds the primary keys of the class names of the entities 2291 the groups are related to (optionally <code>null</code>) 2292 * @param keywords the keywords (space separated), which may occur in the 2293 sites's name, or description (optionally <code>null</code>) 2294 * @param params the finder params (optionally <code>null</code>). To 2295 include a user's organizations, inherited organizations, and user 2296 groups in the search, add an entry with key 2297 "usersGroups" mapped to the user's ID and an entry with 2298 key "inherit" mapped to a non-<code>null</code> object. 2299 For more information see {@link 2300 com.liferay.portal.service.persistence.GroupFinder} 2301 * @param start the lower bound of the range of groups to return 2302 * @param end the upper bound of the range of groups to return (not 2303 inclusive) 2304 * @param obc the comparator to order the groups (optionally 2305 <code>null</code>) 2306 * @return the matching groups ordered by comparator <code>obc</code> 2307 * @throws SystemException if a system exception occurred 2308 */ 2309 public static java.util.List<com.liferay.portal.model.Group> search( 2310 long companyId, long[] classNameIds, java.lang.String keywords, 2311 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2312 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2313 throws com.liferay.portal.kernel.exception.SystemException { 2314 return getService() 2315 .search(companyId, classNameIds, keywords, params, start, 2316 end, obc); 2317 } 2318 2319 /** 2320 * Returns an ordered range of all the groups that match the class name IDs, 2321 * name, and description, optionally including the user's inherited 2322 * organization groups and user groups. System and staged groups are not 2323 * included. 2324 * 2325 * <p> 2326 * Useful when paginating results. Returns a maximum of <code>end - 2327 * start</code> instances. <code>start</code> and <code>end</code> are not 2328 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2329 * refers to the first result in the set. Setting both <code>start</code> 2330 * and <code>end</code> to {@link 2331 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2332 * result set. 2333 * </p> 2334 * 2335 * @param companyId the primary key of the company 2336 * @param classNameIds the primary keys of the class names of the entities 2337 the groups are related to (optionally <code>null</code>) 2338 * @param name the group's name (optionally <code>null</code>) 2339 * @param description the group's description (optionally 2340 <code>null</code>) 2341 * @param params the finder params (optionally <code>null</code>). To 2342 include a user's organizations, inherited organizations, and user 2343 groups in the search, add an entry with key 2344 "usersGroups" mapped to the user's ID and an entry with 2345 key "inherit" mapped to a non-<code>null</code> object. 2346 For more information see {@link 2347 com.liferay.portal.service.persistence.GroupFinder} 2348 * @param andOperator whether every field must match its keywords, or just 2349 one field. 2350 * @param start the lower bound of the range of groups to return 2351 * @param end the upper bound of the range of groups to return (not 2352 inclusive) 2353 * @return the matching groups ordered by name 2354 * @throws SystemException if a system exception occurred 2355 */ 2356 public static java.util.List<com.liferay.portal.model.Group> search( 2357 long companyId, long[] classNameIds, java.lang.String name, 2358 java.lang.String description, 2359 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2360 boolean andOperator, int start, int end) 2361 throws com.liferay.portal.kernel.exception.SystemException { 2362 return getService() 2363 .search(companyId, classNameIds, name, description, params, 2364 andOperator, start, end); 2365 } 2366 2367 /** 2368 * Returns an ordered range of all the groups that match the class name IDs, 2369 * name, and description, optionally including the user's inherited 2370 * organization groups and user groups. System and staged groups are not 2371 * included. 2372 * 2373 * <p> 2374 * Useful when paginating results. Returns a maximum of <code>end - 2375 * start</code> instances. <code>start</code> and <code>end</code> are not 2376 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2377 * refers to the first result in the set. Setting both <code>start</code> 2378 * and <code>end</code> to {@link 2379 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2380 * result set. 2381 * </p> 2382 * 2383 * @param companyId the primary key of the company 2384 * @param classNameIds the primary keys of the class names of the entities 2385 the groups are related to (optionally <code>null</code>) 2386 * @param name the group's name (optionally <code>null</code>) 2387 * @param description the group's description (optionally 2388 <code>null</code>) 2389 * @param params the finder params (optionally <code>null</code>). To 2390 include a user's organizations, inherited organizations, and user 2391 groups in the search, add an entry with key 2392 "usersGroups" mapped to the user's ID and an entry with 2393 key "inherit" mapped to a non-<code>null</code> object. 2394 For more information see {@link 2395 com.liferay.portal.service.persistence.GroupFinder} 2396 * @param andOperator whether every field must match its keywords, or just 2397 one field. 2398 * @param start the lower bound of the range of groups to return 2399 * @param end the upper bound of the range of groups to return (not 2400 inclusive) 2401 * @param obc the comparator to order the groups (optionally 2402 <code>null</code>) 2403 * @return the matching groups ordered by comparator <code>obc</code> 2404 * @throws SystemException if a system exception occurred 2405 */ 2406 public static java.util.List<com.liferay.portal.model.Group> search( 2407 long companyId, long[] classNameIds, java.lang.String name, 2408 java.lang.String description, 2409 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2410 boolean andOperator, int start, int end, 2411 com.liferay.portal.kernel.util.OrderByComparator obc) 2412 throws com.liferay.portal.kernel.exception.SystemException { 2413 return getService() 2414 .search(companyId, classNameIds, name, description, params, 2415 andOperator, start, end, obc); 2416 } 2417 2418 /** 2419 * Returns an ordered range of all the groups that match the keywords, 2420 * optionally including the user's inherited organization groups and user 2421 * groups. System and staged groups are not included. 2422 * 2423 * <p> 2424 * Useful when paginating results. Returns a maximum of <code>end - 2425 * start</code> instances. <code>start</code> and <code>end</code> are not 2426 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2427 * refers to the first result in the set. Setting both <code>start</code> 2428 * and <code>end</code> to {@link 2429 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2430 * result set. 2431 * </p> 2432 * 2433 * @param companyId the primary key of the company 2434 * @param keywords the keywords (space separated), which may occur in the 2435 sites's name, or description (optionally <code>null</code>) 2436 * @param params the finder params (optionally <code>null</code>). To 2437 include the user's inherited organizations and user groups in the 2438 search, add entries having "usersGroups" and 2439 "inherit" as keys mapped to the the user's ID. For more 2440 information see {@link 2441 com.liferay.portal.service.persistence.GroupFinder} 2442 * @param start the lower bound of the range of groups to return 2443 * @param end the upper bound of the range of groups to return (not 2444 inclusive) 2445 * @return the matching groups ordered by name 2446 * @throws SystemException if a system exception occurred 2447 */ 2448 public static java.util.List<com.liferay.portal.model.Group> search( 2449 long companyId, java.lang.String keywords, 2450 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2451 int start, int end) 2452 throws com.liferay.portal.kernel.exception.SystemException { 2453 return getService().search(companyId, keywords, params, start, end); 2454 } 2455 2456 /** 2457 * Returns an ordered range of all the groups that match the keywords, 2458 * optionally including the user's inherited organization groups and user 2459 * groups. System and staged groups are not included. 2460 * 2461 * <p> 2462 * Useful when paginating results. Returns a maximum of <code>end - 2463 * start</code> instances. <code>start</code> and <code>end</code> are not 2464 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2465 * refers to the first result in the set. Setting both <code>start</code> 2466 * and <code>end</code> to {@link 2467 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2468 * result set. 2469 * </p> 2470 * 2471 * @param companyId the primary key of the company 2472 * @param keywords the keywords (space separated), which may occur in the 2473 sites's name, or description (optionally <code>null</code>) 2474 * @param params the finder params (optionally <code>null</code>). To 2475 include the user's inherited organizations and user groups in the 2476 search, add entries having "usersGroups" and 2477 "inherit" as keys mapped to the the user's ID. For more 2478 information see {@link 2479 com.liferay.portal.service.persistence.GroupFinder} 2480 * @param start the lower bound of the range of groups to return 2481 * @param end the upper bound of the range of groups to return (not 2482 inclusive) 2483 * @param obc the comparator to order the groups (optionally 2484 <code>null</code>) 2485 * @return the matching groups ordered by comparator <code>obc</code> 2486 * @throws SystemException if a system exception occurred 2487 */ 2488 public static java.util.List<com.liferay.portal.model.Group> search( 2489 long companyId, java.lang.String keywords, 2490 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2491 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2492 throws com.liferay.portal.kernel.exception.SystemException { 2493 return getService().search(companyId, keywords, params, start, end, obc); 2494 } 2495 2496 /** 2497 * Returns an ordered range of all the site groups and organization groups 2498 * that match the name and description, optionally including the user's 2499 * inherited organization groups and user groups. System and staged groups 2500 * are not included. 2501 * 2502 * <p> 2503 * Useful when paginating results. Returns a maximum of <code>end - 2504 * start</code> instances. <code>start</code> and <code>end</code> are not 2505 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2506 * refers to the first result in the set. Setting both <code>start</code> 2507 * and <code>end</code> to {@link 2508 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2509 * result set. 2510 * </p> 2511 * 2512 * @param companyId the primary key of the company 2513 * @param name the group's name (optionally <code>null</code>) 2514 * @param description the group's description (optionally 2515 <code>null</code>) 2516 * @param params the finder params (optionally <code>null</code>). To 2517 include the user's inherited organizations and user groups in the 2518 search, add entries having "usersGroups" and 2519 "inherit" as keys mapped to the the user's ID. For more 2520 information see {@link 2521 com.liferay.portal.service.persistence.GroupFinder} 2522 * @param andOperator whether every field must match its keywords, or just 2523 one field. 2524 * @param start the lower bound of the range of groups to return 2525 * @param end the upper bound of the range of groups to return (not 2526 inclusive) 2527 * @return the matching groups ordered by name 2528 * @throws SystemException if a system exception occurred 2529 */ 2530 public static java.util.List<com.liferay.portal.model.Group> search( 2531 long companyId, java.lang.String name, java.lang.String description, 2532 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2533 boolean andOperator, int start, int end) 2534 throws com.liferay.portal.kernel.exception.SystemException { 2535 return getService() 2536 .search(companyId, name, description, params, andOperator, 2537 start, end); 2538 } 2539 2540 /** 2541 * Returns an ordered range of all the site groups and organization groups 2542 * that match the name and description, optionally including the user's 2543 * inherited organization groups and user groups. System and staged groups 2544 * are not included. 2545 * 2546 * <p> 2547 * Useful when paginating results. Returns a maximum of <code>end - 2548 * start</code> instances. <code>start</code> and <code>end</code> are not 2549 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2550 * refers to the first result in the set. Setting both <code>start</code> 2551 * and <code>end</code> to {@link 2552 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2553 * result set. 2554 * </p> 2555 * 2556 * @param companyId the primary key of the company 2557 * @param name the group's name (optionally <code>null</code>) 2558 * @param description the group's description (optionally 2559 <code>null</code>) 2560 * @param params the finder params (optionally <code>null</code>). To 2561 include the user's inherited organizations and user groups in the 2562 search, add entries having "usersGroups" and 2563 "inherit" as keys mapped to the the user's ID. For more 2564 information see {@link 2565 com.liferay.portal.service.persistence.GroupFinder} 2566 * @param andOperator whether every field must match its keywords, or just 2567 one field. 2568 * @param start the lower bound of the range of groups to return 2569 * @param end the upper bound of the range of groups to return (not 2570 inclusive) 2571 * @param obc the comparator to order the groups (optionally 2572 <code>null</code>) 2573 * @return the matching groups ordered by comparator <code>obc</code> 2574 * @throws SystemException if a system exception occurred 2575 */ 2576 public static java.util.List<com.liferay.portal.model.Group> search( 2577 long companyId, java.lang.String name, java.lang.String description, 2578 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2579 boolean andOperator, int start, int end, 2580 com.liferay.portal.kernel.util.OrderByComparator obc) 2581 throws com.liferay.portal.kernel.exception.SystemException { 2582 return getService() 2583 .search(companyId, name, description, params, andOperator, 2584 start, end, obc); 2585 } 2586 2587 /** 2588 * Returns the number of groups belonging to the parent group that match the 2589 * keywords, optionally including the user's inherited organization groups 2590 * and user groups. System and staged groups are not included. 2591 * 2592 * @param companyId the primary key of the company 2593 * @param parentGroupId the primary key of the parent group 2594 * @param keywords the keywords (space separated), which may occur in the 2595 sites's name, or description (optionally <code>null</code>) 2596 * @param params the finder params (optionally <code>null</code>). To 2597 include the user's inherited organization groups and user groups 2598 in the search, add entries having "usersGroups" and 2599 "inherit" as keys mapped to the the user's ID. For more 2600 information see {@link 2601 com.liferay.portal.service.persistence.GroupFinder} 2602 * @return the number of matching groups 2603 * @throws SystemException if a system exception occurred 2604 */ 2605 public static int searchCount(long companyId, long parentGroupId, 2606 java.lang.String keywords, 2607 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2608 throws com.liferay.portal.kernel.exception.SystemException { 2609 return getService() 2610 .searchCount(companyId, parentGroupId, keywords, params); 2611 } 2612 2613 /** 2614 * Returns the number of groups belonging to the parent group and immediate 2615 * organization groups that match the name and description, optionally 2616 * including the user's inherited organization groups and user groups. 2617 * System and staged groups are not included. 2618 * 2619 * @param companyId the primary key of the company 2620 * @param parentGroupId the primary key of the parent group 2621 * @param name the group's name (optionally <code>null</code>) 2622 * @param description the group's description (optionally 2623 <code>null</code>) 2624 * @param params the finder params (optionally <code>null</code>). To 2625 include the user's inherited organization groups and user groups 2626 in the search, add entries having "usersGroups" and 2627 "inherit" as keys mapped to the the user's ID. For more 2628 information see {@link 2629 com.liferay.portal.service.persistence.GroupFinder} 2630 * @param andOperator whether every field must match its keywords, or just 2631 one field. 2632 * @return the number of matching groups 2633 * @throws SystemException if a system exception occurred 2634 */ 2635 public static int searchCount(long companyId, long parentGroupId, 2636 java.lang.String name, java.lang.String description, 2637 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2638 boolean andOperator) 2639 throws com.liferay.portal.kernel.exception.SystemException { 2640 return getService() 2641 .searchCount(companyId, parentGroupId, name, description, 2642 params, andOperator); 2643 } 2644 2645 /** 2646 * Returns the number of groups belonging to the parent group that match the 2647 * class name IDs, and keywords, optionally including the user's inherited 2648 * organization groups and user groups. System and staged groups are not 2649 * included. 2650 * 2651 * @param companyId the primary key of the company 2652 * @param classNameIds the primary keys of the class names of the entities 2653 the groups are related to (optionally <code>null</code>) 2654 * @param parentGroupId the primary key of the parent group 2655 * @param keywords the keywords (space separated), which may occur in the 2656 sites's name, or description (optionally <code>null</code>) 2657 * @param params the finder params (optionally <code>null</code>). To 2658 include the user's inherited organization groups and user groups 2659 in the search, add entries having "usersGroups" and 2660 "inherit" as keys mapped to the the user's ID. For more 2661 information see {@link 2662 com.liferay.portal.service.persistence.GroupFinder} 2663 * @return the number of matching groups 2664 * @throws SystemException if a system exception occurred 2665 */ 2666 public static int searchCount(long companyId, long[] classNameIds, 2667 long parentGroupId, java.lang.String keywords, 2668 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2669 throws com.liferay.portal.kernel.exception.SystemException { 2670 return getService() 2671 .searchCount(companyId, classNameIds, parentGroupId, 2672 keywords, params); 2673 } 2674 2675 /** 2676 * Returns the number of groups belonging to the parent group that match the 2677 * class name IDs, name, and description, optionally including the user's 2678 * inherited organization groups and user groups. System and staged groups 2679 * are not included. 2680 * 2681 * @param companyId the primary key of the company 2682 * @param classNameIds the primary keys of the class names of the entities 2683 the groups are related to (optionally <code>null</code>) 2684 * @param parentGroupId the primary key of the parent group 2685 * @param name the group's name (optionally <code>null</code>) 2686 * @param description the group's description (optionally 2687 <code>null</code>) 2688 * @param params the finder params (optionally <code>null</code>). To 2689 include the user's inherited organization groups and user groups 2690 in the search, add entries having "usersGroups" and 2691 "inherit" as keys mapped to the the user's ID. For more 2692 information see {@link 2693 com.liferay.portal.service.persistence.GroupFinder} 2694 * @param andOperator whether every field must match its keywords, or just 2695 one field. 2696 * @return the number of matching groups 2697 * @throws SystemException if a system exception occurred 2698 */ 2699 public static int searchCount(long companyId, long[] classNameIds, 2700 long parentGroupId, java.lang.String name, 2701 java.lang.String description, 2702 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2703 boolean andOperator) 2704 throws com.liferay.portal.kernel.exception.SystemException { 2705 return getService() 2706 .searchCount(companyId, classNameIds, parentGroupId, name, 2707 description, params, andOperator); 2708 } 2709 2710 /** 2711 * Returns the number of groups that match the class name IDs, and keywords, 2712 * optionally including the user's inherited organization groups and user 2713 * groups. System and staged groups are not included. 2714 * 2715 * @param companyId the primary key of the company 2716 * @param classNameIds the primary keys of the class names of the entities 2717 the groups are related to (optionally <code>null</code>) 2718 * @param keywords the keywords (space separated), which may occur in the 2719 sites's name, or description (optionally <code>null</code>) 2720 * @param params the finder params (optionally <code>null</code>). To 2721 include the user's inherited organization groups and user groups 2722 in the search, add entries having "usersGroups" and 2723 "inherit" as keys mapped to the the user's ID. For more 2724 information see {@link 2725 com.liferay.portal.service.persistence.GroupFinder} 2726 * @return the number of matching groups 2727 * @throws SystemException if a system exception occurred 2728 */ 2729 public static int searchCount(long companyId, long[] classNameIds, 2730 java.lang.String keywords, 2731 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2732 throws com.liferay.portal.kernel.exception.SystemException { 2733 return getService() 2734 .searchCount(companyId, classNameIds, keywords, params); 2735 } 2736 2737 /** 2738 * Returns the number of groups that match the class name IDs, name, and 2739 * description, optionally including the user's inherited organization 2740 * groups and user groups. System and staged groups are not included. 2741 * 2742 * @param companyId the primary key of the company 2743 * @param classNameIds the primary keys of the class names of the entities 2744 the groups are related to (optionally <code>null</code>) 2745 * @param name the group's name (optionally <code>null</code>) 2746 * @param description the group's description (optionally 2747 <code>null</code>) 2748 * @param params the finder params (optionally <code>null</code>). To 2749 include the user's inherited organization groups and user groups 2750 in the search, add entries having "usersGroups" and 2751 "inherit" as keys mapped to the the user's ID. For more 2752 information see {@link 2753 com.liferay.portal.service.persistence.GroupFinder} 2754 * @param andOperator whether every field must match its keywords, or just 2755 one field. 2756 * @return the number of matching groups 2757 * @throws SystemException if a system exception occurred 2758 */ 2759 public static int searchCount(long companyId, long[] classNameIds, 2760 java.lang.String name, java.lang.String description, 2761 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2762 boolean andOperator) 2763 throws com.liferay.portal.kernel.exception.SystemException { 2764 return getService() 2765 .searchCount(companyId, classNameIds, name, description, 2766 params, andOperator); 2767 } 2768 2769 /** 2770 * Returns the number of groups that match the keywords, optionally 2771 * including the user's inherited organization groups and user groups. 2772 * System and staged groups are not included. 2773 * 2774 * @param companyId the primary key of the company 2775 * @param keywords the keywords (space separated), which may occur in the 2776 sites's name, or description (optionally <code>null</code>) 2777 * @param params the finder params (optionally <code>null</code>). To 2778 include the user's inherited organization groups and user groups 2779 in the search, add entries having "usersGroups" and 2780 "inherit" as keys mapped to the the user's ID. For more 2781 information see {@link 2782 com.liferay.portal.service.persistence.GroupFinder} 2783 * @return the number of matching groups 2784 * @throws SystemException if a system exception occurred 2785 */ 2786 public static int searchCount(long companyId, java.lang.String keywords, 2787 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2788 throws com.liferay.portal.kernel.exception.SystemException { 2789 return getService().searchCount(companyId, keywords, params); 2790 } 2791 2792 /** 2793 * Returns the number of groups and immediate organization groups that match 2794 * the name and description, optionally including the user's inherited 2795 * organization groups and user groups. System and staged groups are not 2796 * included. 2797 * 2798 * @param companyId the primary key of the company 2799 * @param name the group's name (optionally <code>null</code>) 2800 * @param description the group's description (optionally 2801 <code>null</code>) 2802 * @param params the finder params (optionally <code>null</code>). To 2803 include the user's inherited organization groups and user groups 2804 in the search, add entries having "usersGroups" and 2805 "inherit" as keys mapped to the the user's ID. For more 2806 information see {@link 2807 com.liferay.portal.service.persistence.GroupFinder} 2808 * @param andOperator whether every field must match its keywords, or just 2809 one field. 2810 * @return the number of matching groups 2811 * @throws SystemException if a system exception occurred 2812 */ 2813 public static int searchCount(long companyId, java.lang.String name, 2814 java.lang.String description, 2815 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2816 boolean andOperator) 2817 throws com.liferay.portal.kernel.exception.SystemException { 2818 return getService() 2819 .searchCount(companyId, name, description, params, 2820 andOperator); 2821 } 2822 2823 /** 2824 * Removes the groups from the role. 2825 * 2826 * @param roleId the primary key of the role 2827 * @param groupIds the primary keys of the groups 2828 * @throws SystemException if a system exception occurred 2829 */ 2830 public static void unsetRoleGroups(long roleId, long[] groupIds) 2831 throws com.liferay.portal.kernel.exception.SystemException { 2832 getService().unsetRoleGroups(roleId, groupIds); 2833 } 2834 2835 /** 2836 * Removes the user from the groups. 2837 * 2838 * @param userId the primary key of the user 2839 * @param groupIds the primary keys of the groups 2840 * @throws SystemException if a system exception occurred 2841 */ 2842 public static void unsetUserGroups(long userId, long[] groupIds) 2843 throws com.liferay.portal.kernel.exception.SystemException { 2844 getService().unsetUserGroups(userId, groupIds); 2845 } 2846 2847 /** 2848 * Updates the group's asset replacing categories and tag names. 2849 * 2850 * @param userId the primary key of the user 2851 * @param group the group 2852 * @param assetCategoryIds the primary keys of the asset categories 2853 (optionally <code>null</code>) 2854 * @param assetTagNames the asset tag names (optionally <code>null</code>) 2855 * @throws PortalException if a user with the primary key could not be found 2856 * @throws SystemException if a system exception occurred 2857 */ 2858 public static void updateAsset(long userId, 2859 com.liferay.portal.model.Group group, long[] assetCategoryIds, 2860 java.lang.String[] assetTagNames) 2861 throws com.liferay.portal.kernel.exception.PortalException, 2862 com.liferay.portal.kernel.exception.SystemException { 2863 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames); 2864 } 2865 2866 /** 2867 * Updates the group's friendly URL. 2868 * 2869 * @param groupId the primary key of the group 2870 * @param friendlyURL the group's new friendlyURL (optionally 2871 <code>null</code>) 2872 * @return the group 2873 * @throws PortalException if a group with the primary key could not be 2874 found or if a valid friendly URL could not be created for the 2875 group 2876 * @throws SystemException if a system exception occurred 2877 */ 2878 public static com.liferay.portal.model.Group updateFriendlyURL( 2879 long groupId, java.lang.String friendlyURL) 2880 throws com.liferay.portal.kernel.exception.PortalException, 2881 com.liferay.portal.kernel.exception.SystemException { 2882 return getService().updateFriendlyURL(groupId, friendlyURL); 2883 } 2884 2885 /** 2886 * Updates the group. 2887 * 2888 * @param groupId the primary key of the group 2889 * @param parentGroupId the primary key of the parent group 2890 * @param name the group's new name 2891 * @param description the group's new description (optionally 2892 <code>null</code>) 2893 * @param type the group's new type. For more information see {@link 2894 com.liferay.portal.model.GroupConstants} 2895 * @param friendlyURL the group's new friendlyURL (optionally 2896 <code>null</code>) 2897 * @param active whether the group is active 2898 * @param serviceContext the service context to be applied (optionally 2899 <code>null</code>). Can set asset category IDs and asset tag 2900 names for the group. 2901 * @return the group 2902 * @throws PortalException if a group with the primary key could not be 2903 found or if the friendly URL was invalid or could one not be 2904 created 2905 * @throws SystemException if a system exception occurred 2906 */ 2907 public static com.liferay.portal.model.Group updateGroup(long groupId, 2908 long parentGroupId, java.lang.String name, 2909 java.lang.String description, int type, boolean manualMembership, 2910 int membershipRestriction, java.lang.String friendlyURL, 2911 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 2912 throws com.liferay.portal.kernel.exception.PortalException, 2913 com.liferay.portal.kernel.exception.SystemException { 2914 return getService() 2915 .updateGroup(groupId, parentGroupId, name, description, 2916 type, manualMembership, membershipRestriction, friendlyURL, active, 2917 serviceContext); 2918 } 2919 2920 /** 2921 * Updates the group's type settings. 2922 * 2923 * @param groupId the primary key of the group 2924 * @param typeSettings the group's new type settings (optionally 2925 <code>null</code>) 2926 * @return the group 2927 * @throws PortalException if a group with the primary key could not be 2928 found 2929 * @throws SystemException if a system exception occurred 2930 */ 2931 public static com.liferay.portal.model.Group updateGroup(long groupId, 2932 java.lang.String typeSettings) 2933 throws com.liferay.portal.kernel.exception.PortalException, 2934 com.liferay.portal.kernel.exception.SystemException { 2935 return getService().updateGroup(groupId, typeSettings); 2936 } 2937 2938 /** 2939 * Associates the group with a main site if the group is an organization. 2940 * 2941 * @param groupId the primary key of the group 2942 * @param site whether the group is to be associated with a main site 2943 * @return the group 2944 * @throws PortalException if a group with the primary key could not be 2945 found 2946 * @throws SystemException if a system exception occurred 2947 */ 2948 public static com.liferay.portal.model.Group updateSite(long groupId, 2949 boolean site) 2950 throws com.liferay.portal.kernel.exception.PortalException, 2951 com.liferay.portal.kernel.exception.SystemException { 2952 return getService().updateSite(groupId, site); 2953 } 2954 2955 public static GroupLocalService getService() { 2956 if (_service == null) { 2957 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName()); 2958 2959 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class, 2960 "_service"); 2961 } 2962 2963 return _service; 2964 } 2965 2966 /** 2967 * @deprecated As of 6.2.0 2968 */ 2969 public void setService(GroupLocalService service) { 2970 } 2971 2972 private static GroupLocalService _service; 2973 }