001 /** 002 * Copyright (c) 2000-2011 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.persistence; 016 017 import com.liferay.portal.model.UserGroup; 018 019 /** 020 * The persistence interface for the user group service. 021 * 022 * <p> 023 * Never modify or reference this interface directly. Always use {@link UserGroupUtil} to access the user group persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 024 * </p> 025 * 026 * <p> 027 * Caching information and settings can be found in <code>portal.properties</code> 028 * </p> 029 * 030 * @author Brian Wing Shun Chan 031 * @see UserGroupPersistenceImpl 032 * @see UserGroupUtil 033 * @generated 034 */ 035 public interface UserGroupPersistence extends BasePersistence<UserGroup> { 036 /** 037 * Caches the user group in the entity cache if it is enabled. 038 * 039 * @param userGroup the user group to cache 040 */ 041 public void cacheResult(com.liferay.portal.model.UserGroup userGroup); 042 043 /** 044 * Caches the user groups in the entity cache if it is enabled. 045 * 046 * @param userGroups the user groups to cache 047 */ 048 public void cacheResult( 049 java.util.List<com.liferay.portal.model.UserGroup> userGroups); 050 051 /** 052 * Creates a new user group with the primary key. Does not add the user group to the database. 053 * 054 * @param userGroupId the primary key for the new user group 055 * @return the new user group 056 */ 057 public com.liferay.portal.model.UserGroup create(long userGroupId); 058 059 /** 060 * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners. 061 * 062 * @param userGroupId the primary key of the user group to remove 063 * @return the user group that was removed 064 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 065 * @throws SystemException if a system exception occurred 066 */ 067 public com.liferay.portal.model.UserGroup remove(long userGroupId) 068 throws com.liferay.portal.NoSuchUserGroupException, 069 com.liferay.portal.kernel.exception.SystemException; 070 071 public com.liferay.portal.model.UserGroup updateImpl( 072 com.liferay.portal.model.UserGroup userGroup, boolean merge) 073 throws com.liferay.portal.kernel.exception.SystemException; 074 075 /** 076 * Finds the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 077 * 078 * @param userGroupId the primary key of the user group to find 079 * @return the user group 080 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 081 * @throws SystemException if a system exception occurred 082 */ 083 public com.liferay.portal.model.UserGroup findByPrimaryKey(long userGroupId) 084 throws com.liferay.portal.NoSuchUserGroupException, 085 com.liferay.portal.kernel.exception.SystemException; 086 087 /** 088 * Finds the user group with the primary key or returns <code>null</code> if it could not be found. 089 * 090 * @param userGroupId the primary key of the user group to find 091 * @return the user group, or <code>null</code> if a user group with the primary key could not be found 092 * @throws SystemException if a system exception occurred 093 */ 094 public com.liferay.portal.model.UserGroup fetchByPrimaryKey( 095 long userGroupId) 096 throws com.liferay.portal.kernel.exception.SystemException; 097 098 /** 099 * Finds all the user groups where companyId = ?. 100 * 101 * @param companyId the company id to search with 102 * @return the matching user groups 103 * @throws SystemException if a system exception occurred 104 */ 105 public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 106 long companyId) 107 throws com.liferay.portal.kernel.exception.SystemException; 108 109 /** 110 * Finds a range of all the user groups where companyId = ?. 111 * 112 * <p> 113 * 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. 114 * </p> 115 * 116 * @param companyId the company id to search with 117 * @param start the lower bound of the range of user groups to return 118 * @param end the upper bound of the range of user groups to return (not inclusive) 119 * @return the range of matching user groups 120 * @throws SystemException if a system exception occurred 121 */ 122 public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 123 long companyId, int start, int end) 124 throws com.liferay.portal.kernel.exception.SystemException; 125 126 /** 127 * Finds an ordered range of all the user groups where companyId = ?. 128 * 129 * <p> 130 * 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. 131 * </p> 132 * 133 * @param companyId the company id to search with 134 * @param start the lower bound of the range of user groups to return 135 * @param end the upper bound of the range of user groups to return (not inclusive) 136 * @param orderByComparator the comparator to order the results by 137 * @return the ordered range of matching user groups 138 * @throws SystemException if a system exception occurred 139 */ 140 public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 141 long companyId, int start, int end, 142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 143 throws com.liferay.portal.kernel.exception.SystemException; 144 145 /** 146 * Finds the first user group in the ordered set where companyId = ?. 147 * 148 * <p> 149 * 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. 150 * </p> 151 * 152 * @param companyId the company id to search with 153 * @param orderByComparator the comparator to order the set by 154 * @return the first matching user group 155 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 156 * @throws SystemException if a system exception occurred 157 */ 158 public com.liferay.portal.model.UserGroup findByCompanyId_First( 159 long companyId, 160 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 161 throws com.liferay.portal.NoSuchUserGroupException, 162 com.liferay.portal.kernel.exception.SystemException; 163 164 /** 165 * Finds the last user group in the ordered set where companyId = ?. 166 * 167 * <p> 168 * 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. 169 * </p> 170 * 171 * @param companyId the company id to search with 172 * @param orderByComparator the comparator to order the set by 173 * @return the last matching user group 174 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 175 * @throws SystemException if a system exception occurred 176 */ 177 public com.liferay.portal.model.UserGroup findByCompanyId_Last( 178 long companyId, 179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 180 throws com.liferay.portal.NoSuchUserGroupException, 181 com.liferay.portal.kernel.exception.SystemException; 182 183 /** 184 * Finds the user groups before and after the current user group in the ordered set where companyId = ?. 185 * 186 * <p> 187 * 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. 188 * </p> 189 * 190 * @param userGroupId the primary key of the current user group 191 * @param companyId the company id to search with 192 * @param orderByComparator the comparator to order the set by 193 * @return the previous, current, and next user group 194 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 195 * @throws SystemException if a system exception occurred 196 */ 197 public com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext( 198 long userGroupId, long companyId, 199 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 200 throws com.liferay.portal.NoSuchUserGroupException, 201 com.liferay.portal.kernel.exception.SystemException; 202 203 /** 204 * Filters by the user's permissions and finds all the user groups where companyId = ?. 205 * 206 * @param companyId the company id to search with 207 * @return the matching user groups that the user has permission to view 208 * @throws SystemException if a system exception occurred 209 */ 210 public java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 211 long companyId) 212 throws com.liferay.portal.kernel.exception.SystemException; 213 214 /** 215 * Filters by the user's permissions and finds a range of all the user groups where companyId = ?. 216 * 217 * <p> 218 * 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. 219 * </p> 220 * 221 * @param companyId the company id to search with 222 * @param start the lower bound of the range of user groups to return 223 * @param end the upper bound of the range of user groups to return (not inclusive) 224 * @return the range of matching user groups that the user has permission to view 225 * @throws SystemException if a system exception occurred 226 */ 227 public java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 228 long companyId, int start, int end) 229 throws com.liferay.portal.kernel.exception.SystemException; 230 231 /** 232 * Filters by the user's permissions and finds an ordered range of all the user groups where companyId = ?. 233 * 234 * <p> 235 * 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. 236 * </p> 237 * 238 * @param companyId the company id to search with 239 * @param start the lower bound of the range of user groups to return 240 * @param end the upper bound of the range of user groups to return (not inclusive) 241 * @param orderByComparator the comparator to order the results by 242 * @return the ordered range of matching user groups that the user has permission to view 243 * @throws SystemException if a system exception occurred 244 */ 245 public java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 246 long companyId, int start, int end, 247 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Finds all the user groups where companyId = ? and parentUserGroupId = ?. 252 * 253 * @param companyId the company id to search with 254 * @param parentUserGroupId the parent user group id to search with 255 * @return the matching user groups 256 * @throws SystemException if a system exception occurred 257 */ 258 public java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 259 long companyId, long parentUserGroupId) 260 throws com.liferay.portal.kernel.exception.SystemException; 261 262 /** 263 * Finds a range of all the user groups where companyId = ? and parentUserGroupId = ?. 264 * 265 * <p> 266 * 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. 267 * </p> 268 * 269 * @param companyId the company id to search with 270 * @param parentUserGroupId the parent user group id to search with 271 * @param start the lower bound of the range of user groups to return 272 * @param end the upper bound of the range of user groups to return (not inclusive) 273 * @return the range of matching user groups 274 * @throws SystemException if a system exception occurred 275 */ 276 public java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 277 long companyId, long parentUserGroupId, int start, int end) 278 throws com.liferay.portal.kernel.exception.SystemException; 279 280 /** 281 * Finds an ordered range of all the user groups where companyId = ? and parentUserGroupId = ?. 282 * 283 * <p> 284 * 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. 285 * </p> 286 * 287 * @param companyId the company id to search with 288 * @param parentUserGroupId the parent user group id to search with 289 * @param start the lower bound of the range of user groups to return 290 * @param end the upper bound of the range of user groups to return (not inclusive) 291 * @param orderByComparator the comparator to order the results by 292 * @return the ordered range of matching user groups 293 * @throws SystemException if a system exception occurred 294 */ 295 public java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 296 long companyId, long parentUserGroupId, int start, int end, 297 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 298 throws com.liferay.portal.kernel.exception.SystemException; 299 300 /** 301 * Finds the first user group in the ordered set where companyId = ? and parentUserGroupId = ?. 302 * 303 * <p> 304 * 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. 305 * </p> 306 * 307 * @param companyId the company id to search with 308 * @param parentUserGroupId the parent user group id to search with 309 * @param orderByComparator the comparator to order the set by 310 * @return the first matching user group 311 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 312 * @throws SystemException if a system exception occurred 313 */ 314 public com.liferay.portal.model.UserGroup findByC_P_First(long companyId, 315 long parentUserGroupId, 316 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 317 throws com.liferay.portal.NoSuchUserGroupException, 318 com.liferay.portal.kernel.exception.SystemException; 319 320 /** 321 * Finds the last user group in the ordered set where companyId = ? and parentUserGroupId = ?. 322 * 323 * <p> 324 * 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. 325 * </p> 326 * 327 * @param companyId the company id to search with 328 * @param parentUserGroupId the parent user group id to search with 329 * @param orderByComparator the comparator to order the set by 330 * @return the last matching user group 331 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 332 * @throws SystemException if a system exception occurred 333 */ 334 public com.liferay.portal.model.UserGroup findByC_P_Last(long companyId, 335 long parentUserGroupId, 336 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 337 throws com.liferay.portal.NoSuchUserGroupException, 338 com.liferay.portal.kernel.exception.SystemException; 339 340 /** 341 * Finds the user groups before and after the current user group in the ordered set where companyId = ? and parentUserGroupId = ?. 342 * 343 * <p> 344 * 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. 345 * </p> 346 * 347 * @param userGroupId the primary key of the current user group 348 * @param companyId the company id to search with 349 * @param parentUserGroupId the parent user group id to search with 350 * @param orderByComparator the comparator to order the set by 351 * @return the previous, current, and next user group 352 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 353 * @throws SystemException if a system exception occurred 354 */ 355 public com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext( 356 long userGroupId, long companyId, long parentUserGroupId, 357 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 358 throws com.liferay.portal.NoSuchUserGroupException, 359 com.liferay.portal.kernel.exception.SystemException; 360 361 /** 362 * Filters by the user's permissions and finds all the user groups where companyId = ? and parentUserGroupId = ?. 363 * 364 * @param companyId the company id to search with 365 * @param parentUserGroupId the parent user group id to search with 366 * @return the matching user groups that the user has permission to view 367 * @throws SystemException if a system exception occurred 368 */ 369 public java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 370 long companyId, long parentUserGroupId) 371 throws com.liferay.portal.kernel.exception.SystemException; 372 373 /** 374 * Filters by the user's permissions and finds a range of all the user groups where companyId = ? and parentUserGroupId = ?. 375 * 376 * <p> 377 * 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. 378 * </p> 379 * 380 * @param companyId the company id to search with 381 * @param parentUserGroupId the parent user group id to search with 382 * @param start the lower bound of the range of user groups to return 383 * @param end the upper bound of the range of user groups to return (not inclusive) 384 * @return the range of matching user groups that the user has permission to view 385 * @throws SystemException if a system exception occurred 386 */ 387 public java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 388 long companyId, long parentUserGroupId, int start, int end) 389 throws com.liferay.portal.kernel.exception.SystemException; 390 391 /** 392 * Filters by the user's permissions and finds an ordered range of all the user groups where companyId = ? and parentUserGroupId = ?. 393 * 394 * <p> 395 * 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. 396 * </p> 397 * 398 * @param companyId the company id to search with 399 * @param parentUserGroupId the parent user group id to search with 400 * @param start the lower bound of the range of user groups to return 401 * @param end the upper bound of the range of user groups to return (not inclusive) 402 * @param orderByComparator the comparator to order the results by 403 * @return the ordered range of matching user groups that the user has permission to view 404 * @throws SystemException if a system exception occurred 405 */ 406 public java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 407 long companyId, long parentUserGroupId, int start, int end, 408 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 409 throws com.liferay.portal.kernel.exception.SystemException; 410 411 /** 412 * Finds the user group where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 413 * 414 * @param companyId the company id to search with 415 * @param name the name to search with 416 * @return the matching user group 417 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public com.liferay.portal.model.UserGroup findByC_N(long companyId, 421 java.lang.String name) 422 throws com.liferay.portal.NoSuchUserGroupException, 423 com.liferay.portal.kernel.exception.SystemException; 424 425 /** 426 * Finds the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 427 * 428 * @param companyId the company id to search with 429 * @param name the name to search with 430 * @return the matching user group, or <code>null</code> if a matching user group could not be found 431 * @throws SystemException if a system exception occurred 432 */ 433 public com.liferay.portal.model.UserGroup fetchByC_N(long companyId, 434 java.lang.String name) 435 throws com.liferay.portal.kernel.exception.SystemException; 436 437 /** 438 * Finds the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 439 * 440 * @param companyId the company id to search with 441 * @param name the name to search with 442 * @return the matching user group, or <code>null</code> if a matching user group could not be found 443 * @throws SystemException if a system exception occurred 444 */ 445 public com.liferay.portal.model.UserGroup fetchByC_N(long companyId, 446 java.lang.String name, boolean retrieveFromCache) 447 throws com.liferay.portal.kernel.exception.SystemException; 448 449 /** 450 * Finds all the user groups. 451 * 452 * @return the user groups 453 * @throws SystemException if a system exception occurred 454 */ 455 public java.util.List<com.liferay.portal.model.UserGroup> findAll() 456 throws com.liferay.portal.kernel.exception.SystemException; 457 458 /** 459 * Finds a range of all the user groups. 460 * 461 * <p> 462 * 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. 463 * </p> 464 * 465 * @param start the lower bound of the range of user groups to return 466 * @param end the upper bound of the range of user groups to return (not inclusive) 467 * @return the range of user groups 468 * @throws SystemException if a system exception occurred 469 */ 470 public java.util.List<com.liferay.portal.model.UserGroup> findAll( 471 int start, int end) 472 throws com.liferay.portal.kernel.exception.SystemException; 473 474 /** 475 * Finds an ordered range of all the user groups. 476 * 477 * <p> 478 * 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. 479 * </p> 480 * 481 * @param start the lower bound of the range of user groups to return 482 * @param end the upper bound of the range of user groups to return (not inclusive) 483 * @param orderByComparator the comparator to order the results by 484 * @return the ordered range of user groups 485 * @throws SystemException if a system exception occurred 486 */ 487 public java.util.List<com.liferay.portal.model.UserGroup> findAll( 488 int start, int end, 489 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 490 throws com.liferay.portal.kernel.exception.SystemException; 491 492 /** 493 * Removes all the user groups where companyId = ? from the database. 494 * 495 * @param companyId the company id to search with 496 * @throws SystemException if a system exception occurred 497 */ 498 public void removeByCompanyId(long companyId) 499 throws com.liferay.portal.kernel.exception.SystemException; 500 501 /** 502 * Removes all the user groups where companyId = ? and parentUserGroupId = ? from the database. 503 * 504 * @param companyId the company id to search with 505 * @param parentUserGroupId the parent user group id to search with 506 * @throws SystemException if a system exception occurred 507 */ 508 public void removeByC_P(long companyId, long parentUserGroupId) 509 throws com.liferay.portal.kernel.exception.SystemException; 510 511 /** 512 * Removes the user group where companyId = ? and name = ? from the database. 513 * 514 * @param companyId the company id to search with 515 * @param name the name to search with 516 * @throws SystemException if a system exception occurred 517 */ 518 public void removeByC_N(long companyId, java.lang.String name) 519 throws com.liferay.portal.NoSuchUserGroupException, 520 com.liferay.portal.kernel.exception.SystemException; 521 522 /** 523 * Removes all the user groups from the database. 524 * 525 * @throws SystemException if a system exception occurred 526 */ 527 public void removeAll() 528 throws com.liferay.portal.kernel.exception.SystemException; 529 530 /** 531 * Counts all the user groups where companyId = ?. 532 * 533 * @param companyId the company id to search with 534 * @return the number of matching user groups 535 * @throws SystemException if a system exception occurred 536 */ 537 public int countByCompanyId(long companyId) 538 throws com.liferay.portal.kernel.exception.SystemException; 539 540 /** 541 * Filters by the user's permissions and counts all the user groups where companyId = ?. 542 * 543 * @param companyId the company id to search with 544 * @return the number of matching user groups that the user has permission to view 545 * @throws SystemException if a system exception occurred 546 */ 547 public int filterCountByCompanyId(long companyId) 548 throws com.liferay.portal.kernel.exception.SystemException; 549 550 /** 551 * Counts all the user groups where companyId = ? and parentUserGroupId = ?. 552 * 553 * @param companyId the company id to search with 554 * @param parentUserGroupId the parent user group id to search with 555 * @return the number of matching user groups 556 * @throws SystemException if a system exception occurred 557 */ 558 public int countByC_P(long companyId, long parentUserGroupId) 559 throws com.liferay.portal.kernel.exception.SystemException; 560 561 /** 562 * Filters by the user's permissions and counts all the user groups where companyId = ? and parentUserGroupId = ?. 563 * 564 * @param companyId the company id to search with 565 * @param parentUserGroupId the parent user group id to search with 566 * @return the number of matching user groups that the user has permission to view 567 * @throws SystemException if a system exception occurred 568 */ 569 public int filterCountByC_P(long companyId, long parentUserGroupId) 570 throws com.liferay.portal.kernel.exception.SystemException; 571 572 /** 573 * Counts all the user groups where companyId = ? and name = ?. 574 * 575 * @param companyId the company id to search with 576 * @param name the name to search with 577 * @return the number of matching user groups 578 * @throws SystemException if a system exception occurred 579 */ 580 public int countByC_N(long companyId, java.lang.String name) 581 throws com.liferay.portal.kernel.exception.SystemException; 582 583 /** 584 * Counts all the user groups. 585 * 586 * @return the number of user groups 587 * @throws SystemException if a system exception occurred 588 */ 589 public int countAll() 590 throws com.liferay.portal.kernel.exception.SystemException; 591 592 /** 593 * Gets all the groups associated with the user group. 594 * 595 * @param pk the primary key of the user group to get the associated groups for 596 * @return the groups associated with the user group 597 * @throws SystemException if a system exception occurred 598 */ 599 public java.util.List<com.liferay.portal.model.Group> getGroups(long pk) 600 throws com.liferay.portal.kernel.exception.SystemException; 601 602 /** 603 * Gets a range of all the groups associated with the user group. 604 * 605 * <p> 606 * 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. 607 * </p> 608 * 609 * @param pk the primary key of the user group to get the associated groups for 610 * @param start the lower bound of the range of user groups to return 611 * @param end the upper bound of the range of user groups to return (not inclusive) 612 * @return the range of groups associated with the user group 613 * @throws SystemException if a system exception occurred 614 */ 615 public java.util.List<com.liferay.portal.model.Group> getGroups(long pk, 616 int start, int end) 617 throws com.liferay.portal.kernel.exception.SystemException; 618 619 /** 620 * Gets an ordered range of all the groups associated with the user group. 621 * 622 * <p> 623 * 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. 624 * </p> 625 * 626 * @param pk the primary key of the user group to get the associated groups for 627 * @param start the lower bound of the range of user groups to return 628 * @param end the upper bound of the range of user groups to return (not inclusive) 629 * @param orderByComparator the comparator to order the results by 630 * @return the ordered range of groups associated with the user group 631 * @throws SystemException if a system exception occurred 632 */ 633 public java.util.List<com.liferay.portal.model.Group> getGroups(long pk, 634 int start, int end, 635 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 636 throws com.liferay.portal.kernel.exception.SystemException; 637 638 /** 639 * Gets the number of groups associated with the user group. 640 * 641 * @param pk the primary key of the user group to get the number of associated groups for 642 * @return the number of groups associated with the user group 643 * @throws SystemException if a system exception occurred 644 */ 645 public int getGroupsSize(long pk) 646 throws com.liferay.portal.kernel.exception.SystemException; 647 648 /** 649 * Determines if the group is associated with the user group. 650 * 651 * @param pk the primary key of the user group 652 * @param groupPK the primary key of the group 653 * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise 654 * @throws SystemException if a system exception occurred 655 */ 656 public boolean containsGroup(long pk, long groupPK) 657 throws com.liferay.portal.kernel.exception.SystemException; 658 659 /** 660 * Determines if the user group has any groups associated with it. 661 * 662 * @param pk the primary key of the user group to check for associations with groups 663 * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise 664 * @throws SystemException if a system exception occurred 665 */ 666 public boolean containsGroups(long pk) 667 throws com.liferay.portal.kernel.exception.SystemException; 668 669 /** 670 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 671 * 672 * @param pk the primary key of the user group 673 * @param groupPK the primary key of the group 674 * @throws SystemException if a system exception occurred 675 */ 676 public void addGroup(long pk, long groupPK) 677 throws com.liferay.portal.kernel.exception.SystemException; 678 679 /** 680 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 681 * 682 * @param pk the primary key of the user group 683 * @param group the group 684 * @throws SystemException if a system exception occurred 685 */ 686 public void addGroup(long pk, com.liferay.portal.model.Group group) 687 throws com.liferay.portal.kernel.exception.SystemException; 688 689 /** 690 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 691 * 692 * @param pk the primary key of the user group 693 * @param groupPKs the primary keys of the groups 694 * @throws SystemException if a system exception occurred 695 */ 696 public void addGroups(long pk, long[] groupPKs) 697 throws com.liferay.portal.kernel.exception.SystemException; 698 699 /** 700 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 701 * 702 * @param pk the primary key of the user group 703 * @param groups the groups 704 * @throws SystemException if a system exception occurred 705 */ 706 public void addGroups(long pk, 707 java.util.List<com.liferay.portal.model.Group> groups) 708 throws com.liferay.portal.kernel.exception.SystemException; 709 710 /** 711 * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 712 * 713 * @param pk the primary key of the user group to clear the associated groups from 714 * @throws SystemException if a system exception occurred 715 */ 716 public void clearGroups(long pk) 717 throws com.liferay.portal.kernel.exception.SystemException; 718 719 /** 720 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 721 * 722 * @param pk the primary key of the user group 723 * @param groupPK the primary key of the group 724 * @throws SystemException if a system exception occurred 725 */ 726 public void removeGroup(long pk, long groupPK) 727 throws com.liferay.portal.kernel.exception.SystemException; 728 729 /** 730 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 731 * 732 * @param pk the primary key of the user group 733 * @param group the group 734 * @throws SystemException if a system exception occurred 735 */ 736 public void removeGroup(long pk, com.liferay.portal.model.Group group) 737 throws com.liferay.portal.kernel.exception.SystemException; 738 739 /** 740 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 741 * 742 * @param pk the primary key of the user group 743 * @param groupPKs the primary keys of the groups 744 * @throws SystemException if a system exception occurred 745 */ 746 public void removeGroups(long pk, long[] groupPKs) 747 throws com.liferay.portal.kernel.exception.SystemException; 748 749 /** 750 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 751 * 752 * @param pk the primary key of the user group 753 * @param groups the groups 754 * @throws SystemException if a system exception occurred 755 */ 756 public void removeGroups(long pk, 757 java.util.List<com.liferay.portal.model.Group> groups) 758 throws com.liferay.portal.kernel.exception.SystemException; 759 760 /** 761 * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 762 * 763 * @param pk the primary key of the user group to set the associations for 764 * @param groupPKs the primary keys of the groups to be associated with the user group 765 * @throws SystemException if a system exception occurred 766 */ 767 public void setGroups(long pk, long[] groupPKs) 768 throws com.liferay.portal.kernel.exception.SystemException; 769 770 /** 771 * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 772 * 773 * @param pk the primary key of the user group to set the associations for 774 * @param groups the groups to be associated with the user group 775 * @throws SystemException if a system exception occurred 776 */ 777 public void setGroups(long pk, 778 java.util.List<com.liferay.portal.model.Group> groups) 779 throws com.liferay.portal.kernel.exception.SystemException; 780 781 /** 782 * Gets all the users associated with the user group. 783 * 784 * @param pk the primary key of the user group to get the associated users for 785 * @return the users associated with the user group 786 * @throws SystemException if a system exception occurred 787 */ 788 public java.util.List<com.liferay.portal.model.User> getUsers(long pk) 789 throws com.liferay.portal.kernel.exception.SystemException; 790 791 /** 792 * Gets a range of all the users associated with the user group. 793 * 794 * <p> 795 * 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. 796 * </p> 797 * 798 * @param pk the primary key of the user group to get the associated users for 799 * @param start the lower bound of the range of user groups to return 800 * @param end the upper bound of the range of user groups to return (not inclusive) 801 * @return the range of users associated with the user group 802 * @throws SystemException if a system exception occurred 803 */ 804 public java.util.List<com.liferay.portal.model.User> getUsers(long pk, 805 int start, int end) 806 throws com.liferay.portal.kernel.exception.SystemException; 807 808 /** 809 * Gets an ordered range of all the users associated with the user group. 810 * 811 * <p> 812 * 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. 813 * </p> 814 * 815 * @param pk the primary key of the user group to get the associated users for 816 * @param start the lower bound of the range of user groups to return 817 * @param end the upper bound of the range of user groups to return (not inclusive) 818 * @param orderByComparator the comparator to order the results by 819 * @return the ordered range of users associated with the user group 820 * @throws SystemException if a system exception occurred 821 */ 822 public java.util.List<com.liferay.portal.model.User> getUsers(long pk, 823 int start, int end, 824 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 825 throws com.liferay.portal.kernel.exception.SystemException; 826 827 /** 828 * Gets the number of users associated with the user group. 829 * 830 * @param pk the primary key of the user group to get the number of associated users for 831 * @return the number of users associated with the user group 832 * @throws SystemException if a system exception occurred 833 */ 834 public int getUsersSize(long pk) 835 throws com.liferay.portal.kernel.exception.SystemException; 836 837 /** 838 * Determines if the user is associated with the user group. 839 * 840 * @param pk the primary key of the user group 841 * @param userPK the primary key of the user 842 * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise 843 * @throws SystemException if a system exception occurred 844 */ 845 public boolean containsUser(long pk, long userPK) 846 throws com.liferay.portal.kernel.exception.SystemException; 847 848 /** 849 * Determines if the user group has any users associated with it. 850 * 851 * @param pk the primary key of the user group to check for associations with users 852 * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise 853 * @throws SystemException if a system exception occurred 854 */ 855 public boolean containsUsers(long pk) 856 throws com.liferay.portal.kernel.exception.SystemException; 857 858 /** 859 * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 860 * 861 * @param pk the primary key of the user group 862 * @param userPK the primary key of the user 863 * @throws SystemException if a system exception occurred 864 */ 865 public void addUser(long pk, long userPK) 866 throws com.liferay.portal.kernel.exception.SystemException; 867 868 /** 869 * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 870 * 871 * @param pk the primary key of the user group 872 * @param user the user 873 * @throws SystemException if a system exception occurred 874 */ 875 public void addUser(long pk, com.liferay.portal.model.User user) 876 throws com.liferay.portal.kernel.exception.SystemException; 877 878 /** 879 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 880 * 881 * @param pk the primary key of the user group 882 * @param userPKs the primary keys of the users 883 * @throws SystemException if a system exception occurred 884 */ 885 public void addUsers(long pk, long[] userPKs) 886 throws com.liferay.portal.kernel.exception.SystemException; 887 888 /** 889 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 890 * 891 * @param pk the primary key of the user group 892 * @param users the users 893 * @throws SystemException if a system exception occurred 894 */ 895 public void addUsers(long pk, 896 java.util.List<com.liferay.portal.model.User> users) 897 throws com.liferay.portal.kernel.exception.SystemException; 898 899 /** 900 * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 901 * 902 * @param pk the primary key of the user group to clear the associated users from 903 * @throws SystemException if a system exception occurred 904 */ 905 public void clearUsers(long pk) 906 throws com.liferay.portal.kernel.exception.SystemException; 907 908 /** 909 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 910 * 911 * @param pk the primary key of the user group 912 * @param userPK the primary key of the user 913 * @throws SystemException if a system exception occurred 914 */ 915 public void removeUser(long pk, long userPK) 916 throws com.liferay.portal.kernel.exception.SystemException; 917 918 /** 919 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 920 * 921 * @param pk the primary key of the user group 922 * @param user the user 923 * @throws SystemException if a system exception occurred 924 */ 925 public void removeUser(long pk, com.liferay.portal.model.User user) 926 throws com.liferay.portal.kernel.exception.SystemException; 927 928 /** 929 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 930 * 931 * @param pk the primary key of the user group 932 * @param userPKs the primary keys of the users 933 * @throws SystemException if a system exception occurred 934 */ 935 public void removeUsers(long pk, long[] userPKs) 936 throws com.liferay.portal.kernel.exception.SystemException; 937 938 /** 939 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 940 * 941 * @param pk the primary key of the user group 942 * @param users the users 943 * @throws SystemException if a system exception occurred 944 */ 945 public void removeUsers(long pk, 946 java.util.List<com.liferay.portal.model.User> users) 947 throws com.liferay.portal.kernel.exception.SystemException; 948 949 /** 950 * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 951 * 952 * @param pk the primary key of the user group to set the associations for 953 * @param userPKs the primary keys of the users to be associated with the user group 954 * @throws SystemException if a system exception occurred 955 */ 956 public void setUsers(long pk, long[] userPKs) 957 throws com.liferay.portal.kernel.exception.SystemException; 958 959 /** 960 * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 961 * 962 * @param pk the primary key of the user group to set the associations for 963 * @param users the users to be associated with the user group 964 * @throws SystemException if a system exception occurred 965 */ 966 public void setUsers(long pk, 967 java.util.List<com.liferay.portal.model.User> users) 968 throws com.liferay.portal.kernel.exception.SystemException; 969 }