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