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