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