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 542 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 543 * result set. 544 * </p> 545 * 546 * @param companyId the primary key of the user group's company 547 * @param keywords the keywords (space separated), which may occur in the 548 user group's name or description (optionally <code>null</code>) 549 * @param params the finder params (optionally <code>null</code>). For more 550 information see {@link 551 com.liferay.portal.service.persistence.UserGroupFinder} 552 * @param start the lower bound of the range of user groups to return 553 * @param end the upper bound of the range of user groups to return (not 554 inclusive) 555 * @param obc the comparator to order the user groups (optionally 556 <code>null</code>) 557 * @return the matching user groups ordered by comparator <code>obc</code> 558 * @see com.liferay.portal.service.persistence.UserGroupFinder 559 */ 560 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 561 public java.util.List<com.liferay.portal.model.UserGroup> search( 562 long companyId, java.lang.String keywords, 563 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 564 int start, int end, 565 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc); 566 567 /** 568 * Returns an ordered range of all the user groups that match the keywords, 569 * using the indexer. It is preferable to use this method instead of the 570 * non-indexed version whenever possible for performance reasons. 571 * 572 * <p> 573 * Useful when paginating results. Returns a maximum of <code>end - 574 * start</code> instances. <code>start</code> and <code>end</code> are not 575 * primary keys, they are indexes in the result set. Thus, <code>0</code> 576 * refers to the first result in the set. Setting both <code>start</code> 577 * and <code>end</code> to {@link 578 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 579 * result set. 580 * </p> 581 * 582 * @param companyId the primary key of the user group's company 583 * @param keywords the keywords (space separated), which may occur in the 584 user group's name or description (optionally <code>null</code>) 585 * @param params the finder params (optionally <code>null</code>). For more 586 information see {@link 587 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 588 * @param start the lower bound of the range of user groups to return 589 * @param end the upper bound of the range of user groups to return (not 590 inclusive) 591 * @param sort the field and direction by which to sort (optionally 592 <code>null</code>) 593 * @return the matching user groups ordered by sort 594 * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer 595 */ 596 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 597 public com.liferay.portal.kernel.search.Hits search(long companyId, 598 java.lang.String keywords, 599 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 600 int start, int end, com.liferay.portal.kernel.search.Sort sort); 601 602 /** 603 * Returns an ordered range of all the user groups that match the name and 604 * description. 605 * 606 * <p> 607 * Useful when paginating results. Returns a maximum of <code>end - 608 * start</code> instances. <code>start</code> and <code>end</code> are not 609 * primary keys, they are indexes in the result set. Thus, <code>0</code> 610 * refers to the first result in the set. Setting both <code>start</code> 611 * and <code>end</code> to {@link 612 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 613 * result set. 614 * </p> 615 * 616 * @param companyId the primary key of the user group's company 617 * @param name the user group's name (optionally <code>null</code>) 618 * @param description the user group's description (optionally 619 <code>null</code>) 620 * @param params the finder params (optionally <code>null</code>). For more 621 information see {@link 622 com.liferay.portal.service.persistence.UserGroupFinder} 623 * @param andOperator whether every field must match its keywords or just 624 one field 625 * @param start the lower bound of the range of user groups to return 626 * @param end the upper bound of the range of user groups to return (not 627 inclusive) 628 * @param obc the comparator to order the user groups (optionally 629 <code>null</code>) 630 * @return the matching user groups ordered by comparator <code>obc</code> 631 * @see com.liferay.portal.service.persistence.UserGroupFinder 632 */ 633 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 634 public java.util.List<com.liferay.portal.model.UserGroup> search( 635 long companyId, java.lang.String name, java.lang.String description, 636 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 637 boolean andOperator, int start, int end, 638 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.UserGroup> obc); 639 640 /** 641 * Returns an ordered range of all the user groups that match the name and 642 * description. It is preferable to use this method instead of the 643 * non-indexed version whenever possible for performance reasons. 644 * 645 * <p> 646 * Useful when paginating results. Returns a maximum of <code>end - 647 * start</code> instances. <code>start</code> and <code>end</code> are not 648 * primary keys, they are indexes in the result set. Thus, <code>0</code> 649 * refers to the first result in the set. Setting both <code>start</code> 650 * and <code>end</code> to {@link 651 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 652 * result set. 653 * </p> 654 * 655 * @param companyId the primary key of the user group's company 656 * @param name the user group's name (optionally <code>null</code>) 657 * @param description the user group's description (optionally 658 <code>null</code>) 659 * @param params the finder params (optionally <code>null</code>). For more 660 information see {@link 661 com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer} 662 * @param andSearch whether every field must match its keywords or just one 663 field 664 * @param start the lower bound of the range of user groups to return 665 * @param end the upper bound of the range of user groups to return (not 666 inclusive) 667 * @param sort the field and direction by which to sort (optionally 668 <code>null</code>) 669 * @return the matching user groups ordered by sort 670 * @see com.liferay.portal.service.persistence.UserGroupFinder 671 */ 672 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 673 public com.liferay.portal.kernel.search.Hits search(long companyId, 674 java.lang.String name, java.lang.String description, 675 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 676 boolean andSearch, int start, int end, 677 com.liferay.portal.kernel.search.Sort sort); 678 679 /** 680 * Returns the number of user groups that match the keywords 681 * 682 * @param companyId the primary key of the user group's company 683 * @param keywords the keywords (space separated), which may occur in the 684 user group's name or description (optionally <code>null</code>) 685 * @param params the finder params (optionally <code>null</code>). For more 686 information see {@link 687 com.liferay.portal.service.persistence.UserGroupFinder} 688 * @return the number of matching user groups 689 * @see com.liferay.portal.service.persistence.UserGroupFinder 690 */ 691 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 692 public int searchCount(long companyId, java.lang.String keywords, 693 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params); 694 695 /** 696 * Returns the number of user groups that match the name and description. 697 * 698 * @param companyId the primary key of the user group's company 699 * @param name the user group's name (optionally <code>null</code>) 700 * @param description the user group's description (optionally 701 <code>null</code>) 702 * @param params the finder params (optionally <code>null</code>). For more 703 information see {@link 704 com.liferay.portal.service.persistence.UserGroupFinder} 705 * @param andOperator whether every field must match its keywords or just 706 one field 707 * @return the number of matching user groups 708 * @see com.liferay.portal.service.persistence.UserGroupFinder 709 */ 710 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 711 public int searchCount(long companyId, java.lang.String name, 712 java.lang.String description, 713 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 714 boolean andOperator); 715 716 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 717 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.UserGroup> searchUserGroups( 718 long companyId, java.lang.String keywords, 719 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 720 int start, int end, com.liferay.portal.kernel.search.Sort sort) 721 throws PortalException; 722 723 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 724 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.UserGroup> searchUserGroups( 725 long companyId, java.lang.String name, java.lang.String description, 726 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 727 boolean andSearch, int start, int end, 728 com.liferay.portal.kernel.search.Sort sort) throws PortalException; 729 730 /** 731 * Sets the Spring bean ID for this bean. 732 * 733 * @param beanIdentifier the Spring bean ID for this bean 734 */ 735 public void setBeanIdentifier(java.lang.String beanIdentifier); 736 737 public void setGroupUserGroups(long groupId, long[] userGroupIds); 738 739 public void setTeamUserGroups(long teamId, long[] userGroupIds); 740 741 /** 742 * @throws PortalException 743 */ 744 public void setUserUserGroups(long userId, long[] userGroupIds) 745 throws PortalException; 746 747 /** 748 * Removes the user groups from the group. 749 * 750 * @param groupId the primary key of the group 751 * @param userGroupIds the primary keys of the user groups 752 */ 753 public void unsetGroupUserGroups(long groupId, long[] userGroupIds); 754 755 /** 756 * Removes the user groups from the team. 757 * 758 * @param teamId the primary key of the team 759 * @param userGroupIds the primary keys of the user groups 760 */ 761 public void unsetTeamUserGroups(long teamId, long[] userGroupIds); 762 763 /** 764 * Updates the user group. 765 * 766 * @param companyId the primary key of the user group's company 767 * @param userGroupId the primary key of the user group 768 * @param name the user group's name 769 * @param description the user group's description 770 * @return the user group 771 * @throws PortalException if a user group with the primary key could 772 not be found or if the new information was invalid 773 * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, long, 774 String, String, ServiceContext)} 775 */ 776 @java.lang.Deprecated 777 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 778 long userGroupId, java.lang.String name, java.lang.String description) 779 throws PortalException; 780 781 /** 782 * Updates the user group. 783 * 784 * @param companyId the primary key of the user group's company 785 * @param userGroupId the primary key of the user group 786 * @param name the user group's name 787 * @param description the user group's description 788 * @param serviceContext the service context to be applied (optionally 789 <code>null</code>). Can set expando bridge attributes for the 790 user group. 791 * @return the user group 792 * @throws PortalException if a user group with the primary key could not be 793 found or if the new information was invalid 794 */ 795 public com.liferay.portal.model.UserGroup updateUserGroup(long companyId, 796 long userGroupId, java.lang.String name, java.lang.String description, 797 com.liferay.portal.service.ServiceContext serviceContext) 798 throws PortalException; 799 800 /** 801 * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 802 * 803 * @param userGroup the user group 804 * @return the user group that was updated 805 */ 806 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 807 public com.liferay.portal.model.UserGroup updateUserGroup( 808 com.liferay.portal.model.UserGroup userGroup); 809 }