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