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