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