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