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 681 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 682 * result set. 683 * </p> 684 * 685 * @param companyId the primary key of the company 686 * @param start the lower bound of the range of groups to return 687 * @param end the upper bound of the range of groups to return (not 688 inclusive) 689 * @return the range of groups associated with the company 690 */ 691 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups( 692 long companyId, int start, int end) { 693 return getService().getCompanyGroups(companyId, start, end); 694 } 695 696 /** 697 * Returns the number of groups associated with the company. 698 * 699 * @param companyId the primary key of the company 700 * @return the number of groups associated with the company 701 */ 702 public static int getCompanyGroupsCount(long companyId) { 703 return getService().getCompanyGroupsCount(companyId); 704 } 705 706 /** 707 * Returns the group with the matching friendly URL. 708 * 709 * @param companyId the primary key of the company 710 * @param friendlyURL the group's friendlyURL 711 * @return the group with the friendly URL 712 * @throws PortalException if a matching group could not be found, or if the 713 friendly URL was invalid 714 */ 715 public static com.liferay.portal.model.Group getFriendlyURLGroup( 716 long companyId, java.lang.String friendlyURL) 717 throws com.liferay.portal.kernel.exception.PortalException { 718 return getService().getFriendlyURLGroup(companyId, friendlyURL); 719 } 720 721 /** 722 * Returns the group with the matching group key. 723 * 724 * @param companyId the primary key of the company 725 * @param groupKey the group key 726 * @return the group with the group key 727 * @throws PortalException if a matching group could not be found 728 */ 729 public static com.liferay.portal.model.Group getGroup(long companyId, 730 java.lang.String groupKey) 731 throws com.liferay.portal.kernel.exception.PortalException { 732 return getService().getGroup(companyId, groupKey); 733 } 734 735 /** 736 * Returns the group with the primary key. 737 * 738 * @param groupId the primary key of the group 739 * @return the group 740 * @throws PortalException if a group with the primary key could not be found 741 */ 742 public static com.liferay.portal.model.Group getGroup(long groupId) 743 throws com.liferay.portal.kernel.exception.PortalException { 744 return getService().getGroup(groupId); 745 } 746 747 /** 748 * Returns the group with the matching UUID and company. 749 * 750 * @param uuid the group's UUID 751 * @param companyId the primary key of the company 752 * @return the matching group 753 * @throws PortalException if a matching group could not be found 754 */ 755 public static com.liferay.portal.model.Group getGroupByUuidAndCompanyId( 756 java.lang.String uuid, long companyId) 757 throws com.liferay.portal.kernel.exception.PortalException { 758 return getService().getGroupByUuidAndCompanyId(uuid, companyId); 759 } 760 761 /** 762 * @deprecated As of 7.0.0, replaced by {@link 763 Group#getDescriptiveName(Locale)} 764 */ 765 @Deprecated 766 public static java.lang.String getGroupDescriptiveName( 767 com.liferay.portal.model.Group group, java.util.Locale locale) 768 throws com.liferay.portal.kernel.exception.PortalException { 769 return getService().getGroupDescriptiveName(group, locale); 770 } 771 772 /** 773 * @deprecated As of 7.0.0, replaced by {@link 774 Group#getDescriptiveName(Locale)} 775 */ 776 @Deprecated 777 public static java.lang.String getGroupDescriptiveName(long groupId, 778 java.util.Locale locale) 779 throws com.liferay.portal.kernel.exception.PortalException { 780 return getService().getGroupDescriptiveName(groupId, locale); 781 } 782 783 /** 784 * Returns all the groups that are direct children of the parent group with 785 * the matching className. 786 * 787 * @param companyId the primary key of the company 788 * @param className the class name of the group 789 * @param parentGroupId the primary key of the parent group 790 * @return the matching groups, or <code>null</code> if no matches were 791 found 792 */ 793 public static java.util.List<com.liferay.portal.model.Group> getGroups( 794 long companyId, java.lang.String className, long parentGroupId) { 795 return getService().getGroups(companyId, className, parentGroupId); 796 } 797 798 /** 799 * Returns a range of all the groups that are direct children of the parent 800 * group with the matching className. 801 * 802 * @param companyId the primary key of the company 803 * @param className the class name of the group 804 * @param parentGroupId the primary key of the parent group 805 * @param start the lower bound of the range of results 806 * @param end the upper bound of the range of results (not inclusive) 807 * @return the range of matching groups 808 */ 809 public static java.util.List<com.liferay.portal.model.Group> getGroups( 810 long companyId, java.lang.String className, long parentGroupId, 811 int start, int end) { 812 return getService() 813 .getGroups(companyId, className, parentGroupId, start, end); 814 } 815 816 /** 817 * Returns all the groups that are direct children of the parent group. 818 * 819 * @param companyId the primary key of the company 820 * @param parentGroupId the primary key of the parent group 821 * @param site whether the group is to be associated with a main site 822 * @return the matching groups, or <code>null</code> if no matches were 823 found 824 */ 825 public static java.util.List<com.liferay.portal.model.Group> getGroups( 826 long companyId, long parentGroupId, boolean site) { 827 return getService().getGroups(companyId, parentGroupId, site); 828 } 829 830 public static java.util.List<com.liferay.portal.model.Group> getGroups( 831 long companyId, long parentGroupId, boolean site, boolean inheritContent) { 832 return getService() 833 .getGroups(companyId, parentGroupId, site, inheritContent); 834 } 835 836 /** 837 * Returns the groups with the matching primary keys. 838 * 839 * @param groupIds the primary keys of the groups 840 * @return the groups with the primary keys 841 * @throws PortalException if any one of the groups could not be found 842 */ 843 public static java.util.List<com.liferay.portal.model.Group> getGroups( 844 long[] groupIds) 845 throws com.liferay.portal.kernel.exception.PortalException { 846 return getService().getGroups(groupIds); 847 } 848 849 /** 850 * Returns a range of all the groups. 851 * 852 * <p> 853 * 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. 854 * </p> 855 * 856 * @param start the lower bound of the range of groups 857 * @param end the upper bound of the range of groups (not inclusive) 858 * @return the range of groups 859 */ 860 public static java.util.List<com.liferay.portal.model.Group> getGroups( 861 int start, int end) { 862 return getService().getGroups(start, end); 863 } 864 865 /** 866 * Returns the number of groups. 867 * 868 * @return the number of groups 869 */ 870 public static int getGroupsCount() { 871 return getService().getGroupsCount(); 872 } 873 874 /** 875 * Returns the number of groups that are direct children of the parent group 876 * with the matching className. 877 * 878 * @param companyId the primary key of the company 879 * @param className the class name of the group 880 * @param parentGroupId the primary key of the parent group 881 * @return the number of matching groups 882 */ 883 public static int getGroupsCount(long companyId, 884 java.lang.String className, long parentGroupId) { 885 return getService().getGroupsCount(companyId, className, parentGroupId); 886 } 887 888 /** 889 * Returns the number of groups that are direct children of the parent 890 * group. 891 * 892 * @param companyId the primary key of the company 893 * @param parentGroupId the primary key of the parent group 894 * @param site whether the group is to be associated with a main site 895 * @return the number of matching groups 896 */ 897 public static int getGroupsCount(long companyId, long parentGroupId, 898 boolean site) { 899 return getService().getGroupsCount(companyId, parentGroupId, site); 900 } 901 902 /** 903 * Returns the group associated with the layout. 904 * 905 * @param companyId the primary key of the company 906 * @param plid the primary key of the layout 907 * @return the group associated with the layout 908 * @throws PortalException if a matching group could not be found 909 */ 910 public static com.liferay.portal.model.Group getLayoutGroup( 911 long companyId, long plid) 912 throws com.liferay.portal.kernel.exception.PortalException { 913 return getService().getLayoutGroup(companyId, plid); 914 } 915 916 /** 917 * Returns the group associated with the layout prototype. 918 * 919 * @param companyId the primary key of the company 920 * @param layoutPrototypeId the primary key of the layout prototype 921 * @return the group associated with the layout prototype 922 * @throws PortalException if a matching group could not be found 923 */ 924 public static com.liferay.portal.model.Group getLayoutPrototypeGroup( 925 long companyId, long layoutPrototypeId) 926 throws com.liferay.portal.kernel.exception.PortalException { 927 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId); 928 } 929 930 /** 931 * Returns the group associated with the layout set prototype. 932 * 933 * @param companyId the primary key of the company 934 * @param layoutSetPrototypeId the primary key of the layout set prototype 935 * @return the group associated with the layout set prototype 936 * @throws PortalException if a matching group could not be found 937 */ 938 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup( 939 long companyId, long layoutSetPrototypeId) 940 throws com.liferay.portal.kernel.exception.PortalException { 941 return getService() 942 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId); 943 } 944 945 /** 946 * Returns a range of all groups that are children of the parent group and 947 * that have at least one layout. 948 * 949 * <p> 950 * Useful when paginating results. Returns a maximum of <code>end - 951 * start</code> instances. <code>start</code> and <code>end</code> are not 952 * primary keys, they are indexes in the result set. Thus, <code>0</code> 953 * refers to the first result in the set. Setting both <code>start</code> 954 * and <code>end</code> to {@link 955 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 956 * result set. 957 * </p> 958 * 959 * @param companyId the primary key of the company 960 * @param parentGroupId the primary key of the parent group 961 * @param site whether the group is to be associated with a main site 962 * @param start the lower bound of the range of groups to return 963 * @param end the upper bound of the range of groups to return (not 964 inclusive) 965 * @return the range of matching groups 966 * @deprecated As of 6.2.0, replaced by {@link #getLayoutsGroups(long, long, 967 boolean, int, int, OrderByComparator)} 968 */ 969 @Deprecated 970 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 971 long companyId, long parentGroupId, boolean site, int start, int end) { 972 return getService() 973 .getLayoutsGroups(companyId, parentGroupId, site, start, end); 974 } 975 976 /** 977 * Returns a range of all groups that are children of the parent group and 978 * that have at least one layout. 979 * 980 * <p> 981 * Useful when paginating results. Returns a maximum of <code>end - 982 * start</code> instances. <code>start</code> and <code>end</code> are not 983 * primary keys, they are indexes in the result set. Thus, <code>0</code> 984 * refers to the first result in the set. Setting both <code>start</code> 985 * and <code>end</code> to {@link 986 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 987 * result set. 988 * </p> 989 * 990 * @param companyId the primary key of the company 991 * @param parentGroupId the primary key of the parent group 992 * @param site whether the group is to be associated with a main site 993 * @param start the lower bound of the range of groups to return 994 * @param end the upper bound of the range of groups to return (not 995 inclusive) 996 * @param obc the comparator to order the groups (optionally 997 <code>null</code>) 998 * @return the range of matching groups ordered by comparator 999 <code>obc</code> 1000 */ 1001 public static java.util.List<com.liferay.portal.model.Group> getLayoutsGroups( 1002 long companyId, long parentGroupId, boolean site, int start, int end, 1003 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1004 return getService() 1005 .getLayoutsGroups(companyId, parentGroupId, site, start, 1006 end, obc); 1007 } 1008 1009 /** 1010 * Returns the number of groups that are children or the parent group and 1011 * that have at least one layout 1012 * 1013 * @param companyId the primary key of the company 1014 * @param parentGroupId the primary key of the parent group 1015 * @param site whether the group is to be associated with a main site 1016 * @return the number of matching groups 1017 */ 1018 public static int getLayoutsGroupsCount(long companyId, long parentGroupId, 1019 boolean site) { 1020 return getService().getLayoutsGroupsCount(companyId, parentGroupId, site); 1021 } 1022 1023 /** 1024 * Returns all live groups. 1025 * 1026 * @return all live groups 1027 */ 1028 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups() { 1029 return getService().getLiveGroups(); 1030 } 1031 1032 /** 1033 * Returns a range of all non-system groups of a specified type (className) 1034 * that have no layouts. 1035 * 1036 * <p> 1037 * Useful when paginating results. Returns a maximum of <code>end - 1038 * start</code> instances. <code>start</code> and <code>end</code> are not 1039 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1040 * refers to the first result in the set. Setting both <code>start</code> 1041 * and <code>end</code> to {@link 1042 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1043 * result set. 1044 * </p> 1045 * 1046 * @param className the entity's class name 1047 * @param privateLayout whether to include groups with private layout sets 1048 or non-private layout sets 1049 * @param start the lower bound of the range of groups to return 1050 * @param end the upper bound of the range of groups to return (not 1051 inclusive) 1052 * @return the range of matching groups 1053 */ 1054 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups( 1055 java.lang.String className, boolean privateLayout, int start, int end) { 1056 return getService() 1057 .getNoLayoutsGroups(className, privateLayout, start, end); 1058 } 1059 1060 /** 1061 * Returns all non-system groups having <code>null</code> or empty friendly 1062 * URLs. 1063 * 1064 * @return the non-system groups having <code>null</code> or empty friendly 1065 URLs 1066 */ 1067 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups() { 1068 return getService().getNullFriendlyURLGroups(); 1069 } 1070 1071 /** 1072 * Returns the specified organization group. 1073 * 1074 * @param companyId the primary key of the company 1075 * @param organizationId the primary key of the organization 1076 * @return the group associated with the organization 1077 * @throws PortalException if a matching group could not be found 1078 */ 1079 public static com.liferay.portal.model.Group getOrganizationGroup( 1080 long companyId, long organizationId) 1081 throws com.liferay.portal.kernel.exception.PortalException { 1082 return getService().getOrganizationGroup(companyId, organizationId); 1083 } 1084 1085 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 1086 long organizationId) { 1087 return getService().getOrganizationGroups(organizationId); 1088 } 1089 1090 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 1091 long organizationId, int start, int end) { 1092 return getService().getOrganizationGroups(organizationId, start, end); 1093 } 1094 1095 public static java.util.List<com.liferay.portal.model.Group> getOrganizationGroups( 1096 long organizationId, int start, int end, 1097 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) { 1098 return getService() 1099 .getOrganizationGroups(organizationId, start, end, 1100 orderByComparator); 1101 } 1102 1103 public static int getOrganizationGroupsCount(long organizationId) { 1104 return getService().getOrganizationGroupsCount(organizationId); 1105 } 1106 1107 /** 1108 * Returns the organizationIds of the organizations associated with the group. 1109 * 1110 * @param groupId the groupId of the group 1111 * @return long[] the organizationIds of organizations associated with the group 1112 */ 1113 public static long[] getOrganizationPrimaryKeys(long groupId) { 1114 return getService().getOrganizationPrimaryKeys(groupId); 1115 } 1116 1117 /** 1118 * Returns the specified organization groups. 1119 * 1120 * @param organizations the organizations 1121 * @return the groups associated with the organizations 1122 */ 1123 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups( 1124 java.util.List<com.liferay.portal.model.Organization> organizations) { 1125 return getService().getOrganizationsGroups(organizations); 1126 } 1127 1128 /** 1129 * Returns all the groups related to the organizations. 1130 * 1131 * @param organizations the organizations 1132 * @return the groups related to the organizations 1133 */ 1134 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups( 1135 java.util.List<com.liferay.portal.model.Organization> organizations) { 1136 return getService().getOrganizationsRelatedGroups(organizations); 1137 } 1138 1139 /** 1140 * Returns the group followed by all its parent groups ordered by closest 1141 * ancestor. 1142 * 1143 * @param groupId the primary key of the group 1144 * @return the group followed by all its parent groups ordered by closest 1145 ancestor 1146 * @throws PortalException if a group with the primary key could not be 1147 found 1148 */ 1149 public static java.util.List<com.liferay.portal.model.Group> getParentGroups( 1150 long groupId) 1151 throws com.liferay.portal.kernel.exception.PortalException { 1152 return getService().getParentGroups(groupId); 1153 } 1154 1155 public static com.liferay.portal.model.PersistedModel getPersistedModel( 1156 java.io.Serializable primaryKeyObj) 1157 throws com.liferay.portal.kernel.exception.PortalException { 1158 return getService().getPersistedModel(primaryKeyObj); 1159 } 1160 1161 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 1162 long roleId) { 1163 return getService().getRoleGroups(roleId); 1164 } 1165 1166 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 1167 long roleId, int start, int end) { 1168 return getService().getRoleGroups(roleId, start, end); 1169 } 1170 1171 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups( 1172 long roleId, int start, int end, 1173 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) { 1174 return getService().getRoleGroups(roleId, start, end, orderByComparator); 1175 } 1176 1177 public static int getRoleGroupsCount(long roleId) { 1178 return getService().getRoleGroupsCount(roleId); 1179 } 1180 1181 /** 1182 * Returns the roleIds of the roles associated with the group. 1183 * 1184 * @param groupId the groupId of the group 1185 * @return long[] the roleIds of roles associated with the group 1186 */ 1187 public static long[] getRolePrimaryKeys(long groupId) { 1188 return getService().getRolePrimaryKeys(groupId); 1189 } 1190 1191 /** 1192 * Returns the staging group. 1193 * 1194 * @param liveGroupId the primary key of the live group 1195 * @return the staging group 1196 * @throws PortalException if a matching staging group could not be found 1197 */ 1198 public static com.liferay.portal.model.Group getStagingGroup( 1199 long liveGroupId) 1200 throws com.liferay.portal.kernel.exception.PortalException { 1201 return getService().getStagingGroup(liveGroupId); 1202 } 1203 1204 /** 1205 * Returns the group directly associated with the user. 1206 * 1207 * @param companyId the primary key of the company 1208 * @param userId the primary key of the user 1209 * @return the group directly associated with the user 1210 * @throws PortalException if a matching group could not be found 1211 */ 1212 public static com.liferay.portal.model.Group getUserGroup(long companyId, 1213 long userId) throws com.liferay.portal.kernel.exception.PortalException { 1214 return getService().getUserGroup(companyId, userId); 1215 } 1216 1217 /** 1218 * Returns the specified "user group" group. That is, the group that 1219 * represents the {@link com.liferay.portal.model.UserGroup} entity. 1220 * 1221 * @param companyId the primary key of the company 1222 * @param userGroupId the primary key of the user group 1223 * @return the group associated with the user group 1224 * @throws PortalException if a matching group could not be found 1225 */ 1226 public static com.liferay.portal.model.Group getUserGroupGroup( 1227 long companyId, long userGroupId) 1228 throws com.liferay.portal.kernel.exception.PortalException { 1229 return getService().getUserGroupGroup(companyId, userGroupId); 1230 } 1231 1232 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 1233 long userGroupId) { 1234 return getService().getUserGroupGroups(userGroupId); 1235 } 1236 1237 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 1238 long userGroupId, int start, int end) { 1239 return getService().getUserGroupGroups(userGroupId, start, end); 1240 } 1241 1242 public static java.util.List<com.liferay.portal.model.Group> getUserGroupGroups( 1243 long userGroupId, int start, int end, 1244 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) { 1245 return getService() 1246 .getUserGroupGroups(userGroupId, start, end, 1247 orderByComparator); 1248 } 1249 1250 public static int getUserGroupGroupsCount(long userGroupId) { 1251 return getService().getUserGroupGroupsCount(userGroupId); 1252 } 1253 1254 /** 1255 * Returns the userGroupIds of the user groups associated with the group. 1256 * 1257 * @param groupId the groupId of the group 1258 * @return long[] the userGroupIds of user groups associated with the group 1259 */ 1260 public static long[] getUserGroupPrimaryKeys(long groupId) { 1261 return getService().getUserGroupPrimaryKeys(groupId); 1262 } 1263 1264 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1265 long userId) { 1266 return getService().getUserGroups(userId); 1267 } 1268 1269 /** 1270 * Returns all the user's site groups and immediate organization groups, 1271 * optionally including the user's inherited organization groups and user 1272 * groups. System and staged groups are not included. 1273 * 1274 * @param userId the primary key of the user 1275 * @param inherit whether to include the user's inherited organization 1276 groups and user groups 1277 * @return the user's groups and immediate organization groups 1278 * @throws PortalException if a user with the primary key could not be found 1279 */ 1280 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1281 long userId, boolean inherit) 1282 throws com.liferay.portal.kernel.exception.PortalException { 1283 return getService().getUserGroups(userId, inherit); 1284 } 1285 1286 /** 1287 * Returns an ordered range of all the user's site groups and immediate 1288 * organization groups, optionally including the user's inherited 1289 * organization groups and user groups. System and staged groups are not 1290 * included. 1291 * 1292 * <p> 1293 * Useful when paginating results. Returns a maximum of <code>end - 1294 * start</code> instances. <code>start</code> and <code>end</code> are not 1295 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1296 * refers to the first result in the set. Setting both <code>start</code> 1297 * and <code>end</code> to {@link 1298 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1299 * result set. 1300 * </p> 1301 * 1302 * @param userId the primary key of the user 1303 * @param inherit whether to include the user's inherited organization 1304 groups and user groups 1305 * @param start the lower bound of the range of groups to return 1306 * @param end the upper bound of the range of groups to return (not 1307 inclusive) 1308 * @return the range of the user's groups and immediate organization groups 1309 ordered by name 1310 * @throws PortalException if a user with the primary key could not be found 1311 */ 1312 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1313 long userId, boolean inherit, int start, int end) 1314 throws com.liferay.portal.kernel.exception.PortalException { 1315 return getService().getUserGroups(userId, inherit, start, end); 1316 } 1317 1318 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1319 long userId, int start, int end) { 1320 return getService().getUserGroups(userId, start, end); 1321 } 1322 1323 /** 1324 * @throws PortalException 1325 */ 1326 public static java.util.List<com.liferay.portal.model.Group> getUserGroups( 1327 long userId, int start, int end, 1328 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator) 1329 throws com.liferay.portal.kernel.exception.PortalException { 1330 return getService().getUserGroups(userId, start, end, orderByComparator); 1331 } 1332 1333 public static int getUserGroupsCount(long userId) { 1334 return getService().getUserGroupsCount(userId); 1335 } 1336 1337 /** 1338 * Returns the groups associated with the user groups. 1339 * 1340 * @param userGroups the user groups 1341 * @return the groups associated with the user groups 1342 * @throws PortalException if any one of the user group's group could not be 1343 found 1344 */ 1345 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups( 1346 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 1347 throws com.liferay.portal.kernel.exception.PortalException { 1348 return getService().getUserGroupsGroups(userGroups); 1349 } 1350 1351 /** 1352 * Returns all the groups related to the user groups. 1353 * 1354 * @param userGroups the user groups 1355 * @return the groups related to the user groups 1356 */ 1357 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups( 1358 java.util.List<com.liferay.portal.model.UserGroup> userGroups) { 1359 return getService().getUserGroupsRelatedGroups(userGroups); 1360 } 1361 1362 /** 1363 * Returns the range of all groups associated with the user's organization 1364 * groups, including the ancestors of the organization groups, unless portal 1365 * property <code>organizations.membership.strict</code> is set to 1366 * <code>true</code>. 1367 * 1368 * <p> 1369 * Useful when paginating results. Returns a maximum of <code>end - 1370 * start</code> instances. <code>start</code> and <code>end</code> are not 1371 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1372 * refers to the first result in the set. Setting both <code>start</code> 1373 * and <code>end</code> to {@link 1374 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1375 * result set. 1376 * </p> 1377 * 1378 * @param userId the primary key of the user 1379 * @param start the lower bound of the range of groups to consider 1380 * @param end the upper bound of the range of groups to consider (not 1381 inclusive) 1382 * @return the range of groups associated with the user's organization 1383 groups 1384 * @throws PortalException if a user with the primary key could not be found 1385 or if another portal exception occurred 1386 */ 1387 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups( 1388 long userId, int start, int end) 1389 throws com.liferay.portal.kernel.exception.PortalException { 1390 return getService().getUserOrganizationsGroups(userId, start, end); 1391 } 1392 1393 /** 1394 * Returns the default user's personal site group. 1395 * 1396 * @param companyId the primary key of the company 1397 * @return the default user's personal site group 1398 * @throws PortalException if a matching group or default user for the 1399 company could not be found 1400 */ 1401 public static com.liferay.portal.model.Group getUserPersonalSiteGroup( 1402 long companyId) 1403 throws com.liferay.portal.kernel.exception.PortalException { 1404 return getService().getUserPersonalSiteGroup(companyId); 1405 } 1406 1407 /** 1408 * Returns the userIds of the users associated with the group. 1409 * 1410 * @param groupId the groupId of the group 1411 * @return long[] the userIds of users associated with the group 1412 */ 1413 public static long[] getUserPrimaryKeys(long groupId) { 1414 return getService().getUserPrimaryKeys(groupId); 1415 } 1416 1417 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1418 long userId) throws com.liferay.portal.kernel.exception.PortalException { 1419 return getService().getUserSitesGroups(userId); 1420 } 1421 1422 public static java.util.List<com.liferay.portal.model.Group> getUserSitesGroups( 1423 long userId, boolean includeAdministrative) 1424 throws com.liferay.portal.kernel.exception.PortalException { 1425 return getService().getUserSitesGroups(userId, includeAdministrative); 1426 } 1427 1428 public static boolean hasOrganizationGroup(long organizationId, long groupId) { 1429 return getService().hasOrganizationGroup(organizationId, groupId); 1430 } 1431 1432 public static boolean hasOrganizationGroups(long organizationId) { 1433 return getService().hasOrganizationGroups(organizationId); 1434 } 1435 1436 public static boolean hasRoleGroup(long roleId, long groupId) { 1437 return getService().hasRoleGroup(roleId, groupId); 1438 } 1439 1440 public static boolean hasRoleGroups(long roleId) { 1441 return getService().hasRoleGroups(roleId); 1442 } 1443 1444 /** 1445 * Returns <code>true</code> if the live group has a staging group. 1446 * 1447 * @param liveGroupId the primary key of the live group 1448 * @return <code>true</code> if the live group has a staging group; 1449 <code>false</code> otherwise 1450 */ 1451 public static boolean hasStagingGroup(long liveGroupId) { 1452 return getService().hasStagingGroup(liveGroupId); 1453 } 1454 1455 public static boolean hasUserGroup(long userId, long groupId) { 1456 return getService().hasUserGroup(userId, groupId); 1457 } 1458 1459 /** 1460 * Returns <code>true</code> if the user is immediately associated with the 1461 * group, or optionally if the user is associated with the group via the 1462 * user's organizations, inherited organizations, or user groups. 1463 * 1464 * @param userId the primary key of the user 1465 * @param groupId the primary key of the group 1466 * @param inherit whether to include organization groups and user groups to 1467 which the user belongs in the determination 1468 * @return <code>true</code> if the user is associated with the group; 1469 <code>false</code> otherwise 1470 */ 1471 public static boolean hasUserGroup(long userId, long groupId, 1472 boolean inherit) { 1473 return getService().hasUserGroup(userId, groupId, inherit); 1474 } 1475 1476 public static boolean hasUserGroupGroup(long userGroupId, long groupId) { 1477 return getService().hasUserGroupGroup(userGroupId, groupId); 1478 } 1479 1480 public static boolean hasUserGroupGroups(long userGroupId) { 1481 return getService().hasUserGroupGroups(userGroupId); 1482 } 1483 1484 public static boolean hasUserGroups(long userId) { 1485 return getService().hasUserGroups(userId); 1486 } 1487 1488 /** 1489 * Returns the group with the matching group key by first searching the 1490 * system groups and then using the finder cache. 1491 * 1492 * @param companyId the primary key of the company 1493 * @param groupKey the group key 1494 * @return the group with the group key and associated company, or 1495 <code>null</code> if a matching group could not be found 1496 */ 1497 public static com.liferay.portal.model.Group loadFetchGroup( 1498 long companyId, java.lang.String groupKey) { 1499 return getService().loadFetchGroup(companyId, groupKey); 1500 } 1501 1502 /** 1503 * Returns the group with the matching group key. 1504 * 1505 * @param companyId the primary key of the company 1506 * @param groupKey the group key 1507 * @return the group with the group key and associated company 1508 * @throws PortalException if a matching group could not be found 1509 */ 1510 public static com.liferay.portal.model.Group loadGetGroup(long companyId, 1511 java.lang.String groupKey) 1512 throws com.liferay.portal.kernel.exception.PortalException { 1513 return getService().loadGetGroup(companyId, groupKey); 1514 } 1515 1516 /** 1517 * Rebuilds the group tree. 1518 * 1519 * <p> 1520 * Only call this method if the tree has become stale through operations 1521 * other than normal CRUD. Under normal circumstances the tree is 1522 * automatically rebuilt whenever necessary. 1523 * </p> 1524 * 1525 * @param companyId the primary key of the group's company 1526 * @throws PortalException if a group with the primary key could not be 1527 found 1528 */ 1529 public static void rebuildTree(long companyId) 1530 throws com.liferay.portal.kernel.exception.PortalException { 1531 getService().rebuildTree(companyId); 1532 } 1533 1534 /** 1535 * Returns an ordered range of all the groups that match the class name IDs 1536 * and keywords, optionally including the user's inherited organization 1537 * groups and user groups. System and staged groups are not included. 1538 * 1539 * <p> 1540 * Useful when paginating results. Returns a maximum of <code>end - 1541 * start</code> instances. <code>start</code> and <code>end</code> are not 1542 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1543 * refers to the first result in the set. Setting both <code>start</code> 1544 * and <code>end</code> to {@link 1545 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1546 * result set. 1547 * </p> 1548 * 1549 * @param companyId the primary key of the company 1550 * @param classNameIds the primary keys of the class names of the entities 1551 the groups are related to (optionally <code>null</code>) 1552 * @param keywords the keywords (space separated), which may occur in the 1553 sites's name, or description (optionally <code>null</code>) 1554 * @param params the finder params (optionally <code>null</code>). To 1555 include a user's organizations, inherited organizations, and user 1556 groups in the search, add an entry with key 1557 "usersGroups" mapped to the user's ID and an entry with 1558 key "inherit" mapped to a non-<code>null</code> object. 1559 For more information see {@link 1560 com.liferay.portal.service.persistence.GroupFinder}. 1561 * @param start the lower bound of the range of groups to return 1562 * @param end the upper bound of the range of groups to return (not 1563 inclusive) 1564 * @return the matching groups ordered by name 1565 */ 1566 public static java.util.List<com.liferay.portal.model.Group> search( 1567 long companyId, long[] classNameIds, java.lang.String keywords, 1568 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1569 int start, int end) { 1570 return getService() 1571 .search(companyId, classNameIds, keywords, params, start, end); 1572 } 1573 1574 /** 1575 * Returns an ordered range of all the groups that match the class name IDs 1576 * and keywords, optionally including the user's inherited organization 1577 * groups and user groups. System and staged groups are not included. 1578 * 1579 * <p> 1580 * Useful when paginating results. Returns a maximum of <code>end - 1581 * start</code> instances. <code>start</code> and <code>end</code> are not 1582 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1583 * refers to the first result in the set. Setting both <code>start</code> 1584 * and <code>end</code> to {@link 1585 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1586 * result set. 1587 * </p> 1588 * 1589 * @param companyId the primary key of the company 1590 * @param classNameIds the primary keys of the class names of the entities 1591 the groups are related to (optionally <code>null</code>) 1592 * @param keywords the keywords (space separated), which may occur in the 1593 sites's name, or description (optionally <code>null</code>) 1594 * @param params the finder params (optionally <code>null</code>). To 1595 include a user's organizations, inherited organizations, and user 1596 groups in the search, add an entry with key 1597 "usersGroups" mapped to the user's ID and an entry with 1598 key "inherit" mapped to a non-<code>null</code> object. 1599 For more information see {@link 1600 com.liferay.portal.service.persistence.GroupFinder}. 1601 * @param start the lower bound of the range of groups to return 1602 * @param end the upper bound of the range of groups to return (not 1603 inclusive) 1604 * @param obc the comparator to order the groups (optionally 1605 <code>null</code>) 1606 * @return the matching groups ordered by comparator <code>obc</code> 1607 */ 1608 public static java.util.List<com.liferay.portal.model.Group> search( 1609 long companyId, long[] classNameIds, java.lang.String keywords, 1610 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1611 int start, int end, 1612 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1613 return getService() 1614 .search(companyId, classNameIds, keywords, params, start, 1615 end, obc); 1616 } 1617 1618 /** 1619 * Returns an ordered range of all the groups that match the class name IDs, 1620 * name, and description, optionally including the user's inherited 1621 * organization groups and user groups. System and staged groups are not 1622 * included. 1623 * 1624 * <p> 1625 * Useful when paginating results. Returns a maximum of <code>end - 1626 * start</code> instances. <code>start</code> and <code>end</code> are not 1627 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1628 * refers to the first result in the set. Setting both <code>start</code> 1629 * and <code>end</code> to {@link 1630 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1631 * result set. 1632 * </p> 1633 * 1634 * @param companyId the primary key of the company 1635 * @param classNameIds the primary keys of the class names of the entities 1636 the groups are related to (optionally <code>null</code>) 1637 * @param name the group's name (optionally <code>null</code>) 1638 * @param description the group's description (optionally 1639 <code>null</code>) 1640 * @param params the finder params (optionally <code>null</code>). To 1641 include a user's organizations, inherited organizations, and user 1642 groups in the search, add an entry with key 1643 "usersGroups" mapped to the user's ID and an entry with 1644 key "inherit" mapped to a non-<code>null</code> object. 1645 For more information see {@link 1646 com.liferay.portal.service.persistence.GroupFinder}. 1647 * @param andOperator whether every field must match its keywords, or just 1648 one field. 1649 * @param start the lower bound of the range of groups to return 1650 * @param end the upper bound of the range of groups to return (not 1651 inclusive) 1652 * @return the matching groups ordered by name 1653 */ 1654 public static java.util.List<com.liferay.portal.model.Group> search( 1655 long companyId, long[] classNameIds, java.lang.String name, 1656 java.lang.String description, 1657 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1658 boolean andOperator, int start, int end) { 1659 return getService() 1660 .search(companyId, classNameIds, name, description, params, 1661 andOperator, start, end); 1662 } 1663 1664 /** 1665 * Returns an ordered range of all the groups that match the class name IDs, 1666 * name, and description, optionally including the user's inherited 1667 * organization groups and user groups. System and staged groups are not 1668 * included. 1669 * 1670 * <p> 1671 * Useful when paginating results. Returns a maximum of <code>end - 1672 * start</code> instances. <code>start</code> and <code>end</code> are not 1673 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1674 * refers to the first result in the set. Setting both <code>start</code> 1675 * and <code>end</code> to {@link 1676 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1677 * result set. 1678 * </p> 1679 * 1680 * @param companyId the primary key of the company 1681 * @param classNameIds the primary keys of the class names of the entities 1682 the groups are related to (optionally <code>null</code>) 1683 * @param name the group's name (optionally <code>null</code>) 1684 * @param description the group's description (optionally 1685 <code>null</code>) 1686 * @param params the finder params (optionally <code>null</code>). To 1687 include a user's organizations, inherited organizations, and user 1688 groups in the search, add an entry with key 1689 "usersGroups" mapped to the user's ID and an entry with 1690 key "inherit" mapped to a non-<code>null</code> object. 1691 For more information see {@link 1692 com.liferay.portal.service.persistence.GroupFinder}. 1693 * @param andOperator whether every field must match its keywords, or just 1694 one field. 1695 * @param start the lower bound of the range of groups to return 1696 * @param end the upper bound of the range of groups to return (not 1697 inclusive) 1698 * @param obc the comparator to order the groups (optionally 1699 <code>null</code>) 1700 * @return the matching groups ordered by comparator <code>obc</code> 1701 */ 1702 public static java.util.List<com.liferay.portal.model.Group> search( 1703 long companyId, long[] classNameIds, java.lang.String name, 1704 java.lang.String description, 1705 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1706 boolean andOperator, int start, int end, 1707 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1708 return getService() 1709 .search(companyId, classNameIds, name, description, params, 1710 andOperator, start, end, obc); 1711 } 1712 1713 /** 1714 * Returns an ordered range of all the groups belonging to the parent group 1715 * that match the class name IDs and keywords, optionally including the 1716 * user's inherited organization groups and user groups. System and staged 1717 * groups are not included. 1718 * 1719 * <p> 1720 * Useful when paginating results. Returns a maximum of <code>end - 1721 * start</code> instances. <code>start</code> and <code>end</code> are not 1722 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1723 * refers to the first result in the set. Setting both <code>start</code> 1724 * and <code>end</code> to {@link 1725 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1726 * result set. 1727 * </p> 1728 * 1729 * @param companyId the primary key of the company 1730 * @param classNameIds the primary keys of the class names of the entities 1731 the groups are related to (optionally <code>null</code>) 1732 * @param parentGroupId the primary key of the parent group 1733 * @param keywords the keywords (space separated), which may occur in the 1734 sites's name, or description (optionally <code>null</code>) 1735 * @param params the finder params (optionally <code>null</code>). To 1736 include a user's organizations, inherited organizations, and user 1737 groups in the search, add an entry with key 1738 "usersGroups" mapped to the user's ID and an entry with 1739 key "inherit" mapped to a non-<code>null</code> object. 1740 For more information see {@link 1741 com.liferay.portal.service.persistence.GroupFinder}. 1742 * @param start the lower bound of the range of groups to return 1743 * @param end the upper bound of the range of groups to return (not 1744 inclusive) 1745 * @return the matching groups ordered by name 1746 */ 1747 public static java.util.List<com.liferay.portal.model.Group> search( 1748 long companyId, long[] classNameIds, long parentGroupId, 1749 java.lang.String keywords, 1750 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1751 int start, int end) { 1752 return getService() 1753 .search(companyId, classNameIds, parentGroupId, keywords, 1754 params, start, end); 1755 } 1756 1757 /** 1758 * Returns an ordered range of all the groups belonging to the parent group 1759 * that match the class name IDs and keywords, optionally including the 1760 * user's inherited organization groups and user groups. System and staged 1761 * groups are not included. 1762 * 1763 * <p> 1764 * Useful when paginating results. Returns a maximum of <code>end - 1765 * start</code> instances. <code>start</code> and <code>end</code> are not 1766 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1767 * refers to the first result in the set. Setting both <code>start</code> 1768 * and <code>end</code> to {@link 1769 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1770 * result set. 1771 * </p> 1772 * 1773 * @param companyId the primary key of the company 1774 * @param classNameIds the primary keys of the class names of the entities 1775 the groups are related to (optionally <code>null</code>) 1776 * @param parentGroupId the primary key of the parent group 1777 * @param keywords the keywords (space separated), which may occur in the 1778 sites's name, or description (optionally <code>null</code>) 1779 * @param params the finder params (optionally <code>null</code>). To 1780 include a user's organizations, inherited organizations, and user 1781 groups in the search, add an entry with key 1782 "usersGroups" mapped to the user's ID and an entry with 1783 key "inherit" mapped to a non-<code>null</code> object. 1784 For more information see {@link 1785 com.liferay.portal.service.persistence.GroupFinder}. 1786 * @param start the lower bound of the range of groups to return 1787 * @param end the upper bound of the range of groups to return (not 1788 inclusive) 1789 * @param obc the comparator to order the groups (optionally 1790 <code>null</code>) 1791 * @return the matching groups ordered by comparator <code>obc</code> 1792 */ 1793 public static java.util.List<com.liferay.portal.model.Group> search( 1794 long companyId, long[] classNameIds, long parentGroupId, 1795 java.lang.String keywords, 1796 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1797 int start, int end, 1798 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1799 return getService() 1800 .search(companyId, classNameIds, parentGroupId, keywords, 1801 params, start, end, obc); 1802 } 1803 1804 /** 1805 * Returns an ordered range of all the groups belonging to the parent group 1806 * that match the class name IDs, name, and description, optionally 1807 * including the user's inherited organization groups and user groups. 1808 * System and staged groups are not included. 1809 * 1810 * <p> 1811 * Useful when paginating results. Returns a maximum of <code>end - 1812 * start</code> instances. <code>start</code> and <code>end</code> are not 1813 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1814 * refers to the first result in the set. Setting both <code>start</code> 1815 * and <code>end</code> to {@link 1816 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1817 * result set. 1818 * </p> 1819 * 1820 * @param companyId the primary key of the company 1821 * @param classNameIds the primary keys of the class names of the entities 1822 the groups are related to (optionally <code>null</code>) 1823 * @param parentGroupId the primary key of the parent group 1824 * @param name the group's name (optionally <code>null</code>) 1825 * @param description the group's description (optionally 1826 <code>null</code>) 1827 * @param params the finder params (optionally <code>null</code>). To 1828 include a user's organizations, inherited organizations, and user 1829 groups in the search, add an entry with key 1830 "usersGroups" mapped to the user's ID and an entry with 1831 key "inherit" mapped to a non-<code>null</code> object. 1832 For more information see {@link 1833 com.liferay.portal.service.persistence.GroupFinder}. 1834 * @param andOperator whether every field must match its keywords, or just 1835 one field. 1836 * @param start the lower bound of the range of groups to return 1837 * @param end the upper bound of the range of groups to return (not 1838 inclusive) 1839 * @return the matching groups ordered by name 1840 */ 1841 public static java.util.List<com.liferay.portal.model.Group> search( 1842 long companyId, long[] classNameIds, long parentGroupId, 1843 java.lang.String name, java.lang.String description, 1844 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1845 boolean andOperator, int start, int end) { 1846 return getService() 1847 .search(companyId, classNameIds, parentGroupId, name, 1848 description, params, andOperator, start, end); 1849 } 1850 1851 /** 1852 * Returns an ordered range of all the groups belonging to the parent group 1853 * that match the class name IDs, name, and description, optionally 1854 * including the user's inherited organization groups and user groups. 1855 * System and staged groups are not included. 1856 * 1857 * <p> 1858 * Useful when paginating results. Returns a maximum of <code>end - 1859 * start</code> instances. <code>start</code> and <code>end</code> are not 1860 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1861 * refers to the first result in the set. Setting both <code>start</code> 1862 * and <code>end</code> to {@link 1863 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1864 * result set. 1865 * </p> 1866 * 1867 * @param companyId the primary key of the company 1868 * @param classNameIds the primary keys of the class names of the entities 1869 the groups are related to (optionally <code>null</code>) 1870 * @param parentGroupId the primary key of the parent group 1871 * @param name the group's name (optionally <code>null</code>) 1872 * @param description the group's description (optionally 1873 <code>null</code>) 1874 * @param params the finder params (optionally <code>null</code>). To 1875 include a user's organizations, inherited organizations, and user 1876 groups in the search, add an entry with key 1877 "usersGroups" mapped to the user's ID and an entry with 1878 key "inherit" mapped to a non-<code>null</code> object. 1879 For more information see {@link 1880 com.liferay.portal.service.persistence.GroupFinder}. 1881 * @param andOperator whether every field must match its keywords, or just 1882 one field. 1883 * @param start the lower bound of the range of groups to return 1884 * @param end the upper bound of the range of groups to return (not 1885 inclusive) 1886 * @param obc the comparator to order the groups (optionally 1887 <code>null</code>) 1888 * @return the matching groups ordered by comparator <code>obc</code> 1889 */ 1890 public static java.util.List<com.liferay.portal.model.Group> search( 1891 long companyId, long[] classNameIds, long parentGroupId, 1892 java.lang.String name, java.lang.String description, 1893 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1894 boolean andOperator, int start, int end, 1895 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1896 return getService() 1897 .search(companyId, classNameIds, parentGroupId, name, 1898 description, params, andOperator, start, end, obc); 1899 } 1900 1901 /** 1902 * Returns an ordered range of all the groups that match the keywords, 1903 * optionally including the user's inherited organization groups and user 1904 * groups. System and staged groups are not included. 1905 * 1906 * <p> 1907 * Useful when paginating results. Returns a maximum of <code>end - 1908 * start</code> instances. <code>start</code> and <code>end</code> are not 1909 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1910 * refers to the first result in the set. Setting both <code>start</code> 1911 * and <code>end</code> to {@link 1912 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1913 * result set. 1914 * </p> 1915 * 1916 * @param companyId the primary key of the company 1917 * @param keywords the keywords (space separated), which may occur in the 1918 sites's name, or description (optionally <code>null</code>) 1919 * @param params the finder params (optionally <code>null</code>). To 1920 include the user's inherited organizations and user groups in the 1921 search, add entries having "usersGroups" and 1922 "inherit" as keys mapped to the the user's ID. For more 1923 information see {@link 1924 com.liferay.portal.service.persistence.GroupFinder}. 1925 * @param start the lower bound of the range of groups to return 1926 * @param end the upper bound of the range of groups to return (not 1927 inclusive) 1928 * @return the matching groups ordered by name 1929 */ 1930 public static java.util.List<com.liferay.portal.model.Group> search( 1931 long companyId, java.lang.String keywords, 1932 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1933 int start, int end) { 1934 return getService().search(companyId, keywords, params, start, end); 1935 } 1936 1937 /** 1938 * Returns an ordered range of all the groups that match the keywords, 1939 * optionally including the user's inherited organization groups and user 1940 * groups. System and staged groups are not included. 1941 * 1942 * <p> 1943 * Useful when paginating results. Returns a maximum of <code>end - 1944 * start</code> instances. <code>start</code> and <code>end</code> are not 1945 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1946 * refers to the first result in the set. Setting both <code>start</code> 1947 * and <code>end</code> to {@link 1948 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1949 * result set. 1950 * </p> 1951 * 1952 * @param companyId the primary key of the company 1953 * @param keywords the keywords (space separated), which may occur in the 1954 sites's name, or description (optionally <code>null</code>) 1955 * @param params the finder params (optionally <code>null</code>). To 1956 include the user's inherited organizations and user groups in the 1957 search, add entries having "usersGroups" and 1958 "inherit" as keys mapped to the the user's ID. For more 1959 information see {@link 1960 com.liferay.portal.service.persistence.GroupFinder}. 1961 * @param start the lower bound of the range of groups to return 1962 * @param end the upper bound of the range of groups to return (not 1963 inclusive) 1964 * @param obc the comparator to order the groups (optionally 1965 <code>null</code>) 1966 * @return the matching groups ordered by comparator <code>obc</code> 1967 */ 1968 public static java.util.List<com.liferay.portal.model.Group> search( 1969 long companyId, java.lang.String keywords, 1970 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1971 int start, int end, 1972 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 1973 return getService().search(companyId, keywords, params, start, end, obc); 1974 } 1975 1976 /** 1977 * Returns an ordered range of all the site groups and organization groups 1978 * that match the name and description, optionally including the user's 1979 * inherited organization groups and user groups. System and staged groups 1980 * are not included. 1981 * 1982 * <p> 1983 * Useful when paginating results. Returns a maximum of <code>end - 1984 * start</code> instances. <code>start</code> and <code>end</code> are not 1985 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1986 * refers to the first result in the set. Setting both <code>start</code> 1987 * and <code>end</code> to {@link 1988 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1989 * result set. 1990 * </p> 1991 * 1992 * @param companyId the primary key of the company 1993 * @param name the group's name (optionally <code>null</code>) 1994 * @param description the group's description (optionally 1995 <code>null</code>) 1996 * @param params the finder params (optionally <code>null</code>). To 1997 include the user's inherited organizations and user groups in the 1998 search, add entries having "usersGroups" and 1999 "inherit" as keys mapped to the the user's ID. For more 2000 information see {@link 2001 com.liferay.portal.service.persistence.GroupFinder}. 2002 * @param andOperator whether every field must match its keywords, or just 2003 one field. 2004 * @param start the lower bound of the range of groups to return 2005 * @param end the upper bound of the range of groups to return (not 2006 inclusive) 2007 * @return the matching groups ordered by name 2008 */ 2009 public static java.util.List<com.liferay.portal.model.Group> search( 2010 long companyId, java.lang.String name, java.lang.String description, 2011 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2012 boolean andOperator, int start, int end) { 2013 return getService() 2014 .search(companyId, name, description, params, andOperator, 2015 start, end); 2016 } 2017 2018 /** 2019 * Returns an ordered range of all the site groups and organization groups 2020 * that match the name and description, optionally including the user's 2021 * inherited organization groups and user groups. System and staged groups 2022 * are not included. 2023 * 2024 * <p> 2025 * Useful when paginating results. Returns a maximum of <code>end - 2026 * start</code> instances. <code>start</code> and <code>end</code> are not 2027 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2028 * refers to the first result in the set. Setting both <code>start</code> 2029 * and <code>end</code> to {@link 2030 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2031 * result set. 2032 * </p> 2033 * 2034 * @param companyId the primary key of the company 2035 * @param name the group's name (optionally <code>null</code>) 2036 * @param description the group's description (optionally 2037 <code>null</code>) 2038 * @param params the finder params (optionally <code>null</code>). To 2039 include the user's inherited organizations and user groups in the 2040 search, add entries having "usersGroups" and 2041 "inherit" as keys mapped to the the user's ID. For more 2042 information see {@link 2043 com.liferay.portal.service.persistence.GroupFinder}. 2044 * @param andOperator whether every field must match its keywords, or just 2045 one field. 2046 * @param start the lower bound of the range of groups to return 2047 * @param end the upper bound of the range of groups to return (not 2048 inclusive) 2049 * @param obc the comparator to order the groups (optionally 2050 <code>null</code>) 2051 * @return the matching groups ordered by comparator <code>obc</code> 2052 */ 2053 public static java.util.List<com.liferay.portal.model.Group> search( 2054 long companyId, java.lang.String name, java.lang.String description, 2055 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2056 boolean andOperator, int start, int end, 2057 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 2058 return getService() 2059 .search(companyId, name, description, params, andOperator, 2060 start, end, obc); 2061 } 2062 2063 /** 2064 * Returns an ordered range of all the company's groups, optionally 2065 * including the user's inherited organization groups and user groups. 2066 * System and staged groups are not included. 2067 * 2068 * <p> 2069 * Useful when paginating results. Returns a maximum of <code>end - 2070 * start</code> instances. <code>start</code> and <code>end</code> are not 2071 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2072 * refers to the first result in the set. Setting both <code>start</code> 2073 * and <code>end</code> to {@link 2074 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2075 * result set. 2076 * </p> 2077 * 2078 * @param companyId the primary key of the company 2079 * @param params the finder params (optionally <code>null</code>). To 2080 include a user's organizations, inherited organizations, and user 2081 groups in the search, add an entry with key 2082 "usersGroups" mapped to the user's ID and an entry with 2083 key "inherit" mapped to a non-<code>null</code> object. 2084 For more information see {@link 2085 com.liferay.portal.service.persistence.GroupFinder}. 2086 * @param start the lower bound of the range of groups to return 2087 * @param end the upper bound of the range of groups to return (not 2088 inclusive) 2089 * @return the matching groups ordered by name 2090 */ 2091 public static java.util.List<com.liferay.portal.model.Group> search( 2092 long companyId, 2093 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2094 int start, int end) { 2095 return getService().search(companyId, params, start, end); 2096 } 2097 2098 /** 2099 * Returns an ordered range of all the groups belonging to the parent group 2100 * that match the keywords, optionally including the user's inherited 2101 * organization groups and user groups. System and staged groups are not 2102 * included. 2103 * 2104 * <p> 2105 * Useful when paginating results. Returns a maximum of <code>end - 2106 * start</code> instances. <code>start</code> and <code>end</code> are not 2107 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2108 * refers to the first result in the set. Setting both <code>start</code> 2109 * and <code>end</code> to {@link 2110 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2111 * result set. 2112 * </p> 2113 * 2114 * @param companyId the primary key of the company 2115 * @param parentGroupId the primary key of the parent group 2116 * @param keywords the keywords (space separated), which may occur in the 2117 sites's name, or description (optionally <code>null</code>) 2118 * @param params the finder params (optionally <code>null</code>). To 2119 include the user's inherited organizations and user groups in the 2120 search, add entries having "usersGroups" and 2121 "inherit" as keys mapped to the the user's ID. For more 2122 information see {@link 2123 com.liferay.portal.service.persistence.GroupFinder}. 2124 * @param start the lower bound of the range of groups to return 2125 * @param end the upper bound of the range of groups to return (not 2126 inclusive) 2127 * @return the matching groups ordered by name 2128 */ 2129 public static java.util.List<com.liferay.portal.model.Group> search( 2130 long companyId, long parentGroupId, java.lang.String keywords, 2131 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2132 int start, int end) { 2133 return getService() 2134 .search(companyId, parentGroupId, keywords, params, start, 2135 end); 2136 } 2137 2138 /** 2139 * Returns an ordered range of all the groups belonging to the parent group 2140 * that match the keywords, optionally including the user's inherited 2141 * organization groups and user groups. System and staged groups are not 2142 * included. 2143 * 2144 * <p> 2145 * Useful when paginating results. Returns a maximum of <code>end - 2146 * start</code> instances. <code>start</code> and <code>end</code> are not 2147 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2148 * refers to the first result in the set. Setting both <code>start</code> 2149 * and <code>end</code> to {@link 2150 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2151 * result set. 2152 * </p> 2153 * 2154 * @param companyId the primary key of the company 2155 * @param parentGroupId the primary key of the parent group 2156 * @param keywords the keywords (space separated), which may occur in the 2157 sites's name, or description (optionally <code>null</code>) 2158 * @param params the finder params (optionally <code>null</code>). To 2159 include the user's inherited organizations and user groups in the 2160 search, add entries having "usersGroups" and 2161 "inherit" as keys mapped to the the user's ID. For more 2162 information see {@link 2163 com.liferay.portal.service.persistence.GroupFinder}. 2164 * @param start the lower bound of the range of groups to return 2165 * @param end the upper bound of the range of groups to return (not 2166 inclusive) 2167 * @param obc the comparator to order the groups (optionally 2168 <code>null</code>) 2169 * @return the matching groups ordered by comparator <code>obc</code> 2170 */ 2171 public static java.util.List<com.liferay.portal.model.Group> search( 2172 long companyId, long parentGroupId, java.lang.String keywords, 2173 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2174 int start, int end, 2175 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 2176 return getService() 2177 .search(companyId, parentGroupId, keywords, params, start, 2178 end, obc); 2179 } 2180 2181 /** 2182 * Returns an ordered range of all the site groups belonging to the parent 2183 * group and organization groups that match the name and description, 2184 * optionally including the user's inherited organization groups and user 2185 * groups. System and staged groups are not included. 2186 * 2187 * <p> 2188 * Useful when paginating results. Returns a maximum of <code>end - 2189 * start</code> instances. <code>start</code> and <code>end</code> are not 2190 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2191 * refers to the first result in the set. Setting both <code>start</code> 2192 * and <code>end</code> to {@link 2193 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2194 * result set. 2195 * </p> 2196 * 2197 * @param companyId the primary key of the company 2198 * @param parentGroupId the primary key of the parent group 2199 * @param name the group's name (optionally <code>null</code>) 2200 * @param description the group's description (optionally 2201 <code>null</code>) 2202 * @param params the finder params (optionally <code>null</code>). To 2203 include the user's inherited organizations and user groups in the 2204 search, add entries having "usersGroups" and 2205 "inherit" as keys mapped to the the user's ID. For more 2206 information see {@link 2207 com.liferay.portal.service.persistence.GroupFinder}. 2208 * @param andOperator whether every field must match its keywords, or just 2209 one field. 2210 * @param start the lower bound of the range of groups to return 2211 * @param end the upper bound of the range of groups to return (not 2212 inclusive) 2213 * @return the matching groups ordered by name 2214 */ 2215 public static java.util.List<com.liferay.portal.model.Group> search( 2216 long companyId, long parentGroupId, java.lang.String name, 2217 java.lang.String description, 2218 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2219 boolean andOperator, int start, int end) { 2220 return getService() 2221 .search(companyId, parentGroupId, name, description, params, 2222 andOperator, start, end); 2223 } 2224 2225 /** 2226 * Returns an ordered range of all the site groups belonging to the parent 2227 * group and organization groups that match the name and description, 2228 * optionally including the user's inherited organization groups and user 2229 * groups. System and staged groups are not included. 2230 * 2231 * <p> 2232 * Useful when paginating results. Returns a maximum of <code>end - 2233 * start</code> instances. <code>start</code> and <code>end</code> are not 2234 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2235 * refers to the first result in the set. Setting both <code>start</code> 2236 * and <code>end</code> to {@link 2237 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 2238 * result set. 2239 * </p> 2240 * 2241 * @param companyId the primary key of the company 2242 * @param parentGroupId the primary key of the parent group 2243 * @param name the group's name (optionally <code>null</code>) 2244 * @param description the group's description (optionally 2245 <code>null</code>) 2246 * @param params the finder params (optionally <code>null</code>). To 2247 include the user's inherited organizations and user groups in the 2248 search, add entries having "usersGroups" and 2249 "inherit" as keys mapped to the the user's ID. For more 2250 information see {@link 2251 com.liferay.portal.service.persistence.GroupFinder}. 2252 * @param andOperator whether every field must match its keywords, or just 2253 one field. 2254 * @param start the lower bound of the range of groups to return 2255 * @param end the upper bound of the range of groups to return (not 2256 inclusive) 2257 * @param obc the comparator to order the groups (optionally 2258 <code>null</code>) 2259 * @return the matching groups ordered by comparator <code>obc</code> 2260 */ 2261 public static java.util.List<com.liferay.portal.model.Group> search( 2262 long companyId, long parentGroupId, java.lang.String name, 2263 java.lang.String description, 2264 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2265 boolean andOperator, int start, int end, 2266 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> obc) { 2267 return getService() 2268 .search(companyId, parentGroupId, name, description, params, 2269 andOperator, start, end, obc); 2270 } 2271 2272 /** 2273 * Returns the number of groups that match the class name IDs, and keywords, 2274 * optionally including the user's inherited organization groups and user 2275 * groups. System and staged groups are not included. 2276 * 2277 * @param companyId the primary key of the company 2278 * @param classNameIds the primary keys of the class names of the entities 2279 the groups are related to (optionally <code>null</code>) 2280 * @param keywords the keywords (space separated), which may occur in the 2281 sites's name, or description (optionally <code>null</code>) 2282 * @param params the finder params (optionally <code>null</code>). To 2283 include the user's inherited organization groups and user groups 2284 in the search, add entries having "usersGroups" and 2285 "inherit" as keys mapped to the the user's ID. For more 2286 information see {@link 2287 com.liferay.portal.service.persistence.GroupFinder}. 2288 * @return the number of matching groups 2289 */ 2290 public static int searchCount(long companyId, long[] classNameIds, 2291 java.lang.String keywords, 2292 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2293 return getService() 2294 .searchCount(companyId, classNameIds, keywords, params); 2295 } 2296 2297 /** 2298 * Returns the number of groups that match the class name IDs, name, and 2299 * description, optionally including the user's inherited organization 2300 * groups and user groups. System and staged groups are not included. 2301 * 2302 * @param companyId the primary key of the company 2303 * @param classNameIds the primary keys of the class names of the entities 2304 the groups are related to (optionally <code>null</code>) 2305 * @param name the group's name (optionally <code>null</code>) 2306 * @param description the group's description (optionally 2307 <code>null</code>) 2308 * @param params the finder params (optionally <code>null</code>). To 2309 include the user's inherited organization groups and user groups 2310 in the search, add entries having "usersGroups" and 2311 "inherit" as keys mapped to the the user's ID. For more 2312 information see {@link 2313 com.liferay.portal.service.persistence.GroupFinder}. 2314 * @param andOperator whether every field must match its keywords, or just 2315 one field. 2316 * @return the number of matching groups 2317 */ 2318 public static int searchCount(long companyId, long[] classNameIds, 2319 java.lang.String name, java.lang.String description, 2320 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2321 boolean andOperator) { 2322 return getService() 2323 .searchCount(companyId, classNameIds, name, description, 2324 params, andOperator); 2325 } 2326 2327 /** 2328 * Returns the number of groups belonging to the parent group that match the 2329 * class name IDs, and keywords, optionally including the user's inherited 2330 * organization groups and user groups. System and staged groups are not 2331 * included. 2332 * 2333 * @param companyId the primary key of the company 2334 * @param classNameIds the primary keys of the class names of the entities 2335 the groups are related to (optionally <code>null</code>) 2336 * @param parentGroupId the primary key of the parent group 2337 * @param keywords the keywords (space separated), which may occur in the 2338 sites's name, or description (optionally <code>null</code>) 2339 * @param params the finder params (optionally <code>null</code>). To 2340 include the user's inherited organization groups and user groups 2341 in the search, add entries having "usersGroups" and 2342 "inherit" as keys mapped to the the user's ID. For more 2343 information see {@link 2344 com.liferay.portal.service.persistence.GroupFinder}. 2345 * @return the number of matching groups 2346 */ 2347 public static int searchCount(long companyId, long[] classNameIds, 2348 long parentGroupId, java.lang.String keywords, 2349 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2350 return getService() 2351 .searchCount(companyId, classNameIds, parentGroupId, 2352 keywords, params); 2353 } 2354 2355 /** 2356 * Returns the number of groups belonging to the parent group that match the 2357 * class name IDs, name, and description, optionally including the user's 2358 * inherited organization groups and user groups. System and staged groups 2359 * are not included. 2360 * 2361 * @param companyId the primary key of the company 2362 * @param classNameIds the primary keys of the class names of the entities 2363 the groups are related to (optionally <code>null</code>) 2364 * @param parentGroupId the primary key of the parent group 2365 * @param name the group's name (optionally <code>null</code>) 2366 * @param description the group's description (optionally 2367 <code>null</code>) 2368 * @param params the finder params (optionally <code>null</code>). To 2369 include the user's inherited organization groups and user groups 2370 in the search, add entries having "usersGroups" and 2371 "inherit" as keys mapped to the the user's ID. For more 2372 information see {@link 2373 com.liferay.portal.service.persistence.GroupFinder}. 2374 * @param andOperator whether every field must match its keywords, or just 2375 one field. 2376 * @return the number of matching groups 2377 */ 2378 public static int searchCount(long companyId, long[] classNameIds, 2379 long parentGroupId, java.lang.String name, 2380 java.lang.String description, 2381 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2382 boolean andOperator) { 2383 return getService() 2384 .searchCount(companyId, classNameIds, parentGroupId, name, 2385 description, params, andOperator); 2386 } 2387 2388 /** 2389 * Returns the number of groups that match the keywords, optionally 2390 * including the user's inherited organization groups and user groups. 2391 * System and staged groups are not included. 2392 * 2393 * @param companyId the primary key of the company 2394 * @param keywords the keywords (space separated), which may occur in the 2395 sites's name, or description (optionally <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 * @return the number of matching groups 2403 */ 2404 public static int searchCount(long companyId, java.lang.String keywords, 2405 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2406 return getService().searchCount(companyId, keywords, params); 2407 } 2408 2409 /** 2410 * Returns the number of groups and immediate organization groups that match 2411 * the name and description, optionally including the user's inherited 2412 * organization groups and user groups. System and staged groups are not 2413 * included. 2414 * 2415 * @param companyId the primary key of the company 2416 * @param name the group's name (optionally <code>null</code>) 2417 * @param description the group's description (optionally 2418 <code>null</code>) 2419 * @param params the finder params (optionally <code>null</code>). To 2420 include the user's inherited organization groups and user groups 2421 in the search, add entries having "usersGroups" and 2422 "inherit" as keys mapped to the the user's ID. For more 2423 information see {@link 2424 com.liferay.portal.service.persistence.GroupFinder}. 2425 * @param andOperator whether every field must match its keywords, or just 2426 one field. 2427 * @return the number of matching groups 2428 */ 2429 public static int searchCount(long companyId, java.lang.String name, 2430 java.lang.String description, 2431 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2432 boolean andOperator) { 2433 return getService() 2434 .searchCount(companyId, name, description, params, 2435 andOperator); 2436 } 2437 2438 /** 2439 * Returns the number of groups belonging to the parent group that match the 2440 * keywords, optionally including the user's inherited organization groups 2441 * and user groups. System and staged groups are not included. 2442 * 2443 * @param companyId the primary key of the company 2444 * @param parentGroupId the primary key of the parent group 2445 * @param keywords the keywords (space separated), which may occur in the 2446 sites's name, or description (optionally <code>null</code>) 2447 * @param params the finder params (optionally <code>null</code>). To 2448 include the user's inherited organization groups and user groups 2449 in the search, add entries having "usersGroups" and 2450 "inherit" as keys mapped to the the user's ID. For more 2451 information see {@link 2452 com.liferay.portal.service.persistence.GroupFinder}. 2453 * @return the number of matching groups 2454 */ 2455 public static int searchCount(long companyId, long parentGroupId, 2456 java.lang.String keywords, 2457 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 2458 return getService() 2459 .searchCount(companyId, parentGroupId, keywords, params); 2460 } 2461 2462 /** 2463 * Returns the number of groups belonging to the parent group and immediate 2464 * organization groups that match the name and description, optionally 2465 * including the user's inherited organization groups and user groups. 2466 * System and staged groups are not included. 2467 * 2468 * @param companyId the primary key of the company 2469 * @param parentGroupId the primary key of the parent group 2470 * @param name the group's name (optionally <code>null</code>) 2471 * @param description the group's description (optionally 2472 <code>null</code>) 2473 * @param params the finder params (optionally <code>null</code>). To 2474 include the user's inherited organization groups and user groups 2475 in the search, add entries having "usersGroups" and 2476 "inherit" as keys mapped to the the user's ID. For more 2477 information see {@link 2478 com.liferay.portal.service.persistence.GroupFinder}. 2479 * @param andOperator whether every field must match its keywords, or just 2480 one field. 2481 * @return the number of matching groups 2482 */ 2483 public static int searchCount(long companyId, long parentGroupId, 2484 java.lang.String name, java.lang.String description, 2485 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2486 boolean andOperator) { 2487 return getService() 2488 .searchCount(companyId, parentGroupId, name, description, 2489 params, andOperator); 2490 } 2491 2492 /** 2493 * Sets the Spring bean ID for this bean. 2494 * 2495 * @param beanIdentifier the Spring bean ID for this bean 2496 */ 2497 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 2498 getService().setBeanIdentifier(beanIdentifier); 2499 } 2500 2501 public static void setOrganizationGroups(long organizationId, 2502 long[] groupIds) { 2503 getService().setOrganizationGroups(organizationId, groupIds); 2504 } 2505 2506 public static void setRoleGroups(long roleId, long[] groupIds) { 2507 getService().setRoleGroups(roleId, groupIds); 2508 } 2509 2510 public static void setUserGroupGroups(long userGroupId, long[] groupIds) { 2511 getService().setUserGroupGroups(userGroupId, groupIds); 2512 } 2513 2514 public static void setUserGroups(long userId, long[] groupIds) { 2515 getService().setUserGroups(userId, groupIds); 2516 } 2517 2518 /** 2519 * Removes the groups from the role. 2520 * 2521 * @param roleId the primary key of the role 2522 * @param groupIds the primary keys of the groups 2523 */ 2524 public static void unsetRoleGroups(long roleId, long[] groupIds) { 2525 getService().unsetRoleGroups(roleId, groupIds); 2526 } 2527 2528 /** 2529 * Removes the user from the groups. 2530 * 2531 * @param userId the primary key of the user 2532 * @param groupIds the primary keys of the groups 2533 */ 2534 public static void unsetUserGroups(long userId, long[] groupIds) { 2535 getService().unsetUserGroups(userId, groupIds); 2536 } 2537 2538 /** 2539 * Updates the group's asset replacing categories and tag names. 2540 * 2541 * @param userId the primary key of the user 2542 * @param group the group 2543 * @param assetCategoryIds the primary keys of the asset categories 2544 (optionally <code>null</code>) 2545 * @param assetTagNames the asset tag names (optionally <code>null</code>) 2546 * @throws PortalException if a user with the primary key could not be found 2547 */ 2548 public static void updateAsset(long userId, 2549 com.liferay.portal.model.Group group, long[] assetCategoryIds, 2550 java.lang.String[] assetTagNames) 2551 throws com.liferay.portal.kernel.exception.PortalException { 2552 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames); 2553 } 2554 2555 /** 2556 * Updates the group's friendly URL. 2557 * 2558 * @param groupId the primary key of the group 2559 * @param friendlyURL the group's new friendlyURL (optionally 2560 <code>null</code>) 2561 * @return the group 2562 * @throws PortalException if a group with the primary key could not be 2563 found or if a valid friendly URL could not be created for the 2564 group 2565 */ 2566 public static com.liferay.portal.model.Group updateFriendlyURL( 2567 long groupId, java.lang.String friendlyURL) 2568 throws com.liferay.portal.kernel.exception.PortalException { 2569 return getService().updateFriendlyURL(groupId, friendlyURL); 2570 } 2571 2572 /** 2573 * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 2574 * 2575 * @param group the group 2576 * @return the group that was updated 2577 */ 2578 public static com.liferay.portal.model.Group updateGroup( 2579 com.liferay.portal.model.Group group) { 2580 return getService().updateGroup(group); 2581 } 2582 2583 /** 2584 * Updates the group. 2585 * 2586 * @param groupId the primary key of the group 2587 * @param parentGroupId the primary key of the parent group 2588 * @param name the name's key 2589 * @param description the group's new description (optionally 2590 <code>null</code>) 2591 * @param type the group's new type. For more information see {@link 2592 GroupConstants}. 2593 * @param manualMembership whether manual membership is allowed for the 2594 group 2595 * @param membershipRestriction the group's membership restriction. For 2596 more information see {@link GroupConstants}. 2597 * @param friendlyURL the group's new friendlyURL (optionally 2598 <code>null</code>) 2599 * @param active whether the group is active 2600 * @param serviceContext the service context to be applied (optionally 2601 <code>null</code>). Can set asset category IDs and asset tag 2602 names for the group. 2603 * @return the group 2604 * @throws PortalException if a group with the primary key could not be 2605 found or if the friendly URL was invalid or could one not be 2606 created 2607 * @deprecated As of 7.0.0, replaced by {@link #updateGroup(long, long, Map, 2608 Map, int, boolean, int, String, boolean, boolean, 2609 ServiceContext)} 2610 */ 2611 @Deprecated 2612 public static com.liferay.portal.model.Group updateGroup(long groupId, 2613 long parentGroupId, java.lang.String name, 2614 java.lang.String description, int type, boolean manualMembership, 2615 int membershipRestriction, java.lang.String friendlyURL, 2616 boolean inheritContent, boolean active, 2617 com.liferay.portal.service.ServiceContext serviceContext) 2618 throws com.liferay.portal.kernel.exception.PortalException { 2619 return getService() 2620 .updateGroup(groupId, parentGroupId, name, description, 2621 type, manualMembership, membershipRestriction, friendlyURL, 2622 inheritContent, active, serviceContext); 2623 } 2624 2625 public static com.liferay.portal.model.Group updateGroup(long groupId, 2626 long parentGroupId, 2627 java.util.Map<java.util.Locale, java.lang.String> nameMap, 2628 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 2629 int type, boolean manualMembership, int membershipRestriction, 2630 java.lang.String friendlyURL, boolean inheritContent, boolean active, 2631 com.liferay.portal.service.ServiceContext serviceContext) 2632 throws com.liferay.portal.kernel.exception.PortalException { 2633 return getService() 2634 .updateGroup(groupId, parentGroupId, nameMap, 2635 descriptionMap, type, manualMembership, membershipRestriction, 2636 friendlyURL, inheritContent, active, serviceContext); 2637 } 2638 2639 /** 2640 * Updates the group's type settings. 2641 * 2642 * @param groupId the primary key of the group 2643 * @param typeSettings the group's new type settings (optionally 2644 <code>null</code>) 2645 * @return the group 2646 * @throws PortalException if a group with the primary key could not be 2647 found 2648 */ 2649 public static com.liferay.portal.model.Group updateGroup(long groupId, 2650 java.lang.String typeSettings) 2651 throws com.liferay.portal.kernel.exception.PortalException { 2652 return getService().updateGroup(groupId, typeSettings); 2653 } 2654 2655 /** 2656 * Associates the group with a main site if the group is an organization. 2657 * 2658 * @param groupId the primary key of the group 2659 * @param site whether the group is to be associated with a main site 2660 * @return the group 2661 * @throws PortalException if a group with the primary key could not be 2662 found 2663 */ 2664 public static com.liferay.portal.model.Group updateSite(long groupId, 2665 boolean site) 2666 throws com.liferay.portal.kernel.exception.PortalException { 2667 return getService().updateSite(groupId, site); 2668 } 2669 2670 public static GroupLocalService getService() { 2671 if (_service == null) { 2672 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName()); 2673 2674 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class, 2675 "_service"); 2676 } 2677 2678 return _service; 2679 } 2680 2681 /** 2682 * @deprecated As of 6.2.0 2683 */ 2684 @Deprecated 2685 public void setService(GroupLocalService service) { 2686 } 2687 2688 private static GroupLocalService _service; 2689 }