001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import 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 the company group. 1090 * 1091 * @param companyId the primary key of the company 1092 * @return the group associated with the company 1093 * @throws PortalException if a matching group could not be found 1094 * @throws SystemException if a system exception occurred 1095 */ 1096 public static com.liferay.portal.model.Group getCompanyGroup(long companyId) 1097 throws com.liferay.portal.kernel.exception.PortalException, 1098 com.liferay.portal.kernel.exception.SystemException { 1099 return getService().getCompanyGroup(companyId); 1100 } 1101 1102 /** 1103 * Returns a range of all the groups associated with the company. 1104 * 1105 * <p> 1106 * Useful when paginating results. Returns a maximum of <code>end - 1107 * start</code> instances. <code>start</code> and <code>end</code> are not 1108 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1109 * refers to the first result in the set. Setting both <code>start</code> 1110 * and <code>end</code> to {@link 1111 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1112 * result set. 1113 * </p> 1114 * 1115 * @param companyId the primary key of the company 1116 * @param start the lower bound of the range of groups to return 1117 * @param end the upper bound of the range of groups to return (not 1118 inclusive) 1119 * @return the range of groups associated with the company 1120 * @throws SystemException if a system exception occurred 1121 */ 1122 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups( 1123 long companyId, int start, int end) 1124 throws com.liferay.portal.kernel.exception.SystemException { 1125 return getService().getCompanyGroups(companyId, start, end); 1126 } 1127 1128 /** 1129 * Returns the number of groups associated with the company. 1130 * 1131 * @param companyId the primary key of the company 1132 * @return the number of groups associated with the company 1133 * @throws SystemException if a system exception occurred 1134 */ 1135 public static int getCompanyGroupsCount(long companyId) 1136 throws com.liferay.portal.kernel.exception.SystemException { 1137 return getService().getCompanyGroupsCount(companyId); 1138 } 1139 1140 /** 1141 * Returns the group with the matching friendly URL. 1142 * 1143 * @param companyId the primary key of the company 1144 * @param friendlyURL the group's friendlyURL 1145 * @return the group with the friendly URL 1146 * @throws PortalException if a matching group could not be found, or if the 1147 friendly URL was invalid 1148 * @throws SystemException if a system exception occurred 1149 */ 1150 public static com.liferay.portal.model.Group getFriendlyURLGroup( 1151 long companyId, java.lang.String friendlyURL) 1152 throws com.liferay.portal.kernel.exception.PortalException, 1153 com.liferay.portal.kernel.exception.SystemException { 1154 return getService().getFriendlyURLGroup(companyId, friendlyURL); 1155 } 1156 1157 /** 1158 * Returns the group with the matching group name. 1159 * 1160 * @param companyId the primary key of the company 1161 * @param name the group's name 1162 * @return the group with the name 1163 * @throws PortalException if a matching group could not be found 1164 * @throws SystemException if a system exception occurred 1165 */ 1166 public static com.liferay.portal.model.Group getGroup(long companyId, 1167 java.lang.String name) 1168 throws com.liferay.portal.kernel.exception.PortalException, 1169 com.liferay.portal.kernel.exception.SystemException { 1170 return getService().getGroup(companyId, name); 1171 } 1172 1173 public static java.lang.String getGroupDescriptiveName( 1174 com.liferay.portal.model.Group group, java.util.Locale locale) 1175 throws com.liferay.portal.kernel.exception.PortalException, 1176 com.liferay.portal.kernel.exception.SystemException { 1177 return getService().getGroupDescriptiveName(group, locale); 1178 } 1179 1180 public static java.lang.String getGroupDescriptiveName(long groupId, 1181 java.util.Locale locale) 1182 throws com.liferay.portal.kernel.exception.PortalException, 1183 com.liferay.portal.kernel.exception.SystemException { 1184 return getService().getGroupDescriptiveName(groupId, locale); 1185 } 1186 1187 /** 1188 * Returns all the groups that are direct children of the parent group. 1189 * 1190 * @param companyId the primary key of the company 1191 * @param parentGroupId the primary key of the parent group 1192 * @param site whether the group is to be associated with a main site 1193 * @return the matching groups, or <code>null</code> if no matches were 1194 found 1195 * @throws SystemException if a system exception occurred 1196 */ 1197 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1198 long companyId, long parentGroupId, boolean site) 1199 throws com.liferay.portal.kernel.exception.SystemException { 1200 return getService().getGroups(companyId, parentGroupId, site); 1201 } 1202 1203 /** 1204 * Returns all the groups that are direct children of the parent group with 1205 * the matching className. 1206 * 1207 * @param companyId the primary key of the company 1208 * @param className the class name of the group 1209 * @param parentGroupId the primary key of the parent group 1210 * @return the matching groups, or <code>null</code> if no matches were 1211 found 1212 * @throws SystemException if a system exception occurred 1213 */ 1214 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1215 long companyId, java.lang.String className, long parentGroupId) 1216 throws com.liferay.portal.kernel.exception.SystemException { 1217 return getService().getGroups(companyId, className, parentGroupId); 1218 } 1219 1220 /** 1221 * Returns a range of all the groups that are direct children of the parent 1222 * group with the matching className. 1223 * 1224 * @param companyId the primary key of the company 1225 * @param className the class name of the group 1226 * @param parentGroupId the primary key of the parent group 1227 * @param start the lower bound of the range of results 1228 * @param end the upper bound of the range of results (not inclusive) 1229 * @return the range of matching groups 1230 * @throws SystemException if a system exception occurred 1231 */ 1232 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1233 long companyId, java.lang.String className, long parentGroupId, 1234 int start, int end) 1235 throws com.liferay.portal.kernel.exception.SystemException { 1236 return getService() 1237 .getGroups(companyId, className, parentGroupId, start, end); 1238 } 1239 1240 /** 1241 * Returns the groups with the matching primary keys. 1242 * 1243 * @param groupIds the primary keys of the groups 1244 * @return the groups with the primary keys 1245 * @throws PortalException if any one of the groups could not be found 1246 * @throws SystemException if a system exception occurred 1247 */ 1248 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1249 long[] groupIds) 1250 throws com.liferay.portal.kernel.exception.PortalException, 1251 com.liferay.portal.kernel.exception.SystemException { 1252 return getService().getGroups(groupIds); 1253 } 1254 1255 /** 1256 * Returns the number of groups that are direct children of the parent 1257 * group. 1258 * 1259 * @param companyId the primary key of the company 1260 * @param parentGroupId the primary key of the parent group 1261 * @param site whether the group is to be associated with a main site 1262 * @return the number of matching groups 1263 * @throws SystemException if a system exception occurred 1264 */ 1265 public static int getGroupsCount(long companyId, long parentGroupId, 1266 boolean site) 1267 throws com.liferay.portal.kernel.exception.SystemException { 1268 return getService().getGroupsCount(companyId, parentGroupId, site); 1269 } 1270 1271 /** 1272 * Returns the number of groups that are direct children of the parent group 1273 * with the matching className. 1274 * 1275 * @param companyId the primary key of the company 1276 * @param className the class name of the group 1277 * @param parentGroupId the primary key of the parent group 1278 * @return the number of matching groups 1279 * @throws SystemException if a system exception occurred 1280 */ 1281 public static int getGroupsCount(long companyId, 1282 java.lang.String className, long parentGroupId) 1283 throws com.liferay.portal.kernel.exception.SystemException { 1284 return getService().getGroupsCount(companyId, className, parentGroupId); 1285 } 1286 1287 /** 1288 * Returns the group associated with the layout. 1289 * 1290 * @param companyId the primary key of the company 1291 * @param plid the primary key of the layout 1292 * @return the group associated with the layout 1293 * @throws PortalException if a matching group could not be found 1294 * @throws SystemException if a system exception occurred 1295 */ 1296 public static com.liferay.portal.model.Group getLayoutGroup( 1297 long companyId, long plid) 1298 throws com.liferay.portal.kernel.exception.PortalException, 1299 com.liferay.portal.kernel.exception.SystemException { 1300 return getService().getLayoutGroup(companyId, plid); 1301 } 1302 1303 /** 1304 * Returns the group associated with the layout prototype. 1305 * 1306 * @param companyId the primary key of the company 1307 * @param layoutPrototypeId the primary key of the layout prototype 1308 * @return the group associated with the layout prototype 1309 * @throws PortalException if a matching group could not be found 1310 * @throws SystemException if a system exception occurred 1311 */ 1312 public static com.liferay.portal.model.Group getLayoutPrototypeGroup( 1313 long companyId, long layoutPrototypeId) 1314 throws com.liferay.portal.kernel.exception.PortalException, 1315 com.liferay.portal.kernel.exception.SystemException { 1316 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId); 1317 } 1318 1319 /** 1320 * Returns the group associated with the layout set prototype. 1321 * 1322 * @param companyId the primary key of the company 1323 * @param layoutSetPrototypeId the primary key of the layout set prototype 1324 * @return the group associated with the layout set prototype 1325 * @throws PortalException if a matching group could not be found 1326 * @throws SystemException if a system exception occurred 1327 */ 1328 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup( 1329 long companyId, long layoutSetPrototypeId) 1330 throws com.liferay.portal.kernel.exception.PortalException, 1331 com.liferay.portal.kernel.exception.SystemException { 1332 return getService() 1333 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId); 1334 } 1335 1336 /** 1337 * Returns a range of all groups that are children of the parent group and 1338 * that have at least one layout. 1339 * 1340 * <p> 1341 * Useful when paginating results. Returns a maximum of <code>end - 1342 * start</code> instances. <code>start</code> and <code>end</code> are not 1343 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1344 * refers to the first result in the set. Setting both <code>start</code> 1345 * and <code>end</code> to {@link 1346 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1347 * result set. 1348 * </p> 1349 * 1350 * @param companyId the primary key of the company 1351 * @param parentGroupId the primary key of the parent group 1352 * @param site whether the group is to be associated with a main site 1353 * @param start the lower bound of the range of groups to return 1354 * @param end the upper bound of the range of groups to return (not 1355 inclusive) 1356 * @return the range of matching groups 1357 * @throws SystemException if a system exception occurred 1358 * @deprecated As of 6.2.0, replaced by {@link #getLayoutsGroups(long, long, 1359 boolean, int, int, OrderByComparator)} 1360 */ 1361 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 1362 long companyId, long parentGroupId, boolean site, int start, int end) 1363 throws com.liferay.portal.kernel.exception.SystemException { 1364 return getService() 1365 .getLayoutsGroups(companyId, parentGroupId, site, start, end); 1366 } 1367 1368 /** 1369 * Returns a range of all groups that are children of the parent group and 1370 * that have at least one layout. 1371 * 1372 * <p> 1373 * Useful when paginating results. Returns a maximum of <code>end - 1374 * start</code> instances. <code>start</code> and <code>end</code> are not 1375 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1376 * refers to the first result in the set. Setting both <code>start</code> 1377 * and <code>end</code> to {@link 1378 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1379 * result set. 1380 * </p> 1381 * 1382 * @param companyId the primary key of the company 1383 * @param parentGroupId the primary key of the parent group 1384 * @param site whether the group is to be associated with a main site 1385 * @param start the lower bound of the range of groups to return 1386 * @param end the upper bound of the range of groups to return (not 1387 inclusive) 1388 * @param obc the comparator to order the groups (optionally 1389 <code>null</code>) 1390 * @return the range of matching groups ordered by comparator 1391 <code>obc</code> 1392 * @throws SystemException if a system exception occurred 1393 */ 1394 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 1395 long companyId, long parentGroupId, boolean site, int start, int end, 1396 com.liferay.portal.kernel.util.OrderByComparator obc) 1397 throws com.liferay.portal.kernel.exception.SystemException { 1398 return getService() 1399 .getLayoutsGroups(companyId, parentGroupId, site, start, 1400 end, obc); 1401 } 1402 1403 /** 1404 * Returns the number of groups that are children or the parent group and 1405 * that have at least one layout 1406 * 1407 * @param companyId the primary key of the company 1408 * @param parentGroupId the primary key of the parent group 1409 * @param site whether the group is to be associated with a main site 1410 * @return the number of matching groups 1411 * @throws SystemException if a system exception occurred 1412 */ 1413 public static int getLayoutsGroupsCount(long companyId, long parentGroupId, 1414 boolean site) 1415 throws com.liferay.portal.kernel.exception.SystemException { 1416 return getService().getLayoutsGroupsCount(companyId, parentGroupId, site); 1417 } 1418 1419 /** 1420 * Returns all live groups. 1421 * 1422 * @return all live groups 1423 * @throws SystemException if a system exception occurred 1424 */ 1425 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups() 1426 throws com.liferay.portal.kernel.exception.SystemException { 1427 return getService().getLiveGroups(); 1428 } 1429 1430 /** 1431 * Returns a range of all non-system groups of a specified type (className) 1432 * that have no layouts. 1433 * 1434 * <p> 1435 * Useful when paginating results. Returns a maximum of <code>end - 1436 * start</code> instances. <code>start</code> and <code>end</code> are not 1437 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1438 * refers to the first result in the set. Setting both <code>start</code> 1439 * and <code>end</code> to {@link 1440 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1441 * result set. 1442 * </p> 1443 * 1444 * @param className the entity's class name 1445 * @param privateLayout whether to include groups with private layout sets 1446 or non-private layout sets 1447 * @param start the lower bound of the range of groups to return 1448 * @param end the upper bound of the range of groups to return (not 1449 inclusive) 1450 * @return the range of matching groups 1451 * @throws SystemException if a system exception occurred 1452 */ 1453 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups( 1454 java.lang.String className, boolean privateLayout, int start, int end) 1455 throws com.liferay.portal.kernel.exception.SystemException { 1456 return getService() 1457 .getNoLayoutsGroups(className, privateLayout, start, end); 1458 } 1459 1460 /** 1461 * Returns all non-system groups having <code>null</code> or empty friendly 1462 * URLs. 1463 * 1464 * @return the non-system groups having <code>null</code> or empty friendly 1465 URLs 1466 * @throws SystemException if a system exception occurred 1467 */ 1468 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups() 1469 throws com.liferay.portal.kernel.exception.SystemException { 1470 return getService().getNullFriendlyURLGroups(); 1471 } 1472 1473 /** 1474 * Returns the specified organization group. 1475 * 1476 * @param companyId the primary key of the company 1477 * @param organizationId the primary key of the organization 1478 * @return the group associated with the organization 1479 * @throws PortalException if a matching group could not be found 1480 * @throws SystemException if a system exception occurred 1481 */ 1482 public static com.liferay.portal.model.Group getOrganizationGroup( 1483 long companyId, long organizationId) 1484 throws com.liferay.portal.kernel.exception.PortalException, 1485 com.liferay.portal.kernel.exception.SystemException { 1486 return getService().getOrganizationGroup(companyId, organizationId); 1487 } 1488 1489 /** 1490 * Returns the specified organization groups. 1491 * 1492 * @param organizations the organizations 1493 * @return the groups associated with the organizations 1494 */ 1495 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 1496 java.util.List<com.liferay.portal.model.Organization> organizations) { 1497 return getService().getOrganizationsGroups(organizations); 1498 } 1499 1500 /** 1501 * Returns all the groups related to the organizations. 1502 * 1503 * @param organizations the organizations 1504 * @return the groups related to the organizations 1505 * @throws SystemException if a system exception occurred 1506 */ 1507 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups( 1508 java.util.List<com.liferay.portal.model.Organization> organizations) 1509 throws com.liferay.portal.kernel.exception.SystemException { 1510 return getService().getOrganizationsRelatedGroups(organizations); 1511 } 1512 1513 /** 1514 * Returns the group followed by all its parent groups ordered by closest 1515 * ancestor. 1516 * 1517 * @param groupId the primary key of the group 1518 * @return the group followed by all its parent groups ordered by closest 1519 ancestor 1520 * @throws PortalException if a group with the primary key could not be 1521 found 1522 * @throws SystemException if a system exception occurred 1523 */ 1524 public static java.util.List<com.liferay.portal.model.Group> getParentGroups( 1525 long groupId) 1526 throws com.liferay.portal.kernel.exception.PortalException, 1527 com.liferay.portal.kernel.exception.SystemException { 1528 return getService().getParentGroups(groupId); 1529 } 1530 1531 /** 1532 * Returns the staging group. 1533 * 1534 * @param liveGroupId the primary key of the live group 1535 * @return the staging group 1536 * @throws PortalException if a matching staging group could not be found 1537 * @throws SystemException if a system exception occurred 1538 */ 1539 public static com.liferay.portal.model.Group getStagingGroup( 1540 long liveGroupId) 1541 throws com.liferay.portal.kernel.exception.PortalException, 1542 com.liferay.portal.kernel.exception.SystemException { 1543 return getService().getStagingGroup(liveGroupId); 1544 } 1545 1546 /** 1547 * Returns the group associated with the user. 1548 * 1549 * @param companyId the primary key of the company 1550 * @param userId the primary key of the user 1551 * @return the group associated with the user 1552 * @throws PortalException if a matching group could not be found 1553 * @throws SystemException if a system exception occurred 1554 */ 1555 public static com.liferay.portal.model.Group getUserGroup(long companyId, 1556 long userId) 1557 throws com.liferay.portal.kernel.exception.PortalException, 1558 com.liferay.portal.kernel.exception.SystemException { 1559 return getService().getUserGroup(companyId, userId); 1560 } 1561 1562 /** 1563 * Returns the specified "user group" group. That is, the group that 1564 * represents the {@link com.liferay.portal.model.UserGroup} entity. 1565 * 1566 * @param companyId the primary key of the company 1567 * @param userGroupId the primary key of the user group 1568 * @return the group associated with the user group 1569 * @throws PortalException if a matching group could not be found 1570 * @throws SystemException if a system exception occurred 1571 */ 1572 public static com.liferay.portal.model.Group getUserGroupGroup( 1573 long companyId, long userGroupId) 1574 throws com.liferay.portal.kernel.exception.PortalException, 1575 com.liferay.portal.kernel.exception.SystemException { 1576 return getService().getUserGroupGroup(companyId, userGroupId); 1577 } 1578 1579 /** 1580 * Returns all the user's site groups and immediate organization groups, 1581 * optionally including the user's inherited organization groups and user 1582 * groups. System and staged groups are not included. 1583 * 1584 * @param userId the primary key of the user 1585 * @param inherit whether to include the user's inherited organization 1586 groups and user groups 1587 * @return the user's groups and immediate organization groups 1588 * @throws PortalException if a user with the primary key could not be found 1589 * @throws SystemException if a system exception occurred 1590 */ 1591 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1592 long userId, boolean inherit) 1593 throws com.liferay.portal.kernel.exception.PortalException, 1594 com.liferay.portal.kernel.exception.SystemException { 1595 return getService().getUserGroups(userId, inherit); 1596 } 1597 1598 /** 1599 * Returns an ordered range of all the user's site groups and immediate 1600 * organization groups, optionally including the user's inherited 1601 * organization groups and user groups. System and staged groups are not 1602 * included. 1603 * 1604 * <p> 1605 * Useful when paginating results. Returns a maximum of <code>end - 1606 * start</code> instances. <code>start</code> and <code>end</code> are not 1607 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1608 * refers to the first result in the set. Setting both <code>start</code> 1609 * and <code>end</code> to {@link 1610 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1611 * result set. 1612 * </p> 1613 * 1614 * @param userId the primary key of the user 1615 * @param inherit whether to include the user's inherited organization 1616 groups and user groups 1617 * @param start the lower bound of the range of groups to return 1618 * @param end the upper bound of the range of groups to return (not 1619 inclusive) 1620 * @return the range of the user's groups and immediate organization groups 1621 ordered by name 1622 * @throws PortalException if a user with the primary key could not be found 1623 * @throws SystemException if a system exception occurred 1624 */ 1625 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1626 long userId, boolean inherit, int start, int end) 1627 throws com.liferay.portal.kernel.exception.PortalException, 1628 com.liferay.portal.kernel.exception.SystemException { 1629 return getService().getUserGroups(userId, inherit, start, end); 1630 } 1631 1632 /** 1633 * Returns the groups associated with the user groups. 1634 * 1635 * @param userGroups the user groups 1636 * @return the groups associated with the user groups 1637 * @throws PortalException if any one of the user group's group could not be 1638 found 1639 * @throws SystemException if a system exception occurred 1640 */ 1641 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 1642 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1643 throws com.liferay.portal.kernel.exception.PortalException, 1644 com.liferay.portal.kernel.exception.SystemException { 1645 return getService().getUserGroupsGroups(userGroups); 1646 } 1647 1648 /** 1649 * Returns all the groups related to the user groups. 1650 * 1651 * @param userGroups the user groups 1652 * @return the groups related to the user groups 1653 * @throws SystemException if a system exception occurred 1654 */ 1655 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups( 1656 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1657 throws com.liferay.portal.kernel.exception.SystemException { 1658 return getService().getUserGroupsRelatedGroups(userGroups); 1659 } 1660 1661 /** 1662 * Returns the range of all groups associated with the user's organization 1663 * groups, including the ancestors of the organization groups, unless portal 1664 * property <code>organizations.membership.strict</code> is set to 1665 * <code>true</code>. 1666 * 1667 * <p> 1668 * Useful when paginating results. Returns a maximum of <code>end - 1669 * start</code> instances. <code>start</code> and <code>end</code> are not 1670 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1671 * refers to the first result in the set. Setting both <code>start</code> 1672 * and <code>end</code> to {@link 1673 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1674 * result set. 1675 * </p> 1676 * 1677 * @param userId the primary key of the user 1678 * @param start the lower bound of the range of groups to consider 1679 * @param end the upper bound of the range of groups to consider (not 1680 inclusive) 1681 * @return the range of groups associated with the user's organization 1682 groups 1683 * @throws PortalException if a user with the primary key could not be found 1684 or if another portal exception occurred 1685 * @throws SystemException if a system exception occurred 1686 */ 1687 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 1688 long userId, int start, int end) 1689 throws com.liferay.portal.kernel.exception.PortalException, 1690 com.liferay.portal.kernel.exception.SystemException { 1691 return getService().getUserOrganizationsGroups(userId, start, end); 1692 } 1693 1694 public static com.liferay.portal.model.Group getUserPersonalSiteGroup( 1695 long companyId) 1696 throws com.liferay.portal.kernel.exception.PortalException, 1697 com.liferay.portal.kernel.exception.SystemException { 1698 return getService().getUserPersonalSiteGroup(companyId); 1699 } 1700 1701 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1702 long userId) 1703 throws com.liferay.portal.kernel.exception.PortalException, 1704 com.liferay.portal.kernel.exception.SystemException { 1705 return getService().getUserSitesGroups(userId); 1706 } 1707 1708 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1709 long userId, boolean includeAdministrative) 1710 throws com.liferay.portal.kernel.exception.PortalException, 1711 com.liferay.portal.kernel.exception.SystemException { 1712 return getService().getUserSitesGroups(userId, includeAdministrative); 1713 } 1714 1715 /** 1716 * Returns <code>true</code> if the live group has a staging group. 1717 * 1718 * @param liveGroupId the primary key of the live group 1719 * @return <code>true</code> if the live group has a staging group; 1720 <code>false</code> otherwise 1721 * @throws SystemException if a system exception occurred 1722 */ 1723 public static boolean hasStagingGroup(long liveGroupId) 1724 throws com.liferay.portal.kernel.exception.SystemException { 1725 return getService().hasStagingGroup(liveGroupId); 1726 } 1727 1728 /** 1729 * Returns <code>true</code> if the user is immediately associated with the 1730 * group, or optionally if the user is associated with the group via the 1731 * user's organizations, inherited organizations, or user groups. 1732 * 1733 * @param userId the primary key of the user 1734 * @param groupId the primary key of the group 1735 * @param inherit whether to include organization groups and user groups to 1736 which the user belongs in the determination 1737 * @return <code>true</code> if the user is associated with the group; 1738 <code>false</code> otherwise 1739 * @throws SystemException if a system exception occurred 1740 */ 1741 public static boolean hasUserGroup(long userId, long groupId, 1742 boolean inherit) 1743 throws com.liferay.portal.kernel.exception.SystemException { 1744 return getService().hasUserGroup(userId, groupId, inherit); 1745 } 1746 1747 /** 1748 * Returns the group with the matching group name by first searching the 1749 * system groups and then using the finder cache. 1750 * 1751 * @param companyId the primary key of the company 1752 * @param name the group's name 1753 * @return the group with the name and associated company, or 1754 <code>null</code> if a matching group could not be found 1755 * @throws SystemException if a system exception occurred 1756 */ 1757 public static com.liferay.portal.model.Group loadFetchGroup( 1758 long companyId, java.lang.String name) 1759 throws com.liferay.portal.kernel.exception.SystemException { 1760 return getService().loadFetchGroup(companyId, name); 1761 } 1762 1763 /** 1764 * Returns the group with the matching group name. 1765 * 1766 * @param companyId the primary key of the company 1767 * @param name the group's name 1768 * @return the group with the name and associated company 1769 * @throws PortalException if a matching group could not be found 1770 * @throws SystemException if a system exception occurred 1771 */ 1772 public static com.liferay.portal.model.Group loadGetGroup(long companyId, 1773 java.lang.String name) 1774 throws com.liferay.portal.kernel.exception.PortalException, 1775 com.liferay.portal.kernel.exception.SystemException { 1776 return getService().loadGetGroup(companyId, name); 1777 } 1778 1779 /** 1780 * Rebuilds the group tree. 1781 * 1782 * <p> 1783 * Only call this method if the tree has become stale through operations 1784 * other than normal CRUD. Under normal circumstances the tree is 1785 * automatically rebuilt whenever necessary. 1786 * </p> 1787 * 1788 * @param companyId the primary key of the group's company 1789 * @throws PortalException if a group with the primary key could not be 1790 found 1791 * @throws SystemException if a system exception occurred 1792 */ 1793 public static void rebuildTree(long companyId) 1794 throws com.liferay.portal.kernel.exception.PortalException, 1795 com.liferay.portal.kernel.exception.SystemException { 1796 getService().rebuildTree(companyId); 1797 } 1798 1799 /** 1800 * Returns an ordered range of all the company's groups, optionally 1801 * including the user's inherited organization groups and user groups. 1802 * System and staged groups are not included. 1803 * 1804 * <p> 1805 * Useful when paginating results. Returns a maximum of <code>end - 1806 * start</code> instances. <code>start</code> and <code>end</code> are not 1807 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1808 * refers to the first result in the set. Setting both <code>start</code> 1809 * and <code>end</code> to {@link 1810 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1811 * result set. 1812 * </p> 1813 * 1814 * @param companyId the primary key of the company 1815 * @param params the finder params (optionally <code>null</code>). To 1816 include a user's organizations, inherited organizations, and user 1817 groups in the search, add an entry with key 1818 "usersGroups" mapped to the user's ID and an entry with 1819 key "inherit" mapped to a non-<code>null</code> object. 1820 For more information see {@link 1821 com.liferay.portal.service.persistence.GroupFinder} 1822 * @param start the lower bound of the range of groups to return 1823 * @param end the upper bound of the range of groups to return (not 1824 inclusive) 1825 * @return the matching groups ordered by name 1826 * @throws SystemException if a system exception occurred 1827 */ 1828 public static java.util.List<com.liferay.portal.model.Group> search( 1829 long companyId, 1830 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1831 int start, int end) 1832 throws com.liferay.portal.kernel.exception.SystemException { 1833 return getService().search(companyId, params, start, end); 1834 } 1835 1836 /** 1837 * Returns an ordered range of all the groups belonging to the parent group 1838 * that match the keywords, optionally including the user's inherited 1839 * organization groups and user groups. System and staged groups are not 1840 * included. 1841 * 1842 * <p> 1843 * Useful when paginating results. Returns a maximum of <code>end - 1844 * start</code> instances. <code>start</code> and <code>end</code> are not 1845 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1846 * refers to the first result in the set. Setting both <code>start</code> 1847 * and <code>end</code> to {@link 1848 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1849 * result set. 1850 * </p> 1851 * 1852 * @param companyId the primary key of the company 1853 * @param parentGroupId the primary key of the parent group 1854 * @param keywords the keywords (space separated), which may occur in the 1855 sites's name, or description (optionally <code>null</code>) 1856 * @param params the finder params (optionally <code>null</code>). To 1857 include the user's inherited organizations and user groups in the 1858 search, add entries having "usersGroups" and 1859 "inherit" as keys mapped to the the user's ID. For more 1860 information see {@link 1861 com.liferay.portal.service.persistence.GroupFinder} 1862 * @param start the lower bound of the range of groups to return 1863 * @param end the upper bound of the range of groups to return (not 1864 inclusive) 1865 * @return the matching groups ordered by name 1866 * @throws SystemException if a system exception occurred 1867 */ 1868 public static java.util.List<com.liferay.portal.model.Group> search( 1869 long companyId, long parentGroupId, java.lang.String keywords, 1870 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1871 int start, int end) 1872 throws com.liferay.portal.kernel.exception.SystemException { 1873 return getService() 1874 .search(companyId, parentGroupId, keywords, params, start, 1875 end); 1876 } 1877 1878 /** 1879 * Returns an ordered range of all the groups belonging to the parent group 1880 * that match the keywords, optionally including the user's inherited 1881 * organization groups and user groups. System and staged groups are not 1882 * included. 1883 * 1884 * <p> 1885 * Useful when paginating results. Returns a maximum of <code>end - 1886 * start</code> instances. <code>start</code> and <code>end</code> are not 1887 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1888 * refers to the first result in the set. Setting both <code>start</code> 1889 * and <code>end</code> to {@link 1890 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1891 * result set. 1892 * </p> 1893 * 1894 * @param companyId the primary key of the company 1895 * @param parentGroupId the primary key of the parent group 1896 * @param keywords the keywords (space separated), which may occur in the 1897 sites's name, or description (optionally <code>null</code>) 1898 * @param params the finder params (optionally <code>null</code>). To 1899 include the user's inherited organizations and user groups in the 1900 search, add entries having "usersGroups" and 1901 "inherit" as keys mapped to the the user's ID. For more 1902 information see {@link 1903 com.liferay.portal.service.persistence.GroupFinder} 1904 * @param start the lower bound of the range of groups to return 1905 * @param end the upper bound of the range of groups to return (not 1906 inclusive) 1907 * @param obc the comparator to order the groups (optionally 1908 <code>null</code>) 1909 * @return the matching groups ordered by comparator <code>obc</code> 1910 * @throws SystemException if a system exception occurred 1911 */ 1912 public static java.util.List<com.liferay.portal.model.Group> search( 1913 long companyId, long parentGroupId, java.lang.String keywords, 1914 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1915 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1916 throws com.liferay.portal.kernel.exception.SystemException { 1917 return getService() 1918 .search(companyId, parentGroupId, keywords, params, start, 1919 end, obc); 1920 } 1921 1922 /** 1923 * Returns an ordered range of all the site groups belonging to the parent 1924 * group and organization groups that match the name and description, 1925 * optionally including the user's inherited organization groups and user 1926 * groups. System and staged groups are not included. 1927 * 1928 * <p> 1929 * Useful when paginating results. Returns a maximum of <code>end - 1930 * start</code> instances. <code>start</code> and <code>end</code> are not 1931 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1932 * refers to the first result in the set. Setting both <code>start</code> 1933 * and <code>end</code> to {@link 1934 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1935 * result set. 1936 * </p> 1937 * 1938 * @param companyId the primary key of the company 1939 * @param parentGroupId the primary key of the parent group 1940 * @param name the group's name (optionally <code>null</code>) 1941 * @param description the group's description (optionally 1942 <code>null</code>) 1943 * @param params the finder params (optionally <code>null</code>). To 1944 include the user's inherited organizations and user groups in the 1945 search, add entries having "usersGroups" and 1946 "inherit" as keys mapped to the the user's ID. For more 1947 information see {@link 1948 com.liferay.portal.service.persistence.GroupFinder} 1949 * @param andOperator whether every field must match its keywords, or just 1950 one field. 1951 * @param start the lower bound of the range of groups to return 1952 * @param end the upper bound of the range of groups to return (not 1953 inclusive) 1954 * @return the matching groups ordered by name 1955 * @throws SystemException if a system exception occurred 1956 */ 1957 public static java.util.List<com.liferay.portal.model.Group> search( 1958 long companyId, long parentGroupId, java.lang.String name, 1959 java.lang.String description, 1960 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1961 boolean andOperator, int start, int end) 1962 throws com.liferay.portal.kernel.exception.SystemException { 1963 return getService() 1964 .search(companyId, parentGroupId, name, description, params, 1965 andOperator, start, end); 1966 } 1967 1968 /** 1969 * Returns an ordered range of all the site groups belonging to the parent 1970 * group and organization groups that match the name and description, 1971 * optionally including the user's inherited organization groups and user 1972 * groups. System and staged groups are not included. 1973 * 1974 * <p> 1975 * Useful when paginating results. Returns a maximum of <code>end - 1976 * start</code> instances. <code>start</code> and <code>end</code> are not 1977 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1978 * refers to the first result in the set. Setting both <code>start</code> 1979 * and <code>end</code> to {@link 1980 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1981 * result set. 1982 * </p> 1983 * 1984 * @param companyId the primary key of the company 1985 * @param parentGroupId the primary key of the parent group 1986 * @param name the group's name (optionally <code>null</code>) 1987 * @param description the group's description (optionally 1988 <code>null</code>) 1989 * @param params the finder params (optionally <code>null</code>). To 1990 include the user's inherited organizations and user groups in the 1991 search, add entries having "usersGroups" and 1992 "inherit" as keys mapped to the the user's ID. For more 1993 information see {@link 1994 com.liferay.portal.service.persistence.GroupFinder} 1995 * @param andOperator whether every field must match its keywords, or just 1996 one field. 1997 * @param start the lower bound of the range of groups to return 1998 * @param end the upper bound of the range of groups to return (not 1999 inclusive) 2000 * @param obc the comparator to order the groups (optionally 2001 <code>null</code>) 2002 * @return the matching groups ordered by comparator <code>obc</code> 2003 * @throws SystemException if a system exception occurred 2004 */ 2005 public static java.util.List<com.liferay.portal.model.Group> search( 2006 long companyId, long parentGroupId, java.lang.String name, 2007 java.lang.String description, 2008 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2009 boolean andOperator, int start, int end, 2010 com.liferay.portal.kernel.util.OrderByComparator obc) 2011 throws com.liferay.portal.kernel.exception.SystemException { 2012 return getService() 2013 .search(companyId, parentGroupId, name, description, params, 2014 andOperator, start, end, obc); 2015 } 2016 2017 /** 2018 * Returns an ordered range of all the groups belonging to the parent group 2019 * that match the class name IDs and keywords, optionally including the 2020 * user's inherited organization groups and user groups. System and staged 2021 * groups are not included. 2022 * 2023 * <p> 2024 * Useful when paginating results. Returns a maximum of <code>end - 2025 * start</code> instances. <code>start</code> and <code>end</code> are not 2026 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2027 * refers to the first result in the set. Setting both <code>start</code> 2028 * and <code>end</code> to {@link 2029 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2030 * result set. 2031 * </p> 2032 * 2033 * @param companyId the primary key of the company 2034 * @param classNameIds the primary keys of the class names of the entities 2035 the groups are related to (optionally <code>null</code>) 2036 * @param parentGroupId the primary key of the parent group 2037 * @param keywords the keywords (space separated), which may occur in the 2038 sites's name, or description (optionally <code>null</code>) 2039 * @param params the finder params (optionally <code>null</code>). To 2040 include a user's organizations, inherited organizations, and user 2041 groups in the search, add an entry with key 2042 "usersGroups" mapped to the user's ID and an entry with 2043 key "inherit" mapped to a non-<code>null</code> object. 2044 For more information see {@link 2045 com.liferay.portal.service.persistence.GroupFinder} 2046 * @param start the lower bound of the range of groups to return 2047 * @param end the upper bound of the range of groups to return (not 2048 inclusive) 2049 * @return the matching groups ordered by name 2050 * @throws SystemException if a system exception occurred 2051 */ 2052 public static java.util.List<com.liferay.portal.model.Group> search( 2053 long companyId, long[] classNameIds, long parentGroupId, 2054 java.lang.String keywords, 2055 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2056 int start, int end) 2057 throws com.liferay.portal.kernel.exception.SystemException { 2058 return getService() 2059 .search(companyId, classNameIds, parentGroupId, keywords, 2060 params, start, end); 2061 } 2062 2063 /** 2064 * Returns an ordered range of all the groups belonging to the parent group 2065 * that match the class name IDs and keywords, optionally including the 2066 * user's inherited organization groups and user groups. System and staged 2067 * groups are not included. 2068 * 2069 * <p> 2070 * Useful when paginating results. Returns a maximum of <code>end - 2071 * start</code> instances. <code>start</code> and <code>end</code> are not 2072 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2073 * refers to the first result in the set. Setting both <code>start</code> 2074 * and <code>end</code> to {@link 2075 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2076 * result set. 2077 * </p> 2078 * 2079 * @param companyId the primary key of the company 2080 * @param classNameIds the primary keys of the class names of the entities 2081 the groups are related to (optionally <code>null</code>) 2082 * @param parentGroupId the primary key of the parent group 2083 * @param keywords the keywords (space separated), which may occur in the 2084 sites's name, or description (optionally <code>null</code>) 2085 * @param params the finder params (optionally <code>null</code>). To 2086 include a user's organizations, inherited organizations, and user 2087 groups in the search, add an entry with key 2088 "usersGroups" mapped to the user's ID and an entry with 2089 key "inherit" mapped to a non-<code>null</code> object. 2090 For more information see {@link 2091 com.liferay.portal.service.persistence.GroupFinder} 2092 * @param start the lower bound of the range of groups to return 2093 * @param end the upper bound of the range of groups to return (not 2094 inclusive) 2095 * @param obc the comparator to order the groups (optionally 2096 <code>null</code>) 2097 * @return the matching groups ordered by comparator <code>obc</code> 2098 * @throws SystemException if a system exception occurred 2099 */ 2100 public static java.util.List<com.liferay.portal.model.Group> search( 2101 long companyId, long[] classNameIds, long parentGroupId, 2102 java.lang.String keywords, 2103 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2104 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2105 throws com.liferay.portal.kernel.exception.SystemException { 2106 return getService() 2107 .search(companyId, classNameIds, parentGroupId, keywords, 2108 params, start, end, obc); 2109 } 2110 2111 /** 2112 * Returns an ordered range of all the groups belonging to the parent group 2113 * that match the class name IDs, name, and description, optionally 2114 * including the user's inherited organization groups and user groups. 2115 * System and staged groups are not included. 2116 * 2117 * <p> 2118 * Useful when paginating results. Returns a maximum of <code>end - 2119 * start</code> instances. <code>start</code> and <code>end</code> are not 2120 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2121 * refers to the first result in the set. Setting both <code>start</code> 2122 * and <code>end</code> to {@link 2123 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2124 * result set. 2125 * </p> 2126 * 2127 * @param companyId the primary key of the company 2128 * @param classNameIds the primary keys of the class names of the entities 2129 the groups are related to (optionally <code>null</code>) 2130 * @param parentGroupId the primary key of the parent group 2131 * @param name the group's name (optionally <code>null</code>) 2132 * @param description the group's description (optionally 2133 <code>null</code>) 2134 * @param params the finder params (optionally <code>null</code>). To 2135 include a user's organizations, inherited organizations, and user 2136 groups in the search, add an entry with key 2137 "usersGroups" mapped to the user's ID and an entry with 2138 key "inherit" mapped to a non-<code>null</code> object. 2139 For more information see {@link 2140 com.liferay.portal.service.persistence.GroupFinder} 2141 * @param andOperator whether every field must match its keywords, or just 2142 one field. 2143 * @param start the lower bound of the range of groups to return 2144 * @param end the upper bound of the range of groups to return (not 2145 inclusive) 2146 * @return the matching groups ordered by name 2147 * @throws SystemException if a system exception occurred 2148 */ 2149 public static java.util.List<com.liferay.portal.model.Group> search( 2150 long companyId, long[] classNameIds, long parentGroupId, 2151 java.lang.String name, java.lang.String description, 2152 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2153 boolean andOperator, int start, int end) 2154 throws com.liferay.portal.kernel.exception.SystemException { 2155 return getService() 2156 .search(companyId, classNameIds, parentGroupId, name, 2157 description, params, andOperator, start, end); 2158 } 2159 2160 /** 2161 * Returns an ordered range of all the groups belonging to the parent group 2162 * that match the class name IDs, name, and description, optionally 2163 * including the user's inherited organization groups and user groups. 2164 * System and staged groups are not included. 2165 * 2166 * <p> 2167 * Useful when paginating results. Returns a maximum of <code>end - 2168 * start</code> instances. <code>start</code> and <code>end</code> are not 2169 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2170 * refers to the first result in the set. Setting both <code>start</code> 2171 * and <code>end</code> to {@link 2172 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2173 * result set. 2174 * </p> 2175 * 2176 * @param companyId the primary key of the company 2177 * @param classNameIds the primary keys of the class names of the entities 2178 the groups are related to (optionally <code>null</code>) 2179 * @param parentGroupId the primary key of the parent group 2180 * @param name the group's name (optionally <code>null</code>) 2181 * @param description the group's description (optionally 2182 <code>null</code>) 2183 * @param params the finder params (optionally <code>null</code>). To 2184 include a user's organizations, inherited organizations, and user 2185 groups in the search, add an entry with key 2186 "usersGroups" mapped to the user's ID and an entry with 2187 key "inherit" mapped to a non-<code>null</code> object. 2188 For more information see {@link 2189 com.liferay.portal.service.persistence.GroupFinder} 2190 * @param andOperator whether every field must match its keywords, or just 2191 one field. 2192 * @param start the lower bound of the range of groups to return 2193 * @param end the upper bound of the range of groups to return (not 2194 inclusive) 2195 * @param obc the comparator to order the groups (optionally 2196 <code>null</code>) 2197 * @return the matching groups ordered by comparator <code>obc</code> 2198 * @throws SystemException if a system exception occurred 2199 */ 2200 public static java.util.List<com.liferay.portal.model.Group> search( 2201 long companyId, long[] classNameIds, long parentGroupId, 2202 java.lang.String name, java.lang.String description, 2203 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2204 boolean andOperator, int start, int end, 2205 com.liferay.portal.kernel.util.OrderByComparator obc) 2206 throws com.liferay.portal.kernel.exception.SystemException { 2207 return getService() 2208 .search(companyId, classNameIds, parentGroupId, name, 2209 description, params, andOperator, start, end, obc); 2210 } 2211 2212 /** 2213 * Returns an ordered range of all the groups that match the class name IDs 2214 * and keywords, optionally including the user's inherited organization 2215 * groups and user groups. System and staged groups are not included. 2216 * 2217 * <p> 2218 * Useful when paginating results. Returns a maximum of <code>end - 2219 * start</code> instances. <code>start</code> and <code>end</code> are not 2220 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2221 * refers to the first result in the set. Setting both <code>start</code> 2222 * and <code>end</code> to {@link 2223 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2224 * result set. 2225 * </p> 2226 * 2227 * @param companyId the primary key of the company 2228 * @param classNameIds the primary keys of the class names of the entities 2229 the groups are related to (optionally <code>null</code>) 2230 * @param keywords the keywords (space separated), which may occur in the 2231 sites's name, or description (optionally <code>null</code>) 2232 * @param params the finder params (optionally <code>null</code>). To 2233 include a user's organizations, inherited organizations, and user 2234 groups in the search, add an entry with key 2235 "usersGroups" mapped to the user's ID and an entry with 2236 key "inherit" mapped to a non-<code>null</code> object. 2237 For more information see {@link 2238 com.liferay.portal.service.persistence.GroupFinder} 2239 * @param start the lower bound of the range of groups to return 2240 * @param end the upper bound of the range of groups to return (not 2241 inclusive) 2242 * @return the matching groups ordered by name 2243 * @throws SystemException if a system exception occurred 2244 */ 2245 public static java.util.List<com.liferay.portal.model.Group> search( 2246 long companyId, long[] classNameIds, java.lang.String keywords, 2247 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2248 int start, int end) 2249 throws com.liferay.portal.kernel.exception.SystemException { 2250 return getService() 2251 .search(companyId, classNameIds, keywords, params, start, end); 2252 } 2253 2254 /** 2255 * Returns an ordered range of all the groups that match the class name IDs 2256 * and keywords, optionally including the user's inherited organization 2257 * groups and user groups. System and staged groups are not included. 2258 * 2259 * <p> 2260 * Useful when paginating results. Returns a maximum of <code>end - 2261 * start</code> instances. <code>start</code> and <code>end</code> are not 2262 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2263 * refers to the first result in the set. Setting both <code>start</code> 2264 * and <code>end</code> to {@link 2265 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2266 * result set. 2267 * </p> 2268 * 2269 * @param companyId the primary key of the company 2270 * @param classNameIds the primary keys of the class names of the entities 2271 the groups are related to (optionally <code>null</code>) 2272 * @param keywords the keywords (space separated), which may occur in the 2273 sites's name, or description (optionally <code>null</code>) 2274 * @param params the finder params (optionally <code>null</code>). To 2275 include a user's organizations, inherited organizations, and user 2276 groups in the search, add an entry with key 2277 "usersGroups" mapped to the user's ID and an entry with 2278 key "inherit" mapped to a non-<code>null</code> object. 2279 For more information see {@link 2280 com.liferay.portal.service.persistence.GroupFinder} 2281 * @param start the lower bound of the range of groups to return 2282 * @param end the upper bound of the range of groups to return (not 2283 inclusive) 2284 * @param obc the comparator to order the groups (optionally 2285 <code>null</code>) 2286 * @return the matching groups ordered by comparator <code>obc</code> 2287 * @throws SystemException if a system exception occurred 2288 */ 2289 public static java.util.List<com.liferay.portal.model.Group> search( 2290 long companyId, long[] classNameIds, java.lang.String keywords, 2291 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2292 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2293 throws com.liferay.portal.kernel.exception.SystemException { 2294 return getService() 2295 .search(companyId, classNameIds, keywords, params, start, 2296 end, obc); 2297 } 2298 2299 /** 2300 * Returns an ordered range of all the groups that match the class name IDs, 2301 * name, and description, optionally including the user's inherited 2302 * organization groups and user groups. System and staged groups are not 2303 * included. 2304 * 2305 * <p> 2306 * Useful when paginating results. Returns a maximum of <code>end - 2307 * start</code> instances. <code>start</code> and <code>end</code> are not 2308 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2309 * refers to the first result in the set. Setting both <code>start</code> 2310 * and <code>end</code> to {@link 2311 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2312 * result set. 2313 * </p> 2314 * 2315 * @param companyId the primary key of the company 2316 * @param classNameIds the primary keys of the class names of the entities 2317 the groups are related to (optionally <code>null</code>) 2318 * @param name the group's name (optionally <code>null</code>) 2319 * @param description the group's description (optionally 2320 <code>null</code>) 2321 * @param params the finder params (optionally <code>null</code>). To 2322 include a user's organizations, inherited organizations, and user 2323 groups in the search, add an entry with key 2324 "usersGroups" mapped to the user's ID and an entry with 2325 key "inherit" mapped to a non-<code>null</code> object. 2326 For more information see {@link 2327 com.liferay.portal.service.persistence.GroupFinder} 2328 * @param andOperator whether every field must match its keywords, or just 2329 one field. 2330 * @param start the lower bound of the range of groups to return 2331 * @param end the upper bound of the range of groups to return (not 2332 inclusive) 2333 * @return the matching groups ordered by name 2334 * @throws SystemException if a system exception occurred 2335 */ 2336 public static java.util.List<com.liferay.portal.model.Group> search( 2337 long companyId, long[] classNameIds, java.lang.String name, 2338 java.lang.String description, 2339 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2340 boolean andOperator, int start, int end) 2341 throws com.liferay.portal.kernel.exception.SystemException { 2342 return getService() 2343 .search(companyId, classNameIds, name, description, params, 2344 andOperator, start, end); 2345 } 2346 2347 /** 2348 * Returns an ordered range of all the groups that match the class name IDs, 2349 * name, and description, optionally including the user's inherited 2350 * organization groups and user groups. System and staged groups are not 2351 * included. 2352 * 2353 * <p> 2354 * Useful when paginating results. Returns a maximum of <code>end - 2355 * start</code> instances. <code>start</code> and <code>end</code> are not 2356 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2357 * refers to the first result in the set. Setting both <code>start</code> 2358 * and <code>end</code> to {@link 2359 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2360 * result set. 2361 * </p> 2362 * 2363 * @param companyId the primary key of the company 2364 * @param classNameIds the primary keys of the class names of the entities 2365 the groups are related to (optionally <code>null</code>) 2366 * @param name the group's name (optionally <code>null</code>) 2367 * @param description the group's description (optionally 2368 <code>null</code>) 2369 * @param params the finder params (optionally <code>null</code>). To 2370 include a user's organizations, inherited organizations, and user 2371 groups in the search, add an entry with key 2372 "usersGroups" mapped to the user's ID and an entry with 2373 key "inherit" mapped to a non-<code>null</code> object. 2374 For more information see {@link 2375 com.liferay.portal.service.persistence.GroupFinder} 2376 * @param andOperator whether every field must match its keywords, or just 2377 one field. 2378 * @param start the lower bound of the range of groups to return 2379 * @param end the upper bound of the range of groups to return (not 2380 inclusive) 2381 * @param obc the comparator to order the groups (optionally 2382 <code>null</code>) 2383 * @return the matching groups ordered by comparator <code>obc</code> 2384 * @throws SystemException if a system exception occurred 2385 */ 2386 public static java.util.List<com.liferay.portal.model.Group> search( 2387 long companyId, long[] classNameIds, java.lang.String name, 2388 java.lang.String description, 2389 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2390 boolean andOperator, int start, int end, 2391 com.liferay.portal.kernel.util.OrderByComparator obc) 2392 throws com.liferay.portal.kernel.exception.SystemException { 2393 return getService() 2394 .search(companyId, classNameIds, name, description, params, 2395 andOperator, start, end, obc); 2396 } 2397 2398 /** 2399 * Returns an ordered range of all the groups that match the keywords, 2400 * optionally including the user's inherited organization groups and user 2401 * groups. System and staged groups are not included. 2402 * 2403 * <p> 2404 * Useful when paginating results. Returns a maximum of <code>end - 2405 * start</code> instances. <code>start</code> and <code>end</code> are not 2406 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2407 * refers to the first result in the set. Setting both <code>start</code> 2408 * and <code>end</code> to {@link 2409 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2410 * result set. 2411 * </p> 2412 * 2413 * @param companyId the primary key of the company 2414 * @param keywords the keywords (space separated), which may occur in the 2415 sites's name, or description (optionally <code>null</code>) 2416 * @param params the finder params (optionally <code>null</code>). To 2417 include the user's inherited organizations and user groups in the 2418 search, add entries having "usersGroups" and 2419 "inherit" as keys mapped to the the user's ID. For more 2420 information see {@link 2421 com.liferay.portal.service.persistence.GroupFinder} 2422 * @param start the lower bound of the range of groups to return 2423 * @param end the upper bound of the range of groups to return (not 2424 inclusive) 2425 * @return the matching groups ordered by name 2426 * @throws SystemException if a system exception occurred 2427 */ 2428 public static java.util.List<com.liferay.portal.model.Group> search( 2429 long companyId, java.lang.String keywords, 2430 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2431 int start, int end) 2432 throws com.liferay.portal.kernel.exception.SystemException { 2433 return getService().search(companyId, keywords, params, start, end); 2434 } 2435 2436 /** 2437 * Returns an ordered range of all the groups that match the keywords, 2438 * optionally including the user's inherited organization groups and user 2439 * groups. System and staged groups are not included. 2440 * 2441 * <p> 2442 * Useful when paginating results. Returns a maximum of <code>end - 2443 * start</code> instances. <code>start</code> and <code>end</code> are not 2444 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2445 * refers to the first result in the set. Setting both <code>start</code> 2446 * and <code>end</code> to {@link 2447 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2448 * result set. 2449 * </p> 2450 * 2451 * @param companyId the primary key of the company 2452 * @param keywords the keywords (space separated), which may occur in the 2453 sites's name, or description (optionally <code>null</code>) 2454 * @param params the finder params (optionally <code>null</code>). To 2455 include the user's inherited organizations and user groups in the 2456 search, add entries having "usersGroups" and 2457 "inherit" as keys mapped to the the user's ID. For more 2458 information see {@link 2459 com.liferay.portal.service.persistence.GroupFinder} 2460 * @param start the lower bound of the range of groups to return 2461 * @param end the upper bound of the range of groups to return (not 2462 inclusive) 2463 * @param obc the comparator to order the groups (optionally 2464 <code>null</code>) 2465 * @return the matching groups ordered by comparator <code>obc</code> 2466 * @throws SystemException if a system exception occurred 2467 */ 2468 public static java.util.List<com.liferay.portal.model.Group> search( 2469 long companyId, java.lang.String keywords, 2470 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2471 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2472 throws com.liferay.portal.kernel.exception.SystemException { 2473 return getService().search(companyId, keywords, params, start, end, obc); 2474 } 2475 2476 /** 2477 * Returns an ordered range of all the site groups and organization groups 2478 * that match the name and description, optionally including the user's 2479 * inherited organization groups and user groups. System and staged groups 2480 * are not included. 2481 * 2482 * <p> 2483 * Useful when paginating results. Returns a maximum of <code>end - 2484 * start</code> instances. <code>start</code> and <code>end</code> are not 2485 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2486 * refers to the first result in the set. Setting both <code>start</code> 2487 * and <code>end</code> to {@link 2488 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2489 * result set. 2490 * </p> 2491 * 2492 * @param companyId the primary key of the company 2493 * @param name the group's name (optionally <code>null</code>) 2494 * @param description the group's description (optionally 2495 <code>null</code>) 2496 * @param params the finder params (optionally <code>null</code>). To 2497 include the user's inherited organizations and user groups in the 2498 search, add entries having "usersGroups" and 2499 "inherit" as keys mapped to the the user's ID. For more 2500 information see {@link 2501 com.liferay.portal.service.persistence.GroupFinder} 2502 * @param andOperator whether every field must match its keywords, or just 2503 one field. 2504 * @param start the lower bound of the range of groups to return 2505 * @param end the upper bound of the range of groups to return (not 2506 inclusive) 2507 * @return the matching groups ordered by name 2508 * @throws SystemException if a system exception occurred 2509 */ 2510 public static java.util.List<com.liferay.portal.model.Group> search( 2511 long companyId, java.lang.String name, java.lang.String description, 2512 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2513 boolean andOperator, int start, int end) 2514 throws com.liferay.portal.kernel.exception.SystemException { 2515 return getService() 2516 .search(companyId, name, description, params, andOperator, 2517 start, end); 2518 } 2519 2520 /** 2521 * Returns an ordered range of all the site groups and organization groups 2522 * that match the name and description, optionally including the user's 2523 * inherited organization groups and user groups. System and staged groups 2524 * are not included. 2525 * 2526 * <p> 2527 * Useful when paginating results. Returns a maximum of <code>end - 2528 * start</code> instances. <code>start</code> and <code>end</code> are not 2529 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2530 * refers to the first result in the set. Setting both <code>start</code> 2531 * and <code>end</code> to {@link 2532 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2533 * result set. 2534 * </p> 2535 * 2536 * @param companyId the primary key of the company 2537 * @param name the group's name (optionally <code>null</code>) 2538 * @param description the group's description (optionally 2539 <code>null</code>) 2540 * @param params the finder params (optionally <code>null</code>). To 2541 include the user's inherited organizations and user groups in the 2542 search, add entries having "usersGroups" and 2543 "inherit" as keys mapped to the the user's ID. For more 2544 information see {@link 2545 com.liferay.portal.service.persistence.GroupFinder} 2546 * @param andOperator whether every field must match its keywords, or just 2547 one field. 2548 * @param start the lower bound of the range of groups to return 2549 * @param end the upper bound of the range of groups to return (not 2550 inclusive) 2551 * @param obc the comparator to order the groups (optionally 2552 <code>null</code>) 2553 * @return the matching groups ordered by comparator <code>obc</code> 2554 * @throws SystemException if a system exception occurred 2555 */ 2556 public static java.util.List<com.liferay.portal.model.Group> search( 2557 long companyId, java.lang.String name, java.lang.String description, 2558 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2559 boolean andOperator, int start, int end, 2560 com.liferay.portal.kernel.util.OrderByComparator obc) 2561 throws com.liferay.portal.kernel.exception.SystemException { 2562 return getService() 2563 .search(companyId, name, description, params, andOperator, 2564 start, end, obc); 2565 } 2566 2567 /** 2568 * Returns the number of groups belonging to the parent group that match the 2569 * keywords, optionally including the user's inherited organization groups 2570 * and user groups. System and staged groups are not included. 2571 * 2572 * @param companyId the primary key of the company 2573 * @param parentGroupId the primary key of the parent group 2574 * @param keywords the keywords (space separated), which may occur in the 2575 sites's name, or description (optionally <code>null</code>) 2576 * @param params the finder params (optionally <code>null</code>). To 2577 include the user's inherited organization groups and user groups 2578 in the search, add entries having "usersGroups" and 2579 "inherit" as keys mapped to the the user's ID. For more 2580 information see {@link 2581 com.liferay.portal.service.persistence.GroupFinder} 2582 * @return the number of matching groups 2583 * @throws SystemException if a system exception occurred 2584 */ 2585 public static int searchCount(long companyId, long parentGroupId, 2586 java.lang.String keywords, 2587 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2588 throws com.liferay.portal.kernel.exception.SystemException { 2589 return getService() 2590 .searchCount(companyId, parentGroupId, keywords, params); 2591 } 2592 2593 /** 2594 * Returns the number of groups belonging to the parent group and immediate 2595 * organization groups that match the name and description, optionally 2596 * including the user's inherited organization groups and user groups. 2597 * System and staged groups are not included. 2598 * 2599 * @param companyId the primary key of the company 2600 * @param parentGroupId the primary key of the parent group 2601 * @param name the group's name (optionally <code>null</code>) 2602 * @param description the group's description (optionally 2603 <code>null</code>) 2604 * @param params the finder params (optionally <code>null</code>). To 2605 include the user's inherited organization groups and user groups 2606 in the search, add entries having "usersGroups" and 2607 "inherit" as keys mapped to the the user's ID. For more 2608 information see {@link 2609 com.liferay.portal.service.persistence.GroupFinder} 2610 * @param andOperator whether every field must match its keywords, or just 2611 one field. 2612 * @return the number of matching groups 2613 * @throws SystemException if a system exception occurred 2614 */ 2615 public static int searchCount(long companyId, long parentGroupId, 2616 java.lang.String name, java.lang.String description, 2617 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2618 boolean andOperator) 2619 throws com.liferay.portal.kernel.exception.SystemException { 2620 return getService() 2621 .searchCount(companyId, parentGroupId, name, description, 2622 params, andOperator); 2623 } 2624 2625 /** 2626 * Returns the number of groups belonging to the parent group that match the 2627 * class name IDs, and keywords, optionally including the user's inherited 2628 * organization groups and user groups. System and staged groups are not 2629 * included. 2630 * 2631 * @param companyId the primary key of the company 2632 * @param classNameIds the primary keys of the class names of the entities 2633 the groups are related to (optionally <code>null</code>) 2634 * @param parentGroupId the primary key of the parent group 2635 * @param keywords the keywords (space separated), which may occur in the 2636 sites's name, or description (optionally <code>null</code>) 2637 * @param params the finder params (optionally <code>null</code>). To 2638 include the user's inherited organization groups and user groups 2639 in the search, add entries having "usersGroups" and 2640 "inherit" as keys mapped to the the user's ID. For more 2641 information see {@link 2642 com.liferay.portal.service.persistence.GroupFinder} 2643 * @return the number of matching groups 2644 * @throws SystemException if a system exception occurred 2645 */ 2646 public static int searchCount(long companyId, long[] classNameIds, 2647 long parentGroupId, java.lang.String keywords, 2648 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2649 throws com.liferay.portal.kernel.exception.SystemException { 2650 return getService() 2651 .searchCount(companyId, classNameIds, parentGroupId, 2652 keywords, params); 2653 } 2654 2655 /** 2656 * Returns the number of groups belonging to the parent group that match the 2657 * class name IDs, name, and description, optionally including the user's 2658 * inherited organization groups and user groups. System and staged groups 2659 * are not included. 2660 * 2661 * @param companyId the primary key of the company 2662 * @param classNameIds the primary keys of the class names of the entities 2663 the groups are related to (optionally <code>null</code>) 2664 * @param parentGroupId the primary key of the parent group 2665 * @param name the group's name (optionally <code>null</code>) 2666 * @param description the group's description (optionally 2667 <code>null</code>) 2668 * @param params the finder params (optionally <code>null</code>). To 2669 include the user's inherited organization groups and user groups 2670 in the search, add entries having "usersGroups" and 2671 "inherit" as keys mapped to the the user's ID. For more 2672 information see {@link 2673 com.liferay.portal.service.persistence.GroupFinder} 2674 * @param andOperator whether every field must match its keywords, or just 2675 one field. 2676 * @return the number of matching groups 2677 * @throws SystemException if a system exception occurred 2678 */ 2679 public static int searchCount(long companyId, long[] classNameIds, 2680 long parentGroupId, java.lang.String name, 2681 java.lang.String description, 2682 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2683 boolean andOperator) 2684 throws com.liferay.portal.kernel.exception.SystemException { 2685 return getService() 2686 .searchCount(companyId, classNameIds, parentGroupId, name, 2687 description, params, andOperator); 2688 } 2689 2690 /** 2691 * Returns the number of groups that match the class name IDs, and keywords, 2692 * optionally including the user's inherited organization groups and user 2693 * groups. System and staged groups are not included. 2694 * 2695 * @param companyId the primary key of the company 2696 * @param classNameIds the primary keys of the class names of the entities 2697 the groups are related to (optionally <code>null</code>) 2698 * @param keywords the keywords (space separated), which may occur in the 2699 sites's name, or description (optionally <code>null</code>) 2700 * @param params the finder params (optionally <code>null</code>). To 2701 include the user's inherited organization groups and user groups 2702 in the search, add entries having "usersGroups" and 2703 "inherit" as keys mapped to the the user's ID. For more 2704 information see {@link 2705 com.liferay.portal.service.persistence.GroupFinder} 2706 * @return the number of matching groups 2707 * @throws SystemException if a system exception occurred 2708 */ 2709 public static int searchCount(long companyId, long[] classNameIds, 2710 java.lang.String keywords, 2711 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2712 throws com.liferay.portal.kernel.exception.SystemException { 2713 return getService() 2714 .searchCount(companyId, classNameIds, keywords, params); 2715 } 2716 2717 /** 2718 * Returns the number of groups that match the class name IDs, name, and 2719 * description, optionally including the user's inherited organization 2720 * groups and user groups. System and staged groups are not included. 2721 * 2722 * @param companyId the primary key of the company 2723 * @param classNameIds the primary keys of the class names of the entities 2724 the groups are related to (optionally <code>null</code>) 2725 * @param name the group's name (optionally <code>null</code>) 2726 * @param description the group's description (optionally 2727 <code>null</code>) 2728 * @param params the finder params (optionally <code>null</code>). To 2729 include the user's inherited organization groups and user groups 2730 in the search, add entries having "usersGroups" and 2731 "inherit" as keys mapped to the the user's ID. For more 2732 information see {@link 2733 com.liferay.portal.service.persistence.GroupFinder} 2734 * @param andOperator whether every field must match its keywords, or just 2735 one field. 2736 * @return the number of matching groups 2737 * @throws SystemException if a system exception occurred 2738 */ 2739 public static int searchCount(long companyId, long[] classNameIds, 2740 java.lang.String name, java.lang.String description, 2741 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2742 boolean andOperator) 2743 throws com.liferay.portal.kernel.exception.SystemException { 2744 return getService() 2745 .searchCount(companyId, classNameIds, name, description, 2746 params, andOperator); 2747 } 2748 2749 /** 2750 * Returns the number of groups that match the keywords, optionally 2751 * including the user's inherited organization groups and user groups. 2752 * System and staged groups are not included. 2753 * 2754 * @param companyId the primary key of the company 2755 * @param keywords the keywords (space separated), which may occur in the 2756 sites's name, or description (optionally <code>null</code>) 2757 * @param params the finder params (optionally <code>null</code>). To 2758 include the user's inherited organization groups and user groups 2759 in the search, add entries having "usersGroups" and 2760 "inherit" as keys mapped to the the user's ID. For more 2761 information see {@link 2762 com.liferay.portal.service.persistence.GroupFinder} 2763 * @return the number of matching groups 2764 * @throws SystemException if a system exception occurred 2765 */ 2766 public static int searchCount(long companyId, java.lang.String keywords, 2767 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 2768 throws com.liferay.portal.kernel.exception.SystemException { 2769 return getService().searchCount(companyId, keywords, params); 2770 } 2771 2772 /** 2773 * Returns the number of groups and immediate organization groups that match 2774 * the name and description, optionally including the user's inherited 2775 * organization groups and user groups. System and staged groups are not 2776 * included. 2777 * 2778 * @param companyId the primary key of the company 2779 * @param name the group's name (optionally <code>null</code>) 2780 * @param description the group's description (optionally 2781 <code>null</code>) 2782 * @param params the finder params (optionally <code>null</code>). To 2783 include the user's inherited organization groups and user groups 2784 in the search, add entries having "usersGroups" and 2785 "inherit" as keys mapped to the the user's ID. For more 2786 information see {@link 2787 com.liferay.portal.service.persistence.GroupFinder} 2788 * @param andOperator whether every field must match its keywords, or just 2789 one field. 2790 * @return the number of matching groups 2791 * @throws SystemException if a system exception occurred 2792 */ 2793 public static int searchCount(long companyId, java.lang.String name, 2794 java.lang.String description, 2795 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2796 boolean andOperator) 2797 throws com.liferay.portal.kernel.exception.SystemException { 2798 return getService() 2799 .searchCount(companyId, name, description, params, 2800 andOperator); 2801 } 2802 2803 /** 2804 * Removes the groups from the role. 2805 * 2806 * @param roleId the primary key of the role 2807 * @param groupIds the primary keys of the groups 2808 * @throws SystemException if a system exception occurred 2809 */ 2810 public static void unsetRoleGroups(long roleId, long[] groupIds) 2811 throws com.liferay.portal.kernel.exception.SystemException { 2812 getService().unsetRoleGroups(roleId, groupIds); 2813 } 2814 2815 /** 2816 * Removes the user from the groups. 2817 * 2818 * @param userId the primary key of the user 2819 * @param groupIds the primary keys of the groups 2820 * @throws SystemException if a system exception occurred 2821 */ 2822 public static void unsetUserGroups(long userId, long[] groupIds) 2823 throws com.liferay.portal.kernel.exception.SystemException { 2824 getService().unsetUserGroups(userId, groupIds); 2825 } 2826 2827 /** 2828 * Updates the group's asset replacing categories and tag names. 2829 * 2830 * @param userId the primary key of the user 2831 * @param group the group 2832 * @param assetCategoryIds the primary keys of the asset categories 2833 (optionally <code>null</code>) 2834 * @param assetTagNames the asset tag names (optionally <code>null</code>) 2835 * @throws PortalException if a user with the primary key could not be found 2836 * @throws SystemException if a system exception occurred 2837 */ 2838 public static void updateAsset(long userId, 2839 com.liferay.portal.model.Group group, long[] assetCategoryIds, 2840 java.lang.String[] assetTagNames) 2841 throws com.liferay.portal.kernel.exception.PortalException, 2842 com.liferay.portal.kernel.exception.SystemException { 2843 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames); 2844 } 2845 2846 /** 2847 * Updates the group's friendly URL. 2848 * 2849 * @param groupId the primary key of the group 2850 * @param friendlyURL the group's new friendlyURL (optionally 2851 <code>null</code>) 2852 * @return the group 2853 * @throws PortalException if a group with the primary key could not be 2854 found or if a valid friendly URL could not be created for the 2855 group 2856 * @throws SystemException if a system exception occurred 2857 */ 2858 public static com.liferay.portal.model.Group updateFriendlyURL( 2859 long groupId, java.lang.String friendlyURL) 2860 throws com.liferay.portal.kernel.exception.PortalException, 2861 com.liferay.portal.kernel.exception.SystemException { 2862 return getService().updateFriendlyURL(groupId, friendlyURL); 2863 } 2864 2865 /** 2866 * Updates the group. 2867 * 2868 * @param groupId the primary key of the group 2869 * @param parentGroupId the primary key of the parent group 2870 * @param name the group's new name 2871 * @param description the group's new description (optionally 2872 <code>null</code>) 2873 * @param type the group's new type. For more information see {@link 2874 com.liferay.portal.model.GroupConstants} 2875 * @param friendlyURL the group's new friendlyURL (optionally 2876 <code>null</code>) 2877 * @param active whether the group is active 2878 * @param serviceContext the service context to be applied (optionally 2879 <code>null</code>). Can set asset category IDs and asset tag 2880 names for the group. 2881 * @return the group 2882 * @throws PortalException if a group with the primary key could not be 2883 found or if the friendly URL was invalid or could one not be 2884 created 2885 * @throws SystemException if a system exception occurred 2886 */ 2887 public static com.liferay.portal.model.Group updateGroup(long groupId, 2888 long parentGroupId, java.lang.String name, 2889 java.lang.String description, int type, boolean manualMembership, 2890 int membershipRestriction, java.lang.String friendlyURL, 2891 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 2892 throws com.liferay.portal.kernel.exception.PortalException, 2893 com.liferay.portal.kernel.exception.SystemException { 2894 return getService() 2895 .updateGroup(groupId, parentGroupId, name, description, 2896 type, manualMembership, membershipRestriction, friendlyURL, active, 2897 serviceContext); 2898 } 2899 2900 /** 2901 * Updates the group's type settings. 2902 * 2903 * @param groupId the primary key of the group 2904 * @param typeSettings the group's new type settings (optionally 2905 <code>null</code>) 2906 * @return the group 2907 * @throws PortalException if a group with the primary key could not be 2908 found 2909 * @throws SystemException if a system exception occurred 2910 */ 2911 public static com.liferay.portal.model.Group updateGroup(long groupId, 2912 java.lang.String typeSettings) 2913 throws com.liferay.portal.kernel.exception.PortalException, 2914 com.liferay.portal.kernel.exception.SystemException { 2915 return getService().updateGroup(groupId, typeSettings); 2916 } 2917 2918 /** 2919 * Associates the group with a main site if the group is an organization. 2920 * 2921 * @param groupId the primary key of the group 2922 * @param site whether the group is to be associated with a main site 2923 * @return the group 2924 * @throws PortalException if a group with the primary key could not be 2925 found 2926 * @throws SystemException if a system exception occurred 2927 */ 2928 public static com.liferay.portal.model.Group updateSite(long groupId, 2929 boolean site) 2930 throws com.liferay.portal.kernel.exception.PortalException, 2931 com.liferay.portal.kernel.exception.SystemException { 2932 return getService().updateSite(groupId, site); 2933 } 2934 2935 public static GroupLocalService getService() { 2936 if (_service == null) { 2937 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName()); 2938 2939 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class, 2940 "_service"); 2941 } 2942 2943 return _service; 2944 } 2945 2946 /** 2947 * @deprecated As of 6.2.0 2948 */ 2949 public void setService(GroupLocalService service) { 2950 } 2951 2952 private static GroupLocalService _service; 2953 }