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.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.model.Organization; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * The persistence utility for the organization service. This utility wraps {@link OrganizationPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 028 * 029 * <p> 030 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 031 * </p> 032 * 033 * <p> 034 * Caching information and settings can be found in <code>portal.properties</code> 035 * </p> 036 * 037 * @author Brian Wing Shun Chan 038 * @see OrganizationPersistence 039 * @see OrganizationPersistenceImpl 040 * @generated 041 */ 042 public class OrganizationUtil { 043 /** 044 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 045 */ 046 public static void clearCache() { 047 getPersistence().clearCache(); 048 } 049 050 /** 051 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 052 */ 053 public static void clearCache(Organization organization) { 054 getPersistence().clearCache(organization); 055 } 056 057 /** 058 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 059 */ 060 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 061 throws SystemException { 062 return getPersistence().countWithDynamicQuery(dynamicQuery); 063 } 064 065 /** 066 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 067 */ 068 public static List<Organization> findWithDynamicQuery( 069 DynamicQuery dynamicQuery) throws SystemException { 070 return getPersistence().findWithDynamicQuery(dynamicQuery); 071 } 072 073 /** 074 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 075 */ 076 public static List<Organization> findWithDynamicQuery( 077 DynamicQuery dynamicQuery, int start, int end) 078 throws SystemException { 079 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 080 } 081 082 /** 083 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 084 */ 085 public static List<Organization> findWithDynamicQuery( 086 DynamicQuery dynamicQuery, int start, int end, 087 OrderByComparator orderByComparator) throws SystemException { 088 return getPersistence() 089 .findWithDynamicQuery(dynamicQuery, start, end, 090 orderByComparator); 091 } 092 093 /** 094 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 095 */ 096 public static Organization remove(Organization organization) 097 throws SystemException { 098 return getPersistence().remove(organization); 099 } 100 101 /** 102 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 103 */ 104 public static Organization update(Organization organization, boolean merge) 105 throws SystemException { 106 return getPersistence().update(organization, merge); 107 } 108 109 /** 110 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 111 */ 112 public static Organization update(Organization organization, boolean merge, 113 ServiceContext serviceContext) throws SystemException { 114 return getPersistence().update(organization, merge, serviceContext); 115 } 116 117 /** 118 * Caches the organization in the entity cache if it is enabled. 119 * 120 * @param organization the organization to cache 121 */ 122 public static void cacheResult( 123 com.liferay.portal.model.Organization organization) { 124 getPersistence().cacheResult(organization); 125 } 126 127 /** 128 * Caches the organizations in the entity cache if it is enabled. 129 * 130 * @param organizations the organizations to cache 131 */ 132 public static void cacheResult( 133 java.util.List<com.liferay.portal.model.Organization> organizations) { 134 getPersistence().cacheResult(organizations); 135 } 136 137 /** 138 * Creates a new organization with the primary key. Does not add the organization to the database. 139 * 140 * @param organizationId the primary key for the new organization 141 * @return the new organization 142 */ 143 public static com.liferay.portal.model.Organization create( 144 long organizationId) { 145 return getPersistence().create(organizationId); 146 } 147 148 /** 149 * Removes the organization with the primary key from the database. Also notifies the appropriate model listeners. 150 * 151 * @param organizationId the primary key of the organization to remove 152 * @return the organization that was removed 153 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 154 * @throws SystemException if a system exception occurred 155 */ 156 public static com.liferay.portal.model.Organization remove( 157 long organizationId) 158 throws com.liferay.portal.NoSuchOrganizationException, 159 com.liferay.portal.kernel.exception.SystemException { 160 return getPersistence().remove(organizationId); 161 } 162 163 public static com.liferay.portal.model.Organization updateImpl( 164 com.liferay.portal.model.Organization organization, boolean merge) 165 throws com.liferay.portal.kernel.exception.SystemException { 166 return getPersistence().updateImpl(organization, merge); 167 } 168 169 /** 170 * Finds the organization with the primary key or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found. 171 * 172 * @param organizationId the primary key of the organization to find 173 * @return the organization 174 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 175 * @throws SystemException if a system exception occurred 176 */ 177 public static com.liferay.portal.model.Organization findByPrimaryKey( 178 long organizationId) 179 throws com.liferay.portal.NoSuchOrganizationException, 180 com.liferay.portal.kernel.exception.SystemException { 181 return getPersistence().findByPrimaryKey(organizationId); 182 } 183 184 /** 185 * Finds the organization with the primary key or returns <code>null</code> if it could not be found. 186 * 187 * @param organizationId the primary key of the organization to find 188 * @return the organization, or <code>null</code> if a organization with the primary key could not be found 189 * @throws SystemException if a system exception occurred 190 */ 191 public static com.liferay.portal.model.Organization fetchByPrimaryKey( 192 long organizationId) 193 throws com.liferay.portal.kernel.exception.SystemException { 194 return getPersistence().fetchByPrimaryKey(organizationId); 195 } 196 197 /** 198 * Finds all the organizations where companyId = ?. 199 * 200 * @param companyId the company id to search with 201 * @return the matching organizations 202 * @throws SystemException if a system exception occurred 203 */ 204 public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId( 205 long companyId) 206 throws com.liferay.portal.kernel.exception.SystemException { 207 return getPersistence().findByCompanyId(companyId); 208 } 209 210 /** 211 * Finds a range of all the organizations where companyId = ?. 212 * 213 * <p> 214 * 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. 215 * </p> 216 * 217 * @param companyId the company id to search with 218 * @param start the lower bound of the range of organizations to return 219 * @param end the upper bound of the range of organizations to return (not inclusive) 220 * @return the range of matching organizations 221 * @throws SystemException if a system exception occurred 222 */ 223 public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId( 224 long companyId, int start, int end) 225 throws com.liferay.portal.kernel.exception.SystemException { 226 return getPersistence().findByCompanyId(companyId, start, end); 227 } 228 229 /** 230 * Finds an ordered range of all the organizations where companyId = ?. 231 * 232 * <p> 233 * 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. 234 * </p> 235 * 236 * @param companyId the company id to search with 237 * @param start the lower bound of the range of organizations to return 238 * @param end the upper bound of the range of organizations to return (not inclusive) 239 * @param orderByComparator the comparator to order the results by 240 * @return the ordered range of matching organizations 241 * @throws SystemException if a system exception occurred 242 */ 243 public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId( 244 long companyId, int start, int end, 245 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 246 throws com.liferay.portal.kernel.exception.SystemException { 247 return getPersistence() 248 .findByCompanyId(companyId, start, end, orderByComparator); 249 } 250 251 /** 252 * Finds the first organization in the ordered set where companyId = ?. 253 * 254 * <p> 255 * 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. 256 * </p> 257 * 258 * @param companyId the company id to search with 259 * @param orderByComparator the comparator to order the set by 260 * @return the first matching organization 261 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 262 * @throws SystemException if a system exception occurred 263 */ 264 public static com.liferay.portal.model.Organization findByCompanyId_First( 265 long companyId, 266 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 267 throws com.liferay.portal.NoSuchOrganizationException, 268 com.liferay.portal.kernel.exception.SystemException { 269 return getPersistence() 270 .findByCompanyId_First(companyId, orderByComparator); 271 } 272 273 /** 274 * Finds the last organization in the ordered set where companyId = ?. 275 * 276 * <p> 277 * 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. 278 * </p> 279 * 280 * @param companyId the company id to search with 281 * @param orderByComparator the comparator to order the set by 282 * @return the last matching organization 283 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.Organization findByCompanyId_Last( 287 long companyId, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.NoSuchOrganizationException, 290 com.liferay.portal.kernel.exception.SystemException { 291 return getPersistence() 292 .findByCompanyId_Last(companyId, orderByComparator); 293 } 294 295 /** 296 * Finds the organizations before and after the current organization in the ordered set where companyId = ?. 297 * 298 * <p> 299 * 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. 300 * </p> 301 * 302 * @param organizationId the primary key of the current organization 303 * @param companyId the company id to search with 304 * @param orderByComparator the comparator to order the set by 305 * @return the previous, current, and next organization 306 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 307 * @throws SystemException if a system exception occurred 308 */ 309 public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext( 310 long organizationId, long companyId, 311 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 312 throws com.liferay.portal.NoSuchOrganizationException, 313 com.liferay.portal.kernel.exception.SystemException { 314 return getPersistence() 315 .findByCompanyId_PrevAndNext(organizationId, companyId, 316 orderByComparator); 317 } 318 319 /** 320 * Filters by the user's permissions and finds all the organizations where companyId = ?. 321 * 322 * @param companyId the company id to search with 323 * @return the matching organizations that the user has permission to view 324 * @throws SystemException if a system exception occurred 325 */ 326 public static java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId( 327 long companyId) 328 throws com.liferay.portal.kernel.exception.SystemException { 329 return getPersistence().filterFindByCompanyId(companyId); 330 } 331 332 /** 333 * Filters by the user's permissions and finds a range of all the organizations where companyId = ?. 334 * 335 * <p> 336 * 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. 337 * </p> 338 * 339 * @param companyId the company id to search with 340 * @param start the lower bound of the range of organizations to return 341 * @param end the upper bound of the range of organizations to return (not inclusive) 342 * @return the range of matching organizations that the user has permission to view 343 * @throws SystemException if a system exception occurred 344 */ 345 public static java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId( 346 long companyId, int start, int end) 347 throws com.liferay.portal.kernel.exception.SystemException { 348 return getPersistence().filterFindByCompanyId(companyId, start, end); 349 } 350 351 /** 352 * Filters by the user's permissions and finds an ordered range of all the organizations where companyId = ?. 353 * 354 * <p> 355 * 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. 356 * </p> 357 * 358 * @param companyId the company id to search with 359 * @param start the lower bound of the range of organizations to return 360 * @param end the upper bound of the range of organizations to return (not inclusive) 361 * @param orderByComparator the comparator to order the results by 362 * @return the ordered range of matching organizations that the user has permission to view 363 * @throws SystemException if a system exception occurred 364 */ 365 public static java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId( 366 long companyId, int start, int end, 367 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 368 throws com.liferay.portal.kernel.exception.SystemException { 369 return getPersistence() 370 .filterFindByCompanyId(companyId, start, end, 371 orderByComparator); 372 } 373 374 /** 375 * Finds all the organizations where companyId = ?. 376 * 377 * @param companyId the company id to search with 378 * @return the matching organizations 379 * @throws SystemException if a system exception occurred 380 */ 381 public static java.util.List<com.liferay.portal.model.Organization> findByLocations( 382 long companyId) 383 throws com.liferay.portal.kernel.exception.SystemException { 384 return getPersistence().findByLocations(companyId); 385 } 386 387 /** 388 * Finds a range of all the organizations where companyId = ?. 389 * 390 * <p> 391 * 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. 392 * </p> 393 * 394 * @param companyId the company id to search with 395 * @param start the lower bound of the range of organizations to return 396 * @param end the upper bound of the range of organizations to return (not inclusive) 397 * @return the range of matching organizations 398 * @throws SystemException if a system exception occurred 399 */ 400 public static java.util.List<com.liferay.portal.model.Organization> findByLocations( 401 long companyId, int start, int end) 402 throws com.liferay.portal.kernel.exception.SystemException { 403 return getPersistence().findByLocations(companyId, start, end); 404 } 405 406 /** 407 * Finds an ordered range of all the organizations where companyId = ?. 408 * 409 * <p> 410 * 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. 411 * </p> 412 * 413 * @param companyId the company id to search with 414 * @param start the lower bound of the range of organizations to return 415 * @param end the upper bound of the range of organizations to return (not inclusive) 416 * @param orderByComparator the comparator to order the results by 417 * @return the ordered range of matching organizations 418 * @throws SystemException if a system exception occurred 419 */ 420 public static java.util.List<com.liferay.portal.model.Organization> findByLocations( 421 long companyId, int start, int end, 422 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 423 throws com.liferay.portal.kernel.exception.SystemException { 424 return getPersistence() 425 .findByLocations(companyId, start, end, orderByComparator); 426 } 427 428 /** 429 * Finds the first organization in the ordered set where companyId = ?. 430 * 431 * <p> 432 * 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. 433 * </p> 434 * 435 * @param companyId the company id to search with 436 * @param orderByComparator the comparator to order the set by 437 * @return the first matching organization 438 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portal.model.Organization findByLocations_First( 442 long companyId, 443 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 444 throws com.liferay.portal.NoSuchOrganizationException, 445 com.liferay.portal.kernel.exception.SystemException { 446 return getPersistence() 447 .findByLocations_First(companyId, orderByComparator); 448 } 449 450 /** 451 * Finds the last organization in the ordered set where companyId = ?. 452 * 453 * <p> 454 * 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. 455 * </p> 456 * 457 * @param companyId the company id to search with 458 * @param orderByComparator the comparator to order the set by 459 * @return the last matching organization 460 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 461 * @throws SystemException if a system exception occurred 462 */ 463 public static com.liferay.portal.model.Organization findByLocations_Last( 464 long companyId, 465 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 466 throws com.liferay.portal.NoSuchOrganizationException, 467 com.liferay.portal.kernel.exception.SystemException { 468 return getPersistence() 469 .findByLocations_Last(companyId, orderByComparator); 470 } 471 472 /** 473 * Finds the organizations before and after the current organization in the ordered set where companyId = ?. 474 * 475 * <p> 476 * 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. 477 * </p> 478 * 479 * @param organizationId the primary key of the current organization 480 * @param companyId the company id to search with 481 * @param orderByComparator the comparator to order the set by 482 * @return the previous, current, and next organization 483 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext( 487 long organizationId, long companyId, 488 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 489 throws com.liferay.portal.NoSuchOrganizationException, 490 com.liferay.portal.kernel.exception.SystemException { 491 return getPersistence() 492 .findByLocations_PrevAndNext(organizationId, companyId, 493 orderByComparator); 494 } 495 496 /** 497 * Filters by the user's permissions and finds all the organizations where companyId = ?. 498 * 499 * @param companyId the company id to search with 500 * @return the matching organizations that the user has permission to view 501 * @throws SystemException if a system exception occurred 502 */ 503 public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations( 504 long companyId) 505 throws com.liferay.portal.kernel.exception.SystemException { 506 return getPersistence().filterFindByLocations(companyId); 507 } 508 509 /** 510 * Filters by the user's permissions and finds a range of all the organizations where companyId = ?. 511 * 512 * <p> 513 * 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. 514 * </p> 515 * 516 * @param companyId the company id to search with 517 * @param start the lower bound of the range of organizations to return 518 * @param end the upper bound of the range of organizations to return (not inclusive) 519 * @return the range of matching organizations that the user has permission to view 520 * @throws SystemException if a system exception occurred 521 */ 522 public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations( 523 long companyId, int start, int end) 524 throws com.liferay.portal.kernel.exception.SystemException { 525 return getPersistence().filterFindByLocations(companyId, start, end); 526 } 527 528 /** 529 * Filters by the user's permissions and finds an ordered range of all the organizations where companyId = ?. 530 * 531 * <p> 532 * 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. 533 * </p> 534 * 535 * @param companyId the company id to search with 536 * @param start the lower bound of the range of organizations to return 537 * @param end the upper bound of the range of organizations to return (not inclusive) 538 * @param orderByComparator the comparator to order the results by 539 * @return the ordered range of matching organizations that the user has permission to view 540 * @throws SystemException if a system exception occurred 541 */ 542 public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations( 543 long companyId, int start, int end, 544 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 545 throws com.liferay.portal.kernel.exception.SystemException { 546 return getPersistence() 547 .filterFindByLocations(companyId, start, end, 548 orderByComparator); 549 } 550 551 /** 552 * Finds all the organizations where companyId = ? and parentOrganizationId = ?. 553 * 554 * @param companyId the company id to search with 555 * @param parentOrganizationId the parent organization id to search with 556 * @return the matching organizations 557 * @throws SystemException if a system exception occurred 558 */ 559 public static java.util.List<com.liferay.portal.model.Organization> findByC_P( 560 long companyId, long parentOrganizationId) 561 throws com.liferay.portal.kernel.exception.SystemException { 562 return getPersistence().findByC_P(companyId, parentOrganizationId); 563 } 564 565 /** 566 * Finds a range of all the organizations where companyId = ? and parentOrganizationId = ?. 567 * 568 * <p> 569 * 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. 570 * </p> 571 * 572 * @param companyId the company id to search with 573 * @param parentOrganizationId the parent organization id to search with 574 * @param start the lower bound of the range of organizations to return 575 * @param end the upper bound of the range of organizations to return (not inclusive) 576 * @return the range of matching organizations 577 * @throws SystemException if a system exception occurred 578 */ 579 public static java.util.List<com.liferay.portal.model.Organization> findByC_P( 580 long companyId, long parentOrganizationId, int start, int end) 581 throws com.liferay.portal.kernel.exception.SystemException { 582 return getPersistence() 583 .findByC_P(companyId, parentOrganizationId, start, end); 584 } 585 586 /** 587 * Finds an ordered range of all the organizations where companyId = ? and parentOrganizationId = ?. 588 * 589 * <p> 590 * 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. 591 * </p> 592 * 593 * @param companyId the company id to search with 594 * @param parentOrganizationId the parent organization id to search with 595 * @param start the lower bound of the range of organizations to return 596 * @param end the upper bound of the range of organizations to return (not inclusive) 597 * @param orderByComparator the comparator to order the results by 598 * @return the ordered range of matching organizations 599 * @throws SystemException if a system exception occurred 600 */ 601 public static java.util.List<com.liferay.portal.model.Organization> findByC_P( 602 long companyId, long parentOrganizationId, int start, int end, 603 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return getPersistence() 606 .findByC_P(companyId, parentOrganizationId, start, end, 607 orderByComparator); 608 } 609 610 /** 611 * Finds the first organization in the ordered set where companyId = ? and parentOrganizationId = ?. 612 * 613 * <p> 614 * 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. 615 * </p> 616 * 617 * @param companyId the company id to search with 618 * @param parentOrganizationId the parent organization id to search with 619 * @param orderByComparator the comparator to order the set by 620 * @return the first matching organization 621 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 622 * @throws SystemException if a system exception occurred 623 */ 624 public static com.liferay.portal.model.Organization findByC_P_First( 625 long companyId, long parentOrganizationId, 626 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 627 throws com.liferay.portal.NoSuchOrganizationException, 628 com.liferay.portal.kernel.exception.SystemException { 629 return getPersistence() 630 .findByC_P_First(companyId, parentOrganizationId, 631 orderByComparator); 632 } 633 634 /** 635 * Finds the last organization in the ordered set where companyId = ? and parentOrganizationId = ?. 636 * 637 * <p> 638 * 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. 639 * </p> 640 * 641 * @param companyId the company id to search with 642 * @param parentOrganizationId the parent organization id to search with 643 * @param orderByComparator the comparator to order the set by 644 * @return the last matching organization 645 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 646 * @throws SystemException if a system exception occurred 647 */ 648 public static com.liferay.portal.model.Organization findByC_P_Last( 649 long companyId, long parentOrganizationId, 650 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 651 throws com.liferay.portal.NoSuchOrganizationException, 652 com.liferay.portal.kernel.exception.SystemException { 653 return getPersistence() 654 .findByC_P_Last(companyId, parentOrganizationId, 655 orderByComparator); 656 } 657 658 /** 659 * Finds the organizations before and after the current organization in the ordered set where companyId = ? and parentOrganizationId = ?. 660 * 661 * <p> 662 * 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. 663 * </p> 664 * 665 * @param organizationId the primary key of the current organization 666 * @param companyId the company id to search with 667 * @param parentOrganizationId the parent organization id to search with 668 * @param orderByComparator the comparator to order the set by 669 * @return the previous, current, and next organization 670 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 671 * @throws SystemException if a system exception occurred 672 */ 673 public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext( 674 long organizationId, long companyId, long parentOrganizationId, 675 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 676 throws com.liferay.portal.NoSuchOrganizationException, 677 com.liferay.portal.kernel.exception.SystemException { 678 return getPersistence() 679 .findByC_P_PrevAndNext(organizationId, companyId, 680 parentOrganizationId, orderByComparator); 681 } 682 683 /** 684 * Filters by the user's permissions and finds all the organizations where companyId = ? and parentOrganizationId = ?. 685 * 686 * @param companyId the company id to search with 687 * @param parentOrganizationId the parent organization id to search with 688 * @return the matching organizations that the user has permission to view 689 * @throws SystemException if a system exception occurred 690 */ 691 public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P( 692 long companyId, long parentOrganizationId) 693 throws com.liferay.portal.kernel.exception.SystemException { 694 return getPersistence().filterFindByC_P(companyId, parentOrganizationId); 695 } 696 697 /** 698 * Filters by the user's permissions and finds a range of all the organizations where companyId = ? and parentOrganizationId = ?. 699 * 700 * <p> 701 * 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. 702 * </p> 703 * 704 * @param companyId the company id to search with 705 * @param parentOrganizationId the parent organization id to search with 706 * @param start the lower bound of the range of organizations to return 707 * @param end the upper bound of the range of organizations to return (not inclusive) 708 * @return the range of matching organizations that the user has permission to view 709 * @throws SystemException if a system exception occurred 710 */ 711 public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P( 712 long companyId, long parentOrganizationId, int start, int end) 713 throws com.liferay.portal.kernel.exception.SystemException { 714 return getPersistence() 715 .filterFindByC_P(companyId, parentOrganizationId, start, end); 716 } 717 718 /** 719 * Filters by the user's permissions and finds an ordered range of all the organizations where companyId = ? and parentOrganizationId = ?. 720 * 721 * <p> 722 * 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. 723 * </p> 724 * 725 * @param companyId the company id to search with 726 * @param parentOrganizationId the parent organization id to search with 727 * @param start the lower bound of the range of organizations to return 728 * @param end the upper bound of the range of organizations to return (not inclusive) 729 * @param orderByComparator the comparator to order the results by 730 * @return the ordered range of matching organizations that the user has permission to view 731 * @throws SystemException if a system exception occurred 732 */ 733 public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P( 734 long companyId, long parentOrganizationId, int start, int end, 735 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 736 throws com.liferay.portal.kernel.exception.SystemException { 737 return getPersistence() 738 .filterFindByC_P(companyId, parentOrganizationId, start, 739 end, orderByComparator); 740 } 741 742 /** 743 * Finds the organization where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found. 744 * 745 * @param companyId the company id to search with 746 * @param name the name to search with 747 * @return the matching organization 748 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 749 * @throws SystemException if a system exception occurred 750 */ 751 public static com.liferay.portal.model.Organization findByC_N( 752 long companyId, java.lang.String name) 753 throws com.liferay.portal.NoSuchOrganizationException, 754 com.liferay.portal.kernel.exception.SystemException { 755 return getPersistence().findByC_N(companyId, name); 756 } 757 758 /** 759 * Finds the organization where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 760 * 761 * @param companyId the company id to search with 762 * @param name the name to search with 763 * @return the matching organization, or <code>null</code> if a matching organization could not be found 764 * @throws SystemException if a system exception occurred 765 */ 766 public static com.liferay.portal.model.Organization fetchByC_N( 767 long companyId, java.lang.String name) 768 throws com.liferay.portal.kernel.exception.SystemException { 769 return getPersistence().fetchByC_N(companyId, name); 770 } 771 772 /** 773 * Finds the organization where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 774 * 775 * @param companyId the company id to search with 776 * @param name the name to search with 777 * @return the matching organization, or <code>null</code> if a matching organization could not be found 778 * @throws SystemException if a system exception occurred 779 */ 780 public static com.liferay.portal.model.Organization fetchByC_N( 781 long companyId, java.lang.String name, boolean retrieveFromCache) 782 throws com.liferay.portal.kernel.exception.SystemException { 783 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 784 } 785 786 /** 787 * Finds all the organizations. 788 * 789 * @return the organizations 790 * @throws SystemException if a system exception occurred 791 */ 792 public static java.util.List<com.liferay.portal.model.Organization> findAll() 793 throws com.liferay.portal.kernel.exception.SystemException { 794 return getPersistence().findAll(); 795 } 796 797 /** 798 * Finds a range of all the organizations. 799 * 800 * <p> 801 * 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. 802 * </p> 803 * 804 * @param start the lower bound of the range of organizations to return 805 * @param end the upper bound of the range of organizations to return (not inclusive) 806 * @return the range of organizations 807 * @throws SystemException if a system exception occurred 808 */ 809 public static java.util.List<com.liferay.portal.model.Organization> findAll( 810 int start, int end) 811 throws com.liferay.portal.kernel.exception.SystemException { 812 return getPersistence().findAll(start, end); 813 } 814 815 /** 816 * Finds an ordered range of all the organizations. 817 * 818 * <p> 819 * 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. 820 * </p> 821 * 822 * @param start the lower bound of the range of organizations to return 823 * @param end the upper bound of the range of organizations to return (not inclusive) 824 * @param orderByComparator the comparator to order the results by 825 * @return the ordered range of organizations 826 * @throws SystemException if a system exception occurred 827 */ 828 public static java.util.List<com.liferay.portal.model.Organization> findAll( 829 int start, int end, 830 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 831 throws com.liferay.portal.kernel.exception.SystemException { 832 return getPersistence().findAll(start, end, orderByComparator); 833 } 834 835 /** 836 * Removes all the organizations where companyId = ? from the database. 837 * 838 * @param companyId the company id to search with 839 * @throws SystemException if a system exception occurred 840 */ 841 public static void removeByCompanyId(long companyId) 842 throws com.liferay.portal.kernel.exception.SystemException { 843 getPersistence().removeByCompanyId(companyId); 844 } 845 846 /** 847 * Removes all the organizations where companyId = ? from the database. 848 * 849 * @param companyId the company id to search with 850 * @throws SystemException if a system exception occurred 851 */ 852 public static void removeByLocations(long companyId) 853 throws com.liferay.portal.kernel.exception.SystemException { 854 getPersistence().removeByLocations(companyId); 855 } 856 857 /** 858 * Removes all the organizations where companyId = ? and parentOrganizationId = ? from the database. 859 * 860 * @param companyId the company id to search with 861 * @param parentOrganizationId the parent organization id to search with 862 * @throws SystemException if a system exception occurred 863 */ 864 public static void removeByC_P(long companyId, long parentOrganizationId) 865 throws com.liferay.portal.kernel.exception.SystemException { 866 getPersistence().removeByC_P(companyId, parentOrganizationId); 867 } 868 869 /** 870 * Removes the organization where companyId = ? and name = ? from the database. 871 * 872 * @param companyId the company id to search with 873 * @param name the name to search with 874 * @throws SystemException if a system exception occurred 875 */ 876 public static void removeByC_N(long companyId, java.lang.String name) 877 throws com.liferay.portal.NoSuchOrganizationException, 878 com.liferay.portal.kernel.exception.SystemException { 879 getPersistence().removeByC_N(companyId, name); 880 } 881 882 /** 883 * Removes all the organizations from the database. 884 * 885 * @throws SystemException if a system exception occurred 886 */ 887 public static void removeAll() 888 throws com.liferay.portal.kernel.exception.SystemException { 889 getPersistence().removeAll(); 890 } 891 892 /** 893 * Counts all the organizations where companyId = ?. 894 * 895 * @param companyId the company id to search with 896 * @return the number of matching organizations 897 * @throws SystemException if a system exception occurred 898 */ 899 public static int countByCompanyId(long companyId) 900 throws com.liferay.portal.kernel.exception.SystemException { 901 return getPersistence().countByCompanyId(companyId); 902 } 903 904 /** 905 * Filters by the user's permissions and counts all the organizations where companyId = ?. 906 * 907 * @param companyId the company id to search with 908 * @return the number of matching organizations that the user has permission to view 909 * @throws SystemException if a system exception occurred 910 */ 911 public static int filterCountByCompanyId(long companyId) 912 throws com.liferay.portal.kernel.exception.SystemException { 913 return getPersistence().filterCountByCompanyId(companyId); 914 } 915 916 /** 917 * Counts all the organizations where companyId = ?. 918 * 919 * @param companyId the company id to search with 920 * @return the number of matching organizations 921 * @throws SystemException if a system exception occurred 922 */ 923 public static int countByLocations(long companyId) 924 throws com.liferay.portal.kernel.exception.SystemException { 925 return getPersistence().countByLocations(companyId); 926 } 927 928 /** 929 * Filters by the user's permissions and counts all the organizations where companyId = ?. 930 * 931 * @param companyId the company id to search with 932 * @return the number of matching organizations that the user has permission to view 933 * @throws SystemException if a system exception occurred 934 */ 935 public static int filterCountByLocations(long companyId) 936 throws com.liferay.portal.kernel.exception.SystemException { 937 return getPersistence().filterCountByLocations(companyId); 938 } 939 940 /** 941 * Counts all the organizations where companyId = ? and parentOrganizationId = ?. 942 * 943 * @param companyId the company id to search with 944 * @param parentOrganizationId the parent organization id to search with 945 * @return the number of matching organizations 946 * @throws SystemException if a system exception occurred 947 */ 948 public static int countByC_P(long companyId, long parentOrganizationId) 949 throws com.liferay.portal.kernel.exception.SystemException { 950 return getPersistence().countByC_P(companyId, parentOrganizationId); 951 } 952 953 /** 954 * Filters by the user's permissions and counts all the organizations where companyId = ? and parentOrganizationId = ?. 955 * 956 * @param companyId the company id to search with 957 * @param parentOrganizationId the parent organization id to search with 958 * @return the number of matching organizations that the user has permission to view 959 * @throws SystemException if a system exception occurred 960 */ 961 public static int filterCountByC_P(long companyId, long parentOrganizationId) 962 throws com.liferay.portal.kernel.exception.SystemException { 963 return getPersistence().filterCountByC_P(companyId, parentOrganizationId); 964 } 965 966 /** 967 * Counts all the organizations where companyId = ? and name = ?. 968 * 969 * @param companyId the company id to search with 970 * @param name the name to search with 971 * @return the number of matching organizations 972 * @throws SystemException if a system exception occurred 973 */ 974 public static int countByC_N(long companyId, java.lang.String name) 975 throws com.liferay.portal.kernel.exception.SystemException { 976 return getPersistence().countByC_N(companyId, name); 977 } 978 979 /** 980 * Counts all the organizations. 981 * 982 * @return the number of organizations 983 * @throws SystemException if a system exception occurred 984 */ 985 public static int countAll() 986 throws com.liferay.portal.kernel.exception.SystemException { 987 return getPersistence().countAll(); 988 } 989 990 /** 991 * Gets all the groups associated with the organization. 992 * 993 * @param pk the primary key of the organization to get the associated groups for 994 * @return the groups associated with the organization 995 * @throws SystemException if a system exception occurred 996 */ 997 public static java.util.List<com.liferay.portal.model.Group> getGroups( 998 long pk) throws com.liferay.portal.kernel.exception.SystemException { 999 return getPersistence().getGroups(pk); 1000 } 1001 1002 /** 1003 * Gets a range of all the groups associated with the organization. 1004 * 1005 * <p> 1006 * 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. 1007 * </p> 1008 * 1009 * @param pk the primary key of the organization to get the associated groups for 1010 * @param start the lower bound of the range of organizations to return 1011 * @param end the upper bound of the range of organizations to return (not inclusive) 1012 * @return the range of groups associated with the organization 1013 * @throws SystemException if a system exception occurred 1014 */ 1015 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1016 long pk, int start, int end) 1017 throws com.liferay.portal.kernel.exception.SystemException { 1018 return getPersistence().getGroups(pk, start, end); 1019 } 1020 1021 /** 1022 * Gets an ordered range of all the groups associated with the organization. 1023 * 1024 * <p> 1025 * 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. 1026 * </p> 1027 * 1028 * @param pk the primary key of the organization to get the associated groups for 1029 * @param start the lower bound of the range of organizations to return 1030 * @param end the upper bound of the range of organizations to return (not inclusive) 1031 * @param orderByComparator the comparator to order the results by 1032 * @return the ordered range of groups associated with the organization 1033 * @throws SystemException if a system exception occurred 1034 */ 1035 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1036 long pk, int start, int end, 1037 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1038 throws com.liferay.portal.kernel.exception.SystemException { 1039 return getPersistence().getGroups(pk, start, end, orderByComparator); 1040 } 1041 1042 /** 1043 * Gets the number of groups associated with the organization. 1044 * 1045 * @param pk the primary key of the organization to get the number of associated groups for 1046 * @return the number of groups associated with the organization 1047 * @throws SystemException if a system exception occurred 1048 */ 1049 public static int getGroupsSize(long pk) 1050 throws com.liferay.portal.kernel.exception.SystemException { 1051 return getPersistence().getGroupsSize(pk); 1052 } 1053 1054 /** 1055 * Determines if the group is associated with the organization. 1056 * 1057 * @param pk the primary key of the organization 1058 * @param groupPK the primary key of the group 1059 * @return <code>true</code> if the group is associated with the organization; <code>false</code> otherwise 1060 * @throws SystemException if a system exception occurred 1061 */ 1062 public static boolean containsGroup(long pk, long groupPK) 1063 throws com.liferay.portal.kernel.exception.SystemException { 1064 return getPersistence().containsGroup(pk, groupPK); 1065 } 1066 1067 /** 1068 * Determines if the organization has any groups associated with it. 1069 * 1070 * @param pk the primary key of the organization to check for associations with groups 1071 * @return <code>true</code> if the organization has any groups associated with it; <code>false</code> otherwise 1072 * @throws SystemException if a system exception occurred 1073 */ 1074 public static boolean containsGroups(long pk) 1075 throws com.liferay.portal.kernel.exception.SystemException { 1076 return getPersistence().containsGroups(pk); 1077 } 1078 1079 /** 1080 * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1081 * 1082 * @param pk the primary key of the organization 1083 * @param groupPK the primary key of the group 1084 * @throws SystemException if a system exception occurred 1085 */ 1086 public static void addGroup(long pk, long groupPK) 1087 throws com.liferay.portal.kernel.exception.SystemException { 1088 getPersistence().addGroup(pk, groupPK); 1089 } 1090 1091 /** 1092 * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1093 * 1094 * @param pk the primary key of the organization 1095 * @param group the group 1096 * @throws SystemException if a system exception occurred 1097 */ 1098 public static void addGroup(long pk, com.liferay.portal.model.Group group) 1099 throws com.liferay.portal.kernel.exception.SystemException { 1100 getPersistence().addGroup(pk, group); 1101 } 1102 1103 /** 1104 * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1105 * 1106 * @param pk the primary key of the organization 1107 * @param groupPKs the primary keys of the groups 1108 * @throws SystemException if a system exception occurred 1109 */ 1110 public static void addGroups(long pk, long[] groupPKs) 1111 throws com.liferay.portal.kernel.exception.SystemException { 1112 getPersistence().addGroups(pk, groupPKs); 1113 } 1114 1115 /** 1116 * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1117 * 1118 * @param pk the primary key of the organization 1119 * @param groups the groups 1120 * @throws SystemException if a system exception occurred 1121 */ 1122 public static void addGroups(long pk, 1123 java.util.List<com.liferay.portal.model.Group> groups) 1124 throws com.liferay.portal.kernel.exception.SystemException { 1125 getPersistence().addGroups(pk, groups); 1126 } 1127 1128 /** 1129 * Clears all associations between the organization and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1130 * 1131 * @param pk the primary key of the organization to clear the associated groups from 1132 * @throws SystemException if a system exception occurred 1133 */ 1134 public static void clearGroups(long pk) 1135 throws com.liferay.portal.kernel.exception.SystemException { 1136 getPersistence().clearGroups(pk); 1137 } 1138 1139 /** 1140 * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1141 * 1142 * @param pk the primary key of the organization 1143 * @param groupPK the primary key of the group 1144 * @throws SystemException if a system exception occurred 1145 */ 1146 public static void removeGroup(long pk, long groupPK) 1147 throws com.liferay.portal.kernel.exception.SystemException { 1148 getPersistence().removeGroup(pk, groupPK); 1149 } 1150 1151 /** 1152 * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1153 * 1154 * @param pk the primary key of the organization 1155 * @param group the group 1156 * @throws SystemException if a system exception occurred 1157 */ 1158 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 1159 throws com.liferay.portal.kernel.exception.SystemException { 1160 getPersistence().removeGroup(pk, group); 1161 } 1162 1163 /** 1164 * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1165 * 1166 * @param pk the primary key of the organization 1167 * @param groupPKs the primary keys of the groups 1168 * @throws SystemException if a system exception occurred 1169 */ 1170 public static void removeGroups(long pk, long[] groupPKs) 1171 throws com.liferay.portal.kernel.exception.SystemException { 1172 getPersistence().removeGroups(pk, groupPKs); 1173 } 1174 1175 /** 1176 * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1177 * 1178 * @param pk the primary key of the organization 1179 * @param groups the groups 1180 * @throws SystemException if a system exception occurred 1181 */ 1182 public static void removeGroups(long pk, 1183 java.util.List<com.liferay.portal.model.Group> groups) 1184 throws com.liferay.portal.kernel.exception.SystemException { 1185 getPersistence().removeGroups(pk, groups); 1186 } 1187 1188 /** 1189 * 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. 1190 * 1191 * @param pk the primary key of the organization to set the associations for 1192 * @param groupPKs the primary keys of the groups to be associated with the organization 1193 * @throws SystemException if a system exception occurred 1194 */ 1195 public static void setGroups(long pk, long[] groupPKs) 1196 throws com.liferay.portal.kernel.exception.SystemException { 1197 getPersistence().setGroups(pk, groupPKs); 1198 } 1199 1200 /** 1201 * 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. 1202 * 1203 * @param pk the primary key of the organization to set the associations for 1204 * @param groups the groups to be associated with the organization 1205 * @throws SystemException if a system exception occurred 1206 */ 1207 public static void setGroups(long pk, 1208 java.util.List<com.liferay.portal.model.Group> groups) 1209 throws com.liferay.portal.kernel.exception.SystemException { 1210 getPersistence().setGroups(pk, groups); 1211 } 1212 1213 /** 1214 * Gets all the users associated with the organization. 1215 * 1216 * @param pk the primary key of the organization to get the associated users for 1217 * @return the users associated with the organization 1218 * @throws SystemException if a system exception occurred 1219 */ 1220 public static java.util.List<com.liferay.portal.model.User> getUsers( 1221 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1222 return getPersistence().getUsers(pk); 1223 } 1224 1225 /** 1226 * Gets a range of all the users associated with the organization. 1227 * 1228 * <p> 1229 * 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. 1230 * </p> 1231 * 1232 * @param pk the primary key of the organization to get the associated users for 1233 * @param start the lower bound of the range of organizations to return 1234 * @param end the upper bound of the range of organizations to return (not inclusive) 1235 * @return the range of users associated with the organization 1236 * @throws SystemException if a system exception occurred 1237 */ 1238 public static java.util.List<com.liferay.portal.model.User> getUsers( 1239 long pk, int start, int end) 1240 throws com.liferay.portal.kernel.exception.SystemException { 1241 return getPersistence().getUsers(pk, start, end); 1242 } 1243 1244 /** 1245 * Gets an ordered range of all the users associated with the organization. 1246 * 1247 * <p> 1248 * 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. 1249 * </p> 1250 * 1251 * @param pk the primary key of the organization to get the associated users for 1252 * @param start the lower bound of the range of organizations to return 1253 * @param end the upper bound of the range of organizations to return (not inclusive) 1254 * @param orderByComparator the comparator to order the results by 1255 * @return the ordered range of users associated with the organization 1256 * @throws SystemException if a system exception occurred 1257 */ 1258 public static java.util.List<com.liferay.portal.model.User> getUsers( 1259 long pk, int start, int end, 1260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1261 throws com.liferay.portal.kernel.exception.SystemException { 1262 return getPersistence().getUsers(pk, start, end, orderByComparator); 1263 } 1264 1265 /** 1266 * Gets the number of users associated with the organization. 1267 * 1268 * @param pk the primary key of the organization to get the number of associated users for 1269 * @return the number of users associated with the organization 1270 * @throws SystemException if a system exception occurred 1271 */ 1272 public static int getUsersSize(long pk) 1273 throws com.liferay.portal.kernel.exception.SystemException { 1274 return getPersistence().getUsersSize(pk); 1275 } 1276 1277 /** 1278 * Determines if the user is associated with the organization. 1279 * 1280 * @param pk the primary key of the organization 1281 * @param userPK the primary key of the user 1282 * @return <code>true</code> if the user is associated with the organization; <code>false</code> otherwise 1283 * @throws SystemException if a system exception occurred 1284 */ 1285 public static boolean containsUser(long pk, long userPK) 1286 throws com.liferay.portal.kernel.exception.SystemException { 1287 return getPersistence().containsUser(pk, userPK); 1288 } 1289 1290 /** 1291 * Determines if the organization has any users associated with it. 1292 * 1293 * @param pk the primary key of the organization to check for associations with users 1294 * @return <code>true</code> if the organization has any users associated with it; <code>false</code> otherwise 1295 * @throws SystemException if a system exception occurred 1296 */ 1297 public static boolean containsUsers(long pk) 1298 throws com.liferay.portal.kernel.exception.SystemException { 1299 return getPersistence().containsUsers(pk); 1300 } 1301 1302 /** 1303 * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1304 * 1305 * @param pk the primary key of the organization 1306 * @param userPK the primary key of the user 1307 * @throws SystemException if a system exception occurred 1308 */ 1309 public static void addUser(long pk, long userPK) 1310 throws com.liferay.portal.kernel.exception.SystemException { 1311 getPersistence().addUser(pk, userPK); 1312 } 1313 1314 /** 1315 * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1316 * 1317 * @param pk the primary key of the organization 1318 * @param user the user 1319 * @throws SystemException if a system exception occurred 1320 */ 1321 public static void addUser(long pk, com.liferay.portal.model.User user) 1322 throws com.liferay.portal.kernel.exception.SystemException { 1323 getPersistence().addUser(pk, user); 1324 } 1325 1326 /** 1327 * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1328 * 1329 * @param pk the primary key of the organization 1330 * @param userPKs the primary keys of the users 1331 * @throws SystemException if a system exception occurred 1332 */ 1333 public static void addUsers(long pk, long[] userPKs) 1334 throws com.liferay.portal.kernel.exception.SystemException { 1335 getPersistence().addUsers(pk, userPKs); 1336 } 1337 1338 /** 1339 * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1340 * 1341 * @param pk the primary key of the organization 1342 * @param users the users 1343 * @throws SystemException if a system exception occurred 1344 */ 1345 public static void addUsers(long pk, 1346 java.util.List<com.liferay.portal.model.User> users) 1347 throws com.liferay.portal.kernel.exception.SystemException { 1348 getPersistence().addUsers(pk, users); 1349 } 1350 1351 /** 1352 * Clears all associations between the organization and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1353 * 1354 * @param pk the primary key of the organization to clear the associated users from 1355 * @throws SystemException if a system exception occurred 1356 */ 1357 public static void clearUsers(long pk) 1358 throws com.liferay.portal.kernel.exception.SystemException { 1359 getPersistence().clearUsers(pk); 1360 } 1361 1362 /** 1363 * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1364 * 1365 * @param pk the primary key of the organization 1366 * @param userPK the primary key of the user 1367 * @throws SystemException if a system exception occurred 1368 */ 1369 public static void removeUser(long pk, long userPK) 1370 throws com.liferay.portal.kernel.exception.SystemException { 1371 getPersistence().removeUser(pk, userPK); 1372 } 1373 1374 /** 1375 * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1376 * 1377 * @param pk the primary key of the organization 1378 * @param user the user 1379 * @throws SystemException if a system exception occurred 1380 */ 1381 public static void removeUser(long pk, com.liferay.portal.model.User user) 1382 throws com.liferay.portal.kernel.exception.SystemException { 1383 getPersistence().removeUser(pk, user); 1384 } 1385 1386 /** 1387 * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1388 * 1389 * @param pk the primary key of the organization 1390 * @param userPKs the primary keys of the users 1391 * @throws SystemException if a system exception occurred 1392 */ 1393 public static void removeUsers(long pk, long[] userPKs) 1394 throws com.liferay.portal.kernel.exception.SystemException { 1395 getPersistence().removeUsers(pk, userPKs); 1396 } 1397 1398 /** 1399 * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1400 * 1401 * @param pk the primary key of the organization 1402 * @param users the users 1403 * @throws SystemException if a system exception occurred 1404 */ 1405 public static void removeUsers(long pk, 1406 java.util.List<com.liferay.portal.model.User> users) 1407 throws com.liferay.portal.kernel.exception.SystemException { 1408 getPersistence().removeUsers(pk, users); 1409 } 1410 1411 /** 1412 * 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. 1413 * 1414 * @param pk the primary key of the organization to set the associations for 1415 * @param userPKs the primary keys of the users to be associated with the organization 1416 * @throws SystemException if a system exception occurred 1417 */ 1418 public static void setUsers(long pk, long[] userPKs) 1419 throws com.liferay.portal.kernel.exception.SystemException { 1420 getPersistence().setUsers(pk, userPKs); 1421 } 1422 1423 /** 1424 * 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. 1425 * 1426 * @param pk the primary key of the organization to set the associations for 1427 * @param users the users to be associated with the organization 1428 * @throws SystemException if a system exception occurred 1429 */ 1430 public static void setUsers(long pk, 1431 java.util.List<com.liferay.portal.model.User> users) 1432 throws com.liferay.portal.kernel.exception.SystemException { 1433 getPersistence().setUsers(pk, users); 1434 } 1435 1436 /** 1437 * Rebuilds the organizations tree for the scope using the modified pre-order tree traversal algorithm. 1438 * 1439 * <p> 1440 * 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. 1441 * </p> 1442 * 1443 * @param companyId the id of the scope to rebuild the tree for 1444 * @param force whether to force the rebuild even if the tree is not stale 1445 */ 1446 public static void rebuildTree(long companyId, boolean force) 1447 throws com.liferay.portal.kernel.exception.SystemException { 1448 getPersistence().rebuildTree(companyId, force); 1449 } 1450 1451 public static OrganizationPersistence getPersistence() { 1452 if (_persistence == null) { 1453 _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName()); 1454 } 1455 1456 return _persistence; 1457 } 1458 1459 public void setPersistence(OrganizationPersistence persistence) { 1460 _persistence = persistence; 1461 } 1462 1463 private static OrganizationPersistence _persistence; 1464 }