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