001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.model.SystemEventConstants; 026 027 /** 028 * Provides the local service interface for UserGroup. Methods of this 029 * service will not have security checks based on the propagated JAAS 030 * credentials because this service can only be accessed from within the same 031 * VM. 032 * 033 * @author Brian Wing Shun Chan 034 * @see UserGroupLocalServiceUtil 035 * @see com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl 036 * @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl 037 * @generated 038 */ 039 @ProviderType 040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 041 PortalException.class, SystemException.class}) 042 public interface UserGroupLocalService extends BaseLocalService, 043 PersistedModelLocalService { 044 /* 045 * NOTE FOR DEVELOPERS: 046 * 047 * Never modify or reference this interface directly. Always use {@link UserGroupLocalServiceUtil} to access the user group local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 048 */ 049 public void addGroupUserGroup(long groupId, 050 com.liferay.portal.model.UserGroup userGroup); 051 052 public void addGroupUserGroup(long groupId, long userGroupId); 053 054 public void addGroupUserGroups(long groupId, 055 java.util.List<com.liferay.portal.model.UserGroup> UserGroups); 056 057 public void addGroupUserGroups(long groupId, long[] userGroupIds); 058 059 public void addTeamUserGroup(long teamId, 060 com.liferay.portal.model.UserGroup userGroup); 061 062 public void addTeamUserGroup(long teamId, long userGroupId); 063 064 public void addTeamUserGroups(long teamId, 065 java.util.List<com.liferay.portal.model.UserGroup> UserGroups); 066 067 public void addTeamUserGroups(long teamId, long[] userGroupIds); 068 069 /** 070 * Adds the user group to the database. Also notifies the appropriate model listeners. 071 * 072 * @param userGroup the user group 073 * @return the user group that was added 074 */ 075 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 076 public com.liferay.portal.model.UserGroup addUserGroup( 077 com.liferay.portal.model.UserGroup userGroup); 078 079 /** 080 * Adds a user group. 081 * 082 * <p> 083 * This method handles the creation and bookkeeping of the user group, 084 * including its resources, metadata, and internal data structures. It is 085 * not necessary to make subsequent calls to setup default groups and 086 * resources for the user group. 087 * </p> 088 * 089 * @param userId the primary key of the user 090 * @param companyId the primary key of the user group's company 091 * @param name the user group's name 092 * @param description the user group's description 093 * @return the user group 094 * @throws PortalException if the user group's information was invalid 095 * @deprecated As of 6.2.0, replaced by {@link #addUserGroup(long, long, 096 String, String, ServiceContext)} 097 */ 098 @java.lang.Deprecated 099 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 100 long companyId, java.lang.String name, java.lang.String description) 101 throws PortalException; 102 103 /** 104 * Adds a user group. 105 * 106 * <p> 107 * This method handles the creation and bookkeeping of the user group, 108 * including its resources, metadata, and internal data structures. It is 109 * not necessary to make subsequent calls to setup default groups and 110 * resources for the user group. 111 * </p> 112 * 113 * @param userId the primary key of the user 114 * @param companyId the primary key of the user group's company 115 * @param name the user group's name 116 * @param description the user group's description 117 * @param serviceContext the service context to be applied (optionally 118 <code>null</code>). Can set expando bridge attributes for the 119 user group. 120 * @return the user group 121 * @throws PortalException if the user group's information was invalid 122 */ 123 public com.liferay.portal.model.UserGroup addUserGroup(long userId, 124 long companyId, java.lang.String name, java.lang.String description, 125 com.liferay.portal.service.ServiceContext serviceContext) 126 throws PortalException; 127 128 public void addUserUserGroup(long userId, 129 com.liferay.portal.model.UserGroup userGroup); 130 131 public void addUserUserGroup(long userId, long userGroupId); 132 133 public void addUserUserGroups(long userId, 134 java.util.List<com.liferay.portal.model.UserGroup> UserGroups); 135 136 public void addUserUserGroups(long userId, long[] userGroupIds); 137 138 public void clearGroupUserGroups(long groupId); 139 140 public void clearTeamUserGroups(long teamId); 141 142 public void clearUserUserGroups(long userId); 143 144 /** 145 * Copies the user group's layout to the user. 146 * 147 * @param userGroupId the primary key of the user group 148 * @param userId the primary key of the user 149 * @throws PortalException if a user with the primary key could not be 150 found or if a portal exception occurred 151 * @deprecated As of 6.2.0 152 */ 153 @java.lang.Deprecated 154 public void copyUserGroupLayouts(long userGroupId, long userId) 155 throws PortalException; 156 157 /** 158 * Copies the user group's layouts to the users who are not already members 159 * of the user group. 160 * 161 * @param userGroupId the primary key of the user group 162 * @param userIds the primary keys of the users 163 * @throws PortalException if any one of the users could not be found or 164 if a portal exception occurred 165 * @deprecated As of 6.1.0 166 */ 167 @java.lang.Deprecated 168 public void copyUserGroupLayouts(long userGroupId, long[] userIds) 169 throws PortalException; 170 171 /** 172 * Copies the user groups' layouts to the user. 173 * 174 * @param userGroupIds the primary keys of the user groups 175 * @param userId the primary key of the user 176 * @throws PortalException if a user with the primary key could not be 177 found or if a portal exception occurred 178 * @deprecated As of 6.1.0 179 */ 180 @java.lang.Deprecated 181 public void copyUserGroupLayouts(long[] userGroupIds, long userId) 182 throws PortalException; 183 184 /** 185 * Creates a new user group with the primary key. Does not add the user group to the database. 186 * 187 * @param userGroupId the primary key for the new user group 188 * @return the new user group 189 */ 190 public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId); 191 192 public void deleteGroupUserGroup(long groupId, 193 com.liferay.portal.model.UserGroup userGroup); 194 195 public void deleteGroupUserGroup(long groupId, long userGroupId); 196 197 public void deleteGroupUserGroups(long groupId, 198 java.util.List<com.liferay.portal.model.UserGroup> UserGroups); 199 200 public void deleteGroupUserGroups(long groupId, long[] userGroupIds); 201 202 /** 203 * @throws PortalException 204 */ 205 @Override 206 public com.liferay.portal.model.PersistedModel deletePersistedModel( 207 com.liferay.portal.model.PersistedModel persistedModel) 208 throws PortalException; 209 210 public void deleteTeamUserGroup(long teamId, 211 com.liferay.portal.model.UserGroup userGroup); 212 213 public void deleteTeamUserGroup(long teamId, long userGroupId); 214 215 public void deleteTeamUserGroups(long teamId, 216 java.util.List<com.liferay.portal.model.UserGroup> UserGroups); 217 218 public void deleteTeamUserGroups(long teamId, long[] userGroupIds); 219 220 /** 221 * Deletes the user group from the database. Also notifies the appropriate model listeners. 222 * 223 * @param userGroup the user group 224 * @return the user group that was removed 225 * @throws PortalException 226 */ 227 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 228 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE) 229 public com.liferay.portal.model.UserGroup deleteUserGroup( 230 com.liferay.portal.model.UserGroup userGroup) throws PortalException; 231 232 /** 233 * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners. 234 * 235 * @param userGroupId the primary key of the user group 236 * @return the user group that was removed 237 * @throws PortalException if a user group with the primary key could not be found 238 */ 239 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 240 public com.liferay.portal.model.UserGroup deleteUserGroup(long userGroupId) 241 throws PortalException; 242 243 public void deleteUserGroups(long companyId) throws PortalException; 244 245 public void deleteUserUserGroup(long userId, 246 com.liferay.portal.model.UserGroup userGroup); 247 248 public void deleteUserUserGroup(long userId, long userGroupId); 249 250 public void deleteUserUserGroups(long userId, 251 java.util.List<com.liferay.portal.model.UserGroup> UserGroups); 252 253 public void deleteUserUserGroups(long userId, long[] userGroupIds); 254 255 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 256 257 /** 258 * Performs a dynamic query on the database and returns the matching rows. 259 * 260 * @param dynamicQuery the dynamic query 261 * @return the matching rows 262 */ 263 public <T> java.util.List<T> dynamicQuery( 264 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 265 266 /** 267 * Performs a dynamic query on the database and returns a range of the matching rows. 268 * 269 * <p> 270 * 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.UserGroupModelImpl}. 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. 271 * </p> 272 * 273 * @param dynamicQuery the dynamic query 274 * @param start the lower bound of the range of model instances 275 * @param end the upper bound of the range of model instances (not inclusive) 276 * @return the range of matching rows 277 */ 278 public <T> java.util.List<T> dynamicQuery( 279 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 280 int end); 281 282 /** 283 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 284 * 285 * <p> 286 * 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.UserGroupModelImpl}. 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. 287 * </p> 288 * 289 * @param dynamicQuery the dynamic query 290 * @param start the lower bound of the range of model instances 291 * @param end the upper bound of the range of model instances (not inclusive) 292 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 293 * @return the ordered range of matching rows 294 */ 295 public <T> java.util.List<T> dynamicQuery( 296 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 297 int end, 298 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 299 300 /** 301 * Returns the number of rows matching the dynamic query. 302 * 303 * @param dynamicQuery the dynamic query 304 * @return the number of rows matching the dynamic query 305 */ 306 public long dynamicQueryCount( 307 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 308 309 /** 310 * Returns the number of rows matching the dynamic query. 311 * 312 * @param dynamicQuery the dynamic query 313 * @param projection the projection to apply to the query 314 * @return the number of rows matching the dynamic query 315 */ 316 public long dynamicQueryCount( 317 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 318 com.liferay.portal.kernel.dao.orm.Projection projection); 319 320 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 321 public com.liferay.portal.model.UserGroup fetchUserGroup(long companyId, 322 java.lang.String name); 323 324 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 325 public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId); 326 327 /** 328 * Returns the user group with the matching UUID and company. 329 * 330 * @param uuid the user group's UUID 331 * @param companyId the primary key of the company 332 * @return the matching user group, or <code>null</code> if a matching user group could not be found 333 */ 334 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 335 public com.liferay.portal.model.UserGroup fetchUserGroupByUuidAndCompanyId( 336 java.lang.String uuid, long companyId); 337 338 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 339 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 340 341 /** 342 * Returns the Spring bean ID for this bean. 343 * 344 * @return the Spring bean ID for this bean 345 */ 346 public java.lang.String getBeanIdentifier(); 347 348 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 349 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 350 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 351 352 /** 353 * Returns the groupIds of the groups associated with the user group. 354 * 355 * @param userGroupId the userGroupId of the user group 356 * @return long[] the groupIds of groups associated with the user group 357 */ 358 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 359 public long[] getGroupPrimaryKeys(long userGroupId); 360 361 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 362 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 363 long groupId); 364 365 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 366 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 367 long groupId, int start, int end); 368 369 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 370 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups( 371 long groupId, int start, int end, 372 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator); 373 374 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 375 public int getGroupUserGroupsCount(long groupId); 376 377 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 378 public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserUserGroups( 379 long groupId, long userId) throws PortalException; 380 381 @Override 382 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 383 public com.liferay.portal.model.PersistedModel getPersistedModel( 384 java.io.Serializable primaryKeyObj) throws PortalException; 385 386 /** 387 * Returns the teamIds of the teams associated with the user group. 388 * 389 * @param userGroupId the userGroupId of the user group 390 * @return long[] the teamIds of teams associated with the user group 391 */ 392 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 393 public long[] getTeamPrimaryKeys(long userGroupId); 394 395 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 396 public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 397 long teamId); 398 399 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 400 public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 401 long teamId, int start, int end); 402 403 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 404 public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups( 405 long teamId, int start, int end, 406 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator); 407 408 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 409 public int getTeamUserGroupsCount(long teamId); 410 411 /** 412 * Returns the user group with the name. 413 * 414 * @param companyId the primary key of the user group's company 415 * @param name the user group's name 416 * @return Returns the user group with the name 417 * @throws PortalException if a user group with the name could not be found 418 */ 419 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 420 public com.liferay.portal.model.UserGroup getUserGroup(long companyId, 421 java.lang.String name) throws PortalException; 422 423 /** 424 * Returns the user group with the primary key. 425 * 426 * @param userGroupId the primary key of the user group 427 * @return the user group 428 * @throws PortalException if a user group with the primary key could not be found 429 */ 430 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 431 public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId) 432 throws PortalException; 433 434 /** 435 * Returns the user group with the matching UUID and company. 436 * 437 * @param uuid the user group's UUID 438 * @param companyId the primary key of the company 439 * @return the matching user group 440 * @throws PortalException if a matching user group could not be found 441 */ 442 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 443 public com.liferay.portal.model.UserGroup getUserGroupByUuidAndCompanyId( 444 java.lang.String uuid, long companyId) throws PortalException; 445 446 /** 447 * Returns all the user groups belonging to the company. 448 * 449 * @param companyId the primary key of the user groups' company 450 * @return the user groups belonging to the company 451 */ 452 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 453 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 454 long companyId); 455 456 /** 457 * Returns a range of all the user groups. 458 * 459 * <p> 460 * 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.UserGroupModelImpl}. 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. 461 * </p> 462 * 463 * @param start the lower bound of the range of user groups 464 * @param end the upper bound of the range of user groups (not inclusive) 465 * @return the range of user groups 466 */ 467 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 468 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 469 int start, int end); 470 471 /** 472 * Returns all the user groups with the primary keys. 473 * 474 * @param userGroupIds the primary keys of the user groups 475 * @return the user groups with the primary keys 476 * @throws PortalException if any one of the user groups could not be found 477 */ 478 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 479 public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 480 long[] userGroupIds) throws PortalException; 481 482 /** 483 * Returns the number of user groups. 484 * 485 * @return the number of user groups 486 */ 487 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 488 public int getUserGroupsCount(); 489 490 /** 491 * Returns the userIds of the users associated with the user group. 492 * 493 * @param userGroupId the userGroupId of the user group 494 * @return long[] the userIds of users associated with the user group 495 */ 496 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 497 public long[] getUserPrimaryKeys(long userGroupId); 498 499 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 500 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 501 long userId); 502 503 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 504 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 505 long userId, int start, int end); 506 507 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 508 public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups( 509 long userId, int start, int end, 510 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> orderByComparator); 511 512 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 513 public int getUserUserGroupsCount(long userId); 514 515 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 516 public boolean hasGroupUserGroup(long groupId, long userGroupId); 517 518 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 519 public boolean hasGroupUserGroups(long groupId); 520 521 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 522 public boolean hasTeamUserGroup(long teamId, long userGroupId); 523 524 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 525 public boolean hasTeamUserGroups(long teamId); 526 527 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 528 public boolean hasUserUserGroup(long userId, long userGroupId); 529 530 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 531 public boolean hasUserUserGroups(long userId); 532 533 /** 534 * Returns an ordered range of all the user groups that match the keywords. 535 * 536 * <p> 537 * Useful when paginating results. Returns a maximum of <code>end - 538 * start</code> instances. <code>start</code> and <code>end</code> are not 539 * primary keys, they are indexes in the result set. Thus, <code>0</code> 540 * refers to the first result in the set. Setting both <code>start</code> 541 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 542 * result set. 543 * </p> 544 * 545 * @param companyId the primary key of the user group's company 546 * @param keywords the keywords (space separated), which may occur in the 547 user group's name or description (optionally <code>null</code>) 548 * @param params the finder params (optionally <code>null</code>). For more 549 information see {@link 550 com.liferay.portal.service.persistence.UserGroupFinder} 551 * @param start the lower bound of the range of user groups to return 552 * @param end the upper bound of the range of user groups to return (not 553 inclusive) 554 * @param obc the comparator to order the user groups (optionally 555 <code>null</code>) 556 * @return the matching user groups ordered by comparator <code>obc</code> 557 * @see com.liferay.portal.service.persistence.UserGroupFinder 558 */ 559 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 560 public java.util.List<com.liferay.portal.model.UserGroup> search( 561 long companyId, java.lang.String keywords, 562 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 563 int start, int end, 564 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc); 565 566 /** 567 * Returns an ordered range of all the user groups that match the keywords, 568 * using the indexer. It is preferable to use this method instead of the 569 * non-indexed version whenever possible for performance reasons. 570 * 571 * <p> 572 * Useful when paginating results. Returns a maximum of <code>end - 573 * start</code> instances. <code>start</code> and <code>end</code> are not 574 * primary keys, they are indexes in the result set. Thus, <code>0</code> 575 * refers to the first result in the set. Setting both <code>start</code> 576 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 577 * result set. 578 * </p> 579 * 580 * @param companyId the primary key of the user group's company 581 * @param keywords the keywords (space separated), which may occur in the 582 user group's name or description (optionally <code>null</code>) 583 * @param params the finder params (optionally <code>null</code>). For more 584 information see {@link 585 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 586 * @param start the lower bound of the range of user groups to return 587 * @param end the upper bound of the range of user groups to return (not 588 inclusive) 589 * @param sort the field and direction by which to sort (optionally 590 <code>null</code>) 591 * @return the matching user groups ordered by sort 592 * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer 593 */ 594 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 595 public com.liferay.portal.kernel.search.Hits search(long companyId, 596 java.lang.String keywords, 597 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 598 int start, int end, com.liferay.portal.kernel.search.Sort sort); 599 600 /** 601 * Returns an ordered range of all the user groups that match the name and 602 * description. 603 * 604 * <p> 605 * Useful when paginating results. Returns a maximum of <code>end - 606 * start</code> instances. <code>start</code> and <code>end</code> are not 607 * primary keys, they are indexes in the result set. Thus, <code>0</code> 608 * refers to the first result in the set. Setting both <code>start</code> 609 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 610 * result set. 611 * </p> 612 * 613 * @param companyId the primary key of the user group's company 614 * @param name the user group's name (optionally <code>null</code>) 615 * @param description the user group's description (optionally 616 <code>null</code>) 617 * @param params the finder params (optionally <code>null</code>). For more 618 information see {@link 619 com.liferay.portal.service.persistence.UserGroupFinder} 620 * @param andOperator whether every field must match its keywords or just 621 one field 622 * @param start the lower bound of the range of user groups to return 623 * @param end the upper bound of the range of user groups to return (not 624 inclusive) 625 * @param obc the comparator to order the user groups (optionally 626 <code>null</code>) 627 * @return the matching user groups ordered by comparator <code>obc</code> 628 * @see com.liferay.portal.service.persistence.UserGroupFinder 629 */ 630 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 631 public java.util.List<com.liferay.portal.model.UserGroup> search( 632 long companyId, java.lang.String name, java.lang.String description, 633 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 634 boolean andOperator, int start, int end, 635 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc); 636 637 /** 638 * Returns an ordered range of all the user groups that match the name and 639 * description. It is preferable to use this method instead of the 640 * non-indexed version whenever possible for performance reasons. 641 * 642 * <p> 643 * Useful when paginating results. Returns a maximum of <code>end - 644 * start</code> instances. <code>start</code> and <code>end</code> are not 645 * primary keys, they are indexes in the result set. Thus, <code>0</code> 646 * refers to the first result in the set. Setting both <code>start</code> 647 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 648 * result set. 649 * </p> 650 * 651 * @param companyId the primary key of the user group's company 652 * @param name the user group's name (optionally <code>null</code>) 653 * @param description the user group's description (optionally 654 <code>null</code>) 655 * @param params the finder params (optionally <code>null</code>). For more 656 information see {@link 657 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 658 * @param andSearch whether every field must match its keywords or just one 659 field 660 * @param start the lower bound of the range of user groups to return 661 * @param end the upper bound of the range of user groups to return (not 662 inclusive) 663 * @param sort the field and direction by which to sort (optionally 664 <code>null</code>) 665 * @return the matching user groups ordered by sort 666 * @see com.liferay.portal.service.persistence.UserGroupFinder 667 */ 668 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 669 public com.liferay.portal.kernel.search.Hits search(long companyId, 670 java.lang.String name, java.lang.String description, 671 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 672 boolean andSearch, int start, int end, 673 com.liferay.portal.kernel.search.Sort sort); 674 675 /** 676 * Returns the number of user groups that match the keywords 677 * 678 * @param companyId the primary key of the user group's company 679 * @param keywords the keywords (space separated), which may occur in the 680 user group's name or description (optionally <code>null</code>) 681 * @param params the finder params (optionally <code>null</code>). For more 682 information see {@link 683 com.liferay.portal.service.persistence.UserGroupFinder} 684 * @return the number of matching user groups 685 * @see com.liferay.portal.service.persistence.UserGroupFinder 686 */ 687 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 688 public int searchCount(long companyId, java.lang.String keywords, 689 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params); 690 691 /** 692 * Returns the number of user groups that match the name and description. 693 * 694 * @param companyId the primary key of the user group's company 695 * @param name the user group's name (optionally <code>null</code>) 696 * @param description the user group's description (optionally 697 <code>null</code>) 698 * @param params the finder params (optionally <code>null</code>). For more 699 information see {@link 700 com.liferay.portal.service.persistence.UserGroupFinder} 701 * @param andOperator whether every field must match its keywords or just 702 one field 703 * @return the number of matching user groups 704 * @see com.liferay.portal.service.persistence.UserGroupFinder 705 */ 706 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 707 public int searchCount(long companyId, java.lang.String name, 708 java.lang.String description, 709 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 710 boolean andOperator); 711 712 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 713 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.UserGroup> searchUserGroups( 714 long companyId, java.lang.String keywords, 715 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 716 int start, int end, com.liferay.portal.kernel.search.Sort sort) 717 throws PortalException; 718 719 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 720 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.UserGroup> searchUserGroups( 721 long companyId, java.lang.String name, java.lang.String description, 722 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 723 boolean andSearch, int start, int end, 724 com.liferay.portal.kernel.search.Sort sort) throws PortalException; 725 726 /** 727 * Sets the Spring bean ID for this bean. 728 * 729 * @param beanIdentifier the Spring bean ID for this bean 730 */ 731 public void setBeanIdentifier(java.lang.String beanIdentifier); 732 733 public void setGroupUserGroups(long groupId, long[] userGroupIds); 734 735 public void setTeamUserGroups(long teamId, long[] userGroupIds); 736 737 /** 738 * @throws PortalException 739 */ 740 public void setUserUserGroups(long userId, long[] userGroupIds) 741 throws PortalException; 742 743 /** 744 * Removes the user groups from the group. 745 * 746 * @param groupId the primary key of the group 747 * @param userGroupIds the primary keys of the user groups 748 */ 749 public void unsetGroupUserGroups(long groupId, long[] userGroupIds); 750 751 /** 752 * Removes the user groups from the team. 753 * 754 * @param teamId the primary key of the team 755 * @param userGroupIds the primary keys of the user groups 756 */ 757 public void unsetTeamUserGroups(long teamId, long[] userGroupIds); 758 759 /** 760 * Updates the user group. 761 * 762 * @param companyId the primary key of the user group's company 763 * @param userGroupId the primary key of the user group 764 * @param name the user group's name 765 * @param description the user group's description 766 * @return the user group 767 * @throws PortalException if a user group with the primary key could 768 not be found or if the new information was invalid 769 * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, long, 770 String, String, ServiceContext)} 771 */ 772 @java.lang.Deprecated 773 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 774 long userGroupId, java.lang.String name, java.lang.String description) 775 throws PortalException; 776 777 /** 778 * Updates the user group. 779 * 780 * @param companyId the primary key of the user group's company 781 * @param userGroupId the primary key of the user group 782 * @param name the user group's name 783 * @param description the user group's description 784 * @param serviceContext the service context to be applied (optionally 785 <code>null</code>). Can set expando bridge attributes for the 786 user group. 787 * @return the user group 788 * @throws PortalException if a user group with the primary key could not be 789 found or if the new information was invalid 790 */ 791 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 792 long userGroupId, java.lang.String name, java.lang.String description, 793 com.liferay.portal.service.ServiceContext serviceContext) 794 throws PortalException; 795 796 /** 797 * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 798 * 799 * @param userGroup the user group 800 * @return the user group that was updated 801 */ 802 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 803 public com.liferay.portal.model.UserGroup updateUserGroup( 804 com.liferay.portal.model.UserGroup userGroup); 805 }