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