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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns all the organizations where companyId = ?. 202 * 203 * @param companyId the company ID 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 * Returns 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 221 * @param start the lower bound of the range of organizations 222 * @param end the upper bound of the range of organizations (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 * Returns 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 240 * @param start the lower bound of the range of organizations 241 * @param end the upper bound of the range of organizations (not inclusive) 242 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 262 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 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 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 307 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns all the organizations that the user has permission to view where companyId = ?. 324 * 325 * @param companyId the company ID 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 * Returns a range of all the organizations that the user has permission to view 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 343 * @param start the lower bound of the range of organizations 344 * @param end the upper bound of the range of organizations (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 * Returns an ordered range of all the organizations that the user has permissions to view 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 362 * @param start the lower bound of the range of organizations 363 * @param end the upper bound of the range of organizations (not inclusive) 364 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where companyId = ?. 379 * 380 * @param organizationId the primary key of the current organization 381 * @param companyId the company ID 382 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 383 * @return the previous, current, and next organization 384 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 385 * @throws SystemException if a system exception occurred 386 */ 387 public static com.liferay.portal.model.Organization[] filterFindByCompanyId_PrevAndNext( 388 long organizationId, long companyId, 389 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 390 throws com.liferay.portal.NoSuchOrganizationException, 391 com.liferay.portal.kernel.exception.SystemException { 392 return getPersistence() 393 .filterFindByCompanyId_PrevAndNext(organizationId, 394 companyId, orderByComparator); 395 } 396 397 /** 398 * Returns all the organizations where companyId = ?. 399 * 400 * @param companyId the company ID 401 * @return the matching organizations 402 * @throws SystemException if a system exception occurred 403 */ 404 public static java.util.List<com.liferay.portal.model.Organization> findByLocations( 405 long companyId) 406 throws com.liferay.portal.kernel.exception.SystemException { 407 return getPersistence().findByLocations(companyId); 408 } 409 410 /** 411 * Returns a range of all the organizations where companyId = ?. 412 * 413 * <p> 414 * 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. 415 * </p> 416 * 417 * @param companyId the company ID 418 * @param start the lower bound of the range of organizations 419 * @param end the upper bound of the range of organizations (not inclusive) 420 * @return the range of matching organizations 421 * @throws SystemException if a system exception occurred 422 */ 423 public static java.util.List<com.liferay.portal.model.Organization> findByLocations( 424 long companyId, int start, int end) 425 throws com.liferay.portal.kernel.exception.SystemException { 426 return getPersistence().findByLocations(companyId, start, end); 427 } 428 429 /** 430 * Returns an ordered range of all the organizations where companyId = ?. 431 * 432 * <p> 433 * 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. 434 * </p> 435 * 436 * @param companyId the company ID 437 * @param start the lower bound of the range of organizations 438 * @param end the upper bound of the range of organizations (not inclusive) 439 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 440 * @return the ordered range of matching organizations 441 * @throws SystemException if a system exception occurred 442 */ 443 public static java.util.List<com.liferay.portal.model.Organization> findByLocations( 444 long companyId, int start, int end, 445 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 return getPersistence() 448 .findByLocations(companyId, start, end, orderByComparator); 449 } 450 451 /** 452 * Returns the first organization in the ordered set where companyId = ?. 453 * 454 * <p> 455 * 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. 456 * </p> 457 * 458 * @param companyId the company ID 459 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 460 * @return the first matching organization 461 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 462 * @throws SystemException if a system exception occurred 463 */ 464 public static com.liferay.portal.model.Organization findByLocations_First( 465 long companyId, 466 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 467 throws com.liferay.portal.NoSuchOrganizationException, 468 com.liferay.portal.kernel.exception.SystemException { 469 return getPersistence() 470 .findByLocations_First(companyId, orderByComparator); 471 } 472 473 /** 474 * Returns the last organization in the ordered set where companyId = ?. 475 * 476 * <p> 477 * 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. 478 * </p> 479 * 480 * @param companyId the company ID 481 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 482 * @return the last matching organization 483 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portal.model.Organization findByLocations_Last( 487 long companyId, 488 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 489 throws com.liferay.portal.NoSuchOrganizationException, 490 com.liferay.portal.kernel.exception.SystemException { 491 return getPersistence() 492 .findByLocations_Last(companyId, orderByComparator); 493 } 494 495 /** 496 * Returns the organizations before and after the current organization in the ordered set where companyId = ?. 497 * 498 * <p> 499 * 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. 500 * </p> 501 * 502 * @param organizationId the primary key of the current organization 503 * @param companyId the company ID 504 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 505 * @return the previous, current, and next organization 506 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 507 * @throws SystemException if a system exception occurred 508 */ 509 public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext( 510 long organizationId, long companyId, 511 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 512 throws com.liferay.portal.NoSuchOrganizationException, 513 com.liferay.portal.kernel.exception.SystemException { 514 return getPersistence() 515 .findByLocations_PrevAndNext(organizationId, companyId, 516 orderByComparator); 517 } 518 519 /** 520 * Returns all the organizations that the user has permission to view where companyId = ?. 521 * 522 * @param companyId the company ID 523 * @return the matching organizations that the user has permission to view 524 * @throws SystemException if a system exception occurred 525 */ 526 public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations( 527 long companyId) 528 throws com.liferay.portal.kernel.exception.SystemException { 529 return getPersistence().filterFindByLocations(companyId); 530 } 531 532 /** 533 * Returns a range of all the organizations that the user has permission to view where companyId = ?. 534 * 535 * <p> 536 * 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. 537 * </p> 538 * 539 * @param companyId the company ID 540 * @param start the lower bound of the range of organizations 541 * @param end the upper bound of the range of organizations (not inclusive) 542 * @return the range of matching organizations that the user has permission to view 543 * @throws SystemException if a system exception occurred 544 */ 545 public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations( 546 long companyId, int start, int end) 547 throws com.liferay.portal.kernel.exception.SystemException { 548 return getPersistence().filterFindByLocations(companyId, start, end); 549 } 550 551 /** 552 * Returns an ordered range of all the organizations that the user has permissions to view where companyId = ?. 553 * 554 * <p> 555 * 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. 556 * </p> 557 * 558 * @param companyId the company ID 559 * @param start the lower bound of the range of organizations 560 * @param end the upper bound of the range of organizations (not inclusive) 561 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 562 * @return the ordered range of matching organizations that the user has permission to view 563 * @throws SystemException if a system exception occurred 564 */ 565 public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations( 566 long companyId, int start, int end, 567 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 568 throws com.liferay.portal.kernel.exception.SystemException { 569 return getPersistence() 570 .filterFindByLocations(companyId, start, end, 571 orderByComparator); 572 } 573 574 /** 575 * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where companyId = ?. 576 * 577 * @param organizationId the primary key of the current organization 578 * @param companyId the company ID 579 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 580 * @return the previous, current, and next organization 581 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 582 * @throws SystemException if a system exception occurred 583 */ 584 public static com.liferay.portal.model.Organization[] filterFindByLocations_PrevAndNext( 585 long organizationId, long companyId, 586 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 587 throws com.liferay.portal.NoSuchOrganizationException, 588 com.liferay.portal.kernel.exception.SystemException { 589 return getPersistence() 590 .filterFindByLocations_PrevAndNext(organizationId, 591 companyId, orderByComparator); 592 } 593 594 /** 595 * Returns all the organizations where companyId = ? and parentOrganizationId = ?. 596 * 597 * @param companyId the company ID 598 * @param parentOrganizationId the parent organization ID 599 * @return the matching organizations 600 * @throws SystemException if a system exception occurred 601 */ 602 public static java.util.List<com.liferay.portal.model.Organization> findByC_P( 603 long companyId, long parentOrganizationId) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return getPersistence().findByC_P(companyId, parentOrganizationId); 606 } 607 608 /** 609 * Returns a range of all the organizations where companyId = ? and parentOrganizationId = ?. 610 * 611 * <p> 612 * 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. 613 * </p> 614 * 615 * @param companyId the company ID 616 * @param parentOrganizationId the parent organization ID 617 * @param start the lower bound of the range of organizations 618 * @param end the upper bound of the range of organizations (not inclusive) 619 * @return the range of matching organizations 620 * @throws SystemException if a system exception occurred 621 */ 622 public static java.util.List<com.liferay.portal.model.Organization> findByC_P( 623 long companyId, long parentOrganizationId, int start, int end) 624 throws com.liferay.portal.kernel.exception.SystemException { 625 return getPersistence() 626 .findByC_P(companyId, parentOrganizationId, start, end); 627 } 628 629 /** 630 * Returns an ordered range of all the organizations where companyId = ? and parentOrganizationId = ?. 631 * 632 * <p> 633 * 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. 634 * </p> 635 * 636 * @param companyId the company ID 637 * @param parentOrganizationId the parent organization ID 638 * @param start the lower bound of the range of organizations 639 * @param end the upper bound of the range of organizations (not inclusive) 640 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 641 * @return the ordered range of matching organizations 642 * @throws SystemException if a system exception occurred 643 */ 644 public static java.util.List<com.liferay.portal.model.Organization> findByC_P( 645 long companyId, long parentOrganizationId, int start, int end, 646 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 647 throws com.liferay.portal.kernel.exception.SystemException { 648 return getPersistence() 649 .findByC_P(companyId, parentOrganizationId, start, end, 650 orderByComparator); 651 } 652 653 /** 654 * Returns the first organization in the ordered set where companyId = ? and parentOrganizationId = ?. 655 * 656 * <p> 657 * 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. 658 * </p> 659 * 660 * @param companyId the company ID 661 * @param parentOrganizationId the parent organization ID 662 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 663 * @return the first matching organization 664 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 665 * @throws SystemException if a system exception occurred 666 */ 667 public static com.liferay.portal.model.Organization findByC_P_First( 668 long companyId, long parentOrganizationId, 669 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 670 throws com.liferay.portal.NoSuchOrganizationException, 671 com.liferay.portal.kernel.exception.SystemException { 672 return getPersistence() 673 .findByC_P_First(companyId, parentOrganizationId, 674 orderByComparator); 675 } 676 677 /** 678 * Returns the last organization in the ordered set where companyId = ? and parentOrganizationId = ?. 679 * 680 * <p> 681 * 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. 682 * </p> 683 * 684 * @param companyId the company ID 685 * @param parentOrganizationId the parent organization ID 686 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 687 * @return the last matching organization 688 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 689 * @throws SystemException if a system exception occurred 690 */ 691 public static com.liferay.portal.model.Organization findByC_P_Last( 692 long companyId, long parentOrganizationId, 693 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 694 throws com.liferay.portal.NoSuchOrganizationException, 695 com.liferay.portal.kernel.exception.SystemException { 696 return getPersistence() 697 .findByC_P_Last(companyId, parentOrganizationId, 698 orderByComparator); 699 } 700 701 /** 702 * Returns the organizations before and after the current organization in the ordered set where companyId = ? and parentOrganizationId = ?. 703 * 704 * <p> 705 * 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. 706 * </p> 707 * 708 * @param organizationId the primary key of the current organization 709 * @param companyId the company ID 710 * @param parentOrganizationId the parent organization ID 711 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 712 * @return the previous, current, and next organization 713 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 714 * @throws SystemException if a system exception occurred 715 */ 716 public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext( 717 long organizationId, long companyId, long parentOrganizationId, 718 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 719 throws com.liferay.portal.NoSuchOrganizationException, 720 com.liferay.portal.kernel.exception.SystemException { 721 return getPersistence() 722 .findByC_P_PrevAndNext(organizationId, companyId, 723 parentOrganizationId, orderByComparator); 724 } 725 726 /** 727 * Returns all the organizations that the user has permission to view where companyId = ? and parentOrganizationId = ?. 728 * 729 * @param companyId the company ID 730 * @param parentOrganizationId the parent organization ID 731 * @return the matching organizations that the user has permission to view 732 * @throws SystemException if a system exception occurred 733 */ 734 public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P( 735 long companyId, long parentOrganizationId) 736 throws com.liferay.portal.kernel.exception.SystemException { 737 return getPersistence().filterFindByC_P(companyId, parentOrganizationId); 738 } 739 740 /** 741 * Returns a range of all the organizations that the user has permission to view where companyId = ? and parentOrganizationId = ?. 742 * 743 * <p> 744 * 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. 745 * </p> 746 * 747 * @param companyId the company ID 748 * @param parentOrganizationId the parent organization ID 749 * @param start the lower bound of the range of organizations 750 * @param end the upper bound of the range of organizations (not inclusive) 751 * @return the range of matching organizations that the user has permission to view 752 * @throws SystemException if a system exception occurred 753 */ 754 public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P( 755 long companyId, long parentOrganizationId, int start, int end) 756 throws com.liferay.portal.kernel.exception.SystemException { 757 return getPersistence() 758 .filterFindByC_P(companyId, parentOrganizationId, start, end); 759 } 760 761 /** 762 * Returns an ordered range of all the organizations that the user has permissions to view where companyId = ? and parentOrganizationId = ?. 763 * 764 * <p> 765 * 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. 766 * </p> 767 * 768 * @param companyId the company ID 769 * @param parentOrganizationId the parent organization ID 770 * @param start the lower bound of the range of organizations 771 * @param end the upper bound of the range of organizations (not inclusive) 772 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 773 * @return the ordered range of matching organizations that the user has permission to view 774 * @throws SystemException if a system exception occurred 775 */ 776 public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P( 777 long companyId, long parentOrganizationId, int start, int end, 778 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 779 throws com.liferay.portal.kernel.exception.SystemException { 780 return getPersistence() 781 .filterFindByC_P(companyId, parentOrganizationId, start, 782 end, orderByComparator); 783 } 784 785 /** 786 * 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 = ?. 787 * 788 * @param organizationId the primary key of the current organization 789 * @param companyId the company ID 790 * @param parentOrganizationId the parent organization ID 791 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 792 * @return the previous, current, and next organization 793 * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found 794 * @throws SystemException if a system exception occurred 795 */ 796 public static com.liferay.portal.model.Organization[] filterFindByC_P_PrevAndNext( 797 long organizationId, long companyId, long parentOrganizationId, 798 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 799 throws com.liferay.portal.NoSuchOrganizationException, 800 com.liferay.portal.kernel.exception.SystemException { 801 return getPersistence() 802 .filterFindByC_P_PrevAndNext(organizationId, companyId, 803 parentOrganizationId, orderByComparator); 804 } 805 806 /** 807 * Returns the organization where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found. 808 * 809 * @param companyId the company ID 810 * @param name the name 811 * @return the matching organization 812 * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found 813 * @throws SystemException if a system exception occurred 814 */ 815 public static com.liferay.portal.model.Organization findByC_N( 816 long companyId, java.lang.String name) 817 throws com.liferay.portal.NoSuchOrganizationException, 818 com.liferay.portal.kernel.exception.SystemException { 819 return getPersistence().findByC_N(companyId, name); 820 } 821 822 /** 823 * Returns the organization where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 824 * 825 * @param companyId the company ID 826 * @param name the name 827 * @return the matching organization, or <code>null</code> if a matching organization could not be found 828 * @throws SystemException if a system exception occurred 829 */ 830 public static com.liferay.portal.model.Organization fetchByC_N( 831 long companyId, java.lang.String name) 832 throws com.liferay.portal.kernel.exception.SystemException { 833 return getPersistence().fetchByC_N(companyId, name); 834 } 835 836 /** 837 * Returns the organization where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 838 * 839 * @param companyId the company ID 840 * @param name the name 841 * @param retrieveFromCache whether to use the finder cache 842 * @return the matching organization, or <code>null</code> if a matching organization could not be found 843 * @throws SystemException if a system exception occurred 844 */ 845 public static com.liferay.portal.model.Organization fetchByC_N( 846 long companyId, java.lang.String name, boolean retrieveFromCache) 847 throws com.liferay.portal.kernel.exception.SystemException { 848 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 849 } 850 851 /** 852 * Returns all the organizations. 853 * 854 * @return the organizations 855 * @throws SystemException if a system exception occurred 856 */ 857 public static java.util.List<com.liferay.portal.model.Organization> findAll() 858 throws com.liferay.portal.kernel.exception.SystemException { 859 return getPersistence().findAll(); 860 } 861 862 /** 863 * Returns a range of all the organizations. 864 * 865 * <p> 866 * 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. 867 * </p> 868 * 869 * @param start the lower bound of the range of organizations 870 * @param end the upper bound of the range of organizations (not inclusive) 871 * @return the range of organizations 872 * @throws SystemException if a system exception occurred 873 */ 874 public static java.util.List<com.liferay.portal.model.Organization> findAll( 875 int start, int end) 876 throws com.liferay.portal.kernel.exception.SystemException { 877 return getPersistence().findAll(start, end); 878 } 879 880 /** 881 * Returns an ordered range of all the organizations. 882 * 883 * <p> 884 * 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. 885 * </p> 886 * 887 * @param start the lower bound of the range of organizations 888 * @param end the upper bound of the range of organizations (not inclusive) 889 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 890 * @return the ordered range of organizations 891 * @throws SystemException if a system exception occurred 892 */ 893 public static java.util.List<com.liferay.portal.model.Organization> findAll( 894 int start, int end, 895 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 896 throws com.liferay.portal.kernel.exception.SystemException { 897 return getPersistence().findAll(start, end, orderByComparator); 898 } 899 900 /** 901 * Removes all the organizations where companyId = ? from the database. 902 * 903 * @param companyId the company ID 904 * @throws SystemException if a system exception occurred 905 */ 906 public static void removeByCompanyId(long companyId) 907 throws com.liferay.portal.kernel.exception.SystemException { 908 getPersistence().removeByCompanyId(companyId); 909 } 910 911 /** 912 * Removes all the organizations where companyId = ? from the database. 913 * 914 * @param companyId the company ID 915 * @throws SystemException if a system exception occurred 916 */ 917 public static void removeByLocations(long companyId) 918 throws com.liferay.portal.kernel.exception.SystemException { 919 getPersistence().removeByLocations(companyId); 920 } 921 922 /** 923 * Removes all the organizations where companyId = ? and parentOrganizationId = ? from the database. 924 * 925 * @param companyId the company ID 926 * @param parentOrganizationId the parent organization ID 927 * @throws SystemException if a system exception occurred 928 */ 929 public static void removeByC_P(long companyId, long parentOrganizationId) 930 throws com.liferay.portal.kernel.exception.SystemException { 931 getPersistence().removeByC_P(companyId, parentOrganizationId); 932 } 933 934 /** 935 * Removes the organization where companyId = ? and name = ? from the database. 936 * 937 * @param companyId the company ID 938 * @param name the name 939 * @throws SystemException if a system exception occurred 940 */ 941 public static void removeByC_N(long companyId, java.lang.String name) 942 throws com.liferay.portal.NoSuchOrganizationException, 943 com.liferay.portal.kernel.exception.SystemException { 944 getPersistence().removeByC_N(companyId, name); 945 } 946 947 /** 948 * Removes all the organizations from the database. 949 * 950 * @throws SystemException if a system exception occurred 951 */ 952 public static void removeAll() 953 throws com.liferay.portal.kernel.exception.SystemException { 954 getPersistence().removeAll(); 955 } 956 957 /** 958 * Returns the number of organizations where companyId = ?. 959 * 960 * @param companyId the company ID 961 * @return the number of matching organizations 962 * @throws SystemException if a system exception occurred 963 */ 964 public static int countByCompanyId(long companyId) 965 throws com.liferay.portal.kernel.exception.SystemException { 966 return getPersistence().countByCompanyId(companyId); 967 } 968 969 /** 970 * Returns the number of organizations that the user has permission to view where companyId = ?. 971 * 972 * @param companyId the company ID 973 * @return the number of matching organizations that the user has permission to view 974 * @throws SystemException if a system exception occurred 975 */ 976 public static int filterCountByCompanyId(long companyId) 977 throws com.liferay.portal.kernel.exception.SystemException { 978 return getPersistence().filterCountByCompanyId(companyId); 979 } 980 981 /** 982 * Returns the number of organizations where companyId = ?. 983 * 984 * @param companyId the company ID 985 * @return the number of matching organizations 986 * @throws SystemException if a system exception occurred 987 */ 988 public static int countByLocations(long companyId) 989 throws com.liferay.portal.kernel.exception.SystemException { 990 return getPersistence().countByLocations(companyId); 991 } 992 993 /** 994 * Returns the number of organizations that the user has permission to view where companyId = ?. 995 * 996 * @param companyId the company ID 997 * @return the number of matching organizations that the user has permission to view 998 * @throws SystemException if a system exception occurred 999 */ 1000 public static int filterCountByLocations(long companyId) 1001 throws com.liferay.portal.kernel.exception.SystemException { 1002 return getPersistence().filterCountByLocations(companyId); 1003 } 1004 1005 /** 1006 * Returns the number of organizations where companyId = ? and parentOrganizationId = ?. 1007 * 1008 * @param companyId the company ID 1009 * @param parentOrganizationId the parent organization ID 1010 * @return the number of matching organizations 1011 * @throws SystemException if a system exception occurred 1012 */ 1013 public static int countByC_P(long companyId, long parentOrganizationId) 1014 throws com.liferay.portal.kernel.exception.SystemException { 1015 return getPersistence().countByC_P(companyId, parentOrganizationId); 1016 } 1017 1018 /** 1019 * Returns the number of organizations that the user has permission to view where companyId = ? and parentOrganizationId = ?. 1020 * 1021 * @param companyId the company ID 1022 * @param parentOrganizationId the parent organization ID 1023 * @return the number of matching organizations that the user has permission to view 1024 * @throws SystemException if a system exception occurred 1025 */ 1026 public static int filterCountByC_P(long companyId, long parentOrganizationId) 1027 throws com.liferay.portal.kernel.exception.SystemException { 1028 return getPersistence().filterCountByC_P(companyId, parentOrganizationId); 1029 } 1030 1031 /** 1032 * Returns the number of organizations where companyId = ? and name = ?. 1033 * 1034 * @param companyId the company ID 1035 * @param name the name 1036 * @return the number of matching organizations 1037 * @throws SystemException if a system exception occurred 1038 */ 1039 public static int countByC_N(long companyId, java.lang.String name) 1040 throws com.liferay.portal.kernel.exception.SystemException { 1041 return getPersistence().countByC_N(companyId, name); 1042 } 1043 1044 /** 1045 * Returns the number of organizations. 1046 * 1047 * @return the number of organizations 1048 * @throws SystemException if a system exception occurred 1049 */ 1050 public static int countAll() 1051 throws com.liferay.portal.kernel.exception.SystemException { 1052 return getPersistence().countAll(); 1053 } 1054 1055 /** 1056 * Returns all the groups associated with the organization. 1057 * 1058 * @param pk the primary key of the organization 1059 * @return the groups associated with the organization 1060 * @throws SystemException if a system exception occurred 1061 */ 1062 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1063 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1064 return getPersistence().getGroups(pk); 1065 } 1066 1067 /** 1068 * Returns a range of all the groups associated with the organization. 1069 * 1070 * <p> 1071 * 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. 1072 * </p> 1073 * 1074 * @param pk the primary key of the organization 1075 * @param start the lower bound of the range of organizations 1076 * @param end the upper bound of the range of organizations (not inclusive) 1077 * @return the range of groups associated with the organization 1078 * @throws SystemException if a system exception occurred 1079 */ 1080 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1081 long pk, int start, int end) 1082 throws com.liferay.portal.kernel.exception.SystemException { 1083 return getPersistence().getGroups(pk, start, end); 1084 } 1085 1086 /** 1087 * Returns an ordered range of all the groups associated with the organization. 1088 * 1089 * <p> 1090 * 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. 1091 * </p> 1092 * 1093 * @param pk the primary key of the organization 1094 * @param start the lower bound of the range of organizations 1095 * @param end the upper bound of the range of organizations (not inclusive) 1096 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1097 * @return the ordered range of groups associated with the organization 1098 * @throws SystemException if a system exception occurred 1099 */ 1100 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1101 long pk, int start, int end, 1102 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1103 throws com.liferay.portal.kernel.exception.SystemException { 1104 return getPersistence().getGroups(pk, start, end, orderByComparator); 1105 } 1106 1107 /** 1108 * Returns the number of groups associated with the organization. 1109 * 1110 * @param pk the primary key of the organization 1111 * @return the number of groups associated with the organization 1112 * @throws SystemException if a system exception occurred 1113 */ 1114 public static int getGroupsSize(long pk) 1115 throws com.liferay.portal.kernel.exception.SystemException { 1116 return getPersistence().getGroupsSize(pk); 1117 } 1118 1119 /** 1120 * Returns <code>true</code> if the group is associated with the organization. 1121 * 1122 * @param pk the primary key of the organization 1123 * @param groupPK the primary key of the group 1124 * @return <code>true</code> if the group is associated with the organization; <code>false</code> otherwise 1125 * @throws SystemException if a system exception occurred 1126 */ 1127 public static boolean containsGroup(long pk, long groupPK) 1128 throws com.liferay.portal.kernel.exception.SystemException { 1129 return getPersistence().containsGroup(pk, groupPK); 1130 } 1131 1132 /** 1133 * Returns <code>true</code> if the organization has any groups associated with it. 1134 * 1135 * @param pk the primary key of the organization to check for associations with groups 1136 * @return <code>true</code> if the organization has any groups associated with it; <code>false</code> otherwise 1137 * @throws SystemException if a system exception occurred 1138 */ 1139 public static boolean containsGroups(long pk) 1140 throws com.liferay.portal.kernel.exception.SystemException { 1141 return getPersistence().containsGroups(pk); 1142 } 1143 1144 /** 1145 * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1146 * 1147 * @param pk the primary key of the organization 1148 * @param groupPK the primary key of the group 1149 * @throws SystemException if a system exception occurred 1150 */ 1151 public static void addGroup(long pk, long groupPK) 1152 throws com.liferay.portal.kernel.exception.SystemException { 1153 getPersistence().addGroup(pk, groupPK); 1154 } 1155 1156 /** 1157 * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1158 * 1159 * @param pk the primary key of the organization 1160 * @param group the group 1161 * @throws SystemException if a system exception occurred 1162 */ 1163 public static void addGroup(long pk, com.liferay.portal.model.Group group) 1164 throws com.liferay.portal.kernel.exception.SystemException { 1165 getPersistence().addGroup(pk, group); 1166 } 1167 1168 /** 1169 * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1170 * 1171 * @param pk the primary key of the organization 1172 * @param groupPKs the primary keys of the groups 1173 * @throws SystemException if a system exception occurred 1174 */ 1175 public static void addGroups(long pk, long[] groupPKs) 1176 throws com.liferay.portal.kernel.exception.SystemException { 1177 getPersistence().addGroups(pk, groupPKs); 1178 } 1179 1180 /** 1181 * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1182 * 1183 * @param pk the primary key of the organization 1184 * @param groups the groups 1185 * @throws SystemException if a system exception occurred 1186 */ 1187 public static void addGroups(long pk, 1188 java.util.List<com.liferay.portal.model.Group> groups) 1189 throws com.liferay.portal.kernel.exception.SystemException { 1190 getPersistence().addGroups(pk, groups); 1191 } 1192 1193 /** 1194 * Clears all associations between the organization and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1195 * 1196 * @param pk the primary key of the organization to clear the associated groups from 1197 * @throws SystemException if a system exception occurred 1198 */ 1199 public static void clearGroups(long pk) 1200 throws com.liferay.portal.kernel.exception.SystemException { 1201 getPersistence().clearGroups(pk); 1202 } 1203 1204 /** 1205 * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1206 * 1207 * @param pk the primary key of the organization 1208 * @param groupPK the primary key of the group 1209 * @throws SystemException if a system exception occurred 1210 */ 1211 public static void removeGroup(long pk, long groupPK) 1212 throws com.liferay.portal.kernel.exception.SystemException { 1213 getPersistence().removeGroup(pk, groupPK); 1214 } 1215 1216 /** 1217 * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1218 * 1219 * @param pk the primary key of the organization 1220 * @param group the group 1221 * @throws SystemException if a system exception occurred 1222 */ 1223 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 1224 throws com.liferay.portal.kernel.exception.SystemException { 1225 getPersistence().removeGroup(pk, group); 1226 } 1227 1228 /** 1229 * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1230 * 1231 * @param pk the primary key of the organization 1232 * @param groupPKs the primary keys of the groups 1233 * @throws SystemException if a system exception occurred 1234 */ 1235 public static void removeGroups(long pk, long[] groupPKs) 1236 throws com.liferay.portal.kernel.exception.SystemException { 1237 getPersistence().removeGroups(pk, groupPKs); 1238 } 1239 1240 /** 1241 * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1242 * 1243 * @param pk the primary key of the organization 1244 * @param groups the groups 1245 * @throws SystemException if a system exception occurred 1246 */ 1247 public static void removeGroups(long pk, 1248 java.util.List<com.liferay.portal.model.Group> groups) 1249 throws com.liferay.portal.kernel.exception.SystemException { 1250 getPersistence().removeGroups(pk, groups); 1251 } 1252 1253 /** 1254 * 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. 1255 * 1256 * @param pk the primary key of the organization 1257 * @param groupPKs the primary keys of the groups to be associated with the organization 1258 * @throws SystemException if a system exception occurred 1259 */ 1260 public static void setGroups(long pk, long[] groupPKs) 1261 throws com.liferay.portal.kernel.exception.SystemException { 1262 getPersistence().setGroups(pk, groupPKs); 1263 } 1264 1265 /** 1266 * 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. 1267 * 1268 * @param pk the primary key of the organization 1269 * @param groups the groups to be associated with the organization 1270 * @throws SystemException if a system exception occurred 1271 */ 1272 public static void setGroups(long pk, 1273 java.util.List<com.liferay.portal.model.Group> groups) 1274 throws com.liferay.portal.kernel.exception.SystemException { 1275 getPersistence().setGroups(pk, groups); 1276 } 1277 1278 /** 1279 * Returns all the users associated with the organization. 1280 * 1281 * @param pk the primary key of the organization 1282 * @return the users associated with the organization 1283 * @throws SystemException if a system exception occurred 1284 */ 1285 public static java.util.List<com.liferay.portal.model.User> getUsers( 1286 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1287 return getPersistence().getUsers(pk); 1288 } 1289 1290 /** 1291 * Returns a range of all the users associated with the organization. 1292 * 1293 * <p> 1294 * 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. 1295 * </p> 1296 * 1297 * @param pk the primary key of the organization 1298 * @param start the lower bound of the range of organizations 1299 * @param end the upper bound of the range of organizations (not inclusive) 1300 * @return the range of users associated with the organization 1301 * @throws SystemException if a system exception occurred 1302 */ 1303 public static java.util.List<com.liferay.portal.model.User> getUsers( 1304 long pk, int start, int end) 1305 throws com.liferay.portal.kernel.exception.SystemException { 1306 return getPersistence().getUsers(pk, start, end); 1307 } 1308 1309 /** 1310 * Returns an ordered range of all the users associated with the organization. 1311 * 1312 * <p> 1313 * 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. 1314 * </p> 1315 * 1316 * @param pk the primary key of the organization 1317 * @param start the lower bound of the range of organizations 1318 * @param end the upper bound of the range of organizations (not inclusive) 1319 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1320 * @return the ordered range of users associated with the organization 1321 * @throws SystemException if a system exception occurred 1322 */ 1323 public static java.util.List<com.liferay.portal.model.User> getUsers( 1324 long pk, int start, int end, 1325 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1326 throws com.liferay.portal.kernel.exception.SystemException { 1327 return getPersistence().getUsers(pk, start, end, orderByComparator); 1328 } 1329 1330 /** 1331 * Returns the number of users associated with the organization. 1332 * 1333 * @param pk the primary key of the organization 1334 * @return the number of users associated with the organization 1335 * @throws SystemException if a system exception occurred 1336 */ 1337 public static int getUsersSize(long pk) 1338 throws com.liferay.portal.kernel.exception.SystemException { 1339 return getPersistence().getUsersSize(pk); 1340 } 1341 1342 /** 1343 * Returns <code>true</code> if the user is associated with the organization. 1344 * 1345 * @param pk the primary key of the organization 1346 * @param userPK the primary key of the user 1347 * @return <code>true</code> if the user is associated with the organization; <code>false</code> otherwise 1348 * @throws SystemException if a system exception occurred 1349 */ 1350 public static boolean containsUser(long pk, long userPK) 1351 throws com.liferay.portal.kernel.exception.SystemException { 1352 return getPersistence().containsUser(pk, userPK); 1353 } 1354 1355 /** 1356 * Returns <code>true</code> if the organization has any users associated with it. 1357 * 1358 * @param pk the primary key of the organization to check for associations with users 1359 * @return <code>true</code> if the organization has any users associated with it; <code>false</code> otherwise 1360 * @throws SystemException if a system exception occurred 1361 */ 1362 public static boolean containsUsers(long pk) 1363 throws com.liferay.portal.kernel.exception.SystemException { 1364 return getPersistence().containsUsers(pk); 1365 } 1366 1367 /** 1368 * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1369 * 1370 * @param pk the primary key of the organization 1371 * @param userPK the primary key of the user 1372 * @throws SystemException if a system exception occurred 1373 */ 1374 public static void addUser(long pk, long userPK) 1375 throws com.liferay.portal.kernel.exception.SystemException { 1376 getPersistence().addUser(pk, userPK); 1377 } 1378 1379 /** 1380 * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1381 * 1382 * @param pk the primary key of the organization 1383 * @param user the user 1384 * @throws SystemException if a system exception occurred 1385 */ 1386 public static void addUser(long pk, com.liferay.portal.model.User user) 1387 throws com.liferay.portal.kernel.exception.SystemException { 1388 getPersistence().addUser(pk, user); 1389 } 1390 1391 /** 1392 * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1393 * 1394 * @param pk the primary key of the organization 1395 * @param userPKs the primary keys of the users 1396 * @throws SystemException if a system exception occurred 1397 */ 1398 public static void addUsers(long pk, long[] userPKs) 1399 throws com.liferay.portal.kernel.exception.SystemException { 1400 getPersistence().addUsers(pk, userPKs); 1401 } 1402 1403 /** 1404 * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1405 * 1406 * @param pk the primary key of the organization 1407 * @param users the users 1408 * @throws SystemException if a system exception occurred 1409 */ 1410 public static void addUsers(long pk, 1411 java.util.List<com.liferay.portal.model.User> users) 1412 throws com.liferay.portal.kernel.exception.SystemException { 1413 getPersistence().addUsers(pk, users); 1414 } 1415 1416 /** 1417 * Clears all associations between the organization and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1418 * 1419 * @param pk the primary key of the organization to clear the associated users from 1420 * @throws SystemException if a system exception occurred 1421 */ 1422 public static void clearUsers(long pk) 1423 throws com.liferay.portal.kernel.exception.SystemException { 1424 getPersistence().clearUsers(pk); 1425 } 1426 1427 /** 1428 * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1429 * 1430 * @param pk the primary key of the organization 1431 * @param userPK the primary key of the user 1432 * @throws SystemException if a system exception occurred 1433 */ 1434 public static void removeUser(long pk, long userPK) 1435 throws com.liferay.portal.kernel.exception.SystemException { 1436 getPersistence().removeUser(pk, userPK); 1437 } 1438 1439 /** 1440 * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1441 * 1442 * @param pk the primary key of the organization 1443 * @param user the user 1444 * @throws SystemException if a system exception occurred 1445 */ 1446 public static void removeUser(long pk, com.liferay.portal.model.User user) 1447 throws com.liferay.portal.kernel.exception.SystemException { 1448 getPersistence().removeUser(pk, user); 1449 } 1450 1451 /** 1452 * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1453 * 1454 * @param pk the primary key of the organization 1455 * @param userPKs the primary keys of the users 1456 * @throws SystemException if a system exception occurred 1457 */ 1458 public static void removeUsers(long pk, long[] userPKs) 1459 throws com.liferay.portal.kernel.exception.SystemException { 1460 getPersistence().removeUsers(pk, userPKs); 1461 } 1462 1463 /** 1464 * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1465 * 1466 * @param pk the primary key of the organization 1467 * @param users the users 1468 * @throws SystemException if a system exception occurred 1469 */ 1470 public static void removeUsers(long pk, 1471 java.util.List<com.liferay.portal.model.User> users) 1472 throws com.liferay.portal.kernel.exception.SystemException { 1473 getPersistence().removeUsers(pk, users); 1474 } 1475 1476 /** 1477 * 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. 1478 * 1479 * @param pk the primary key of the organization 1480 * @param userPKs the primary keys of the users to be associated with the organization 1481 * @throws SystemException if a system exception occurred 1482 */ 1483 public static void setUsers(long pk, long[] userPKs) 1484 throws com.liferay.portal.kernel.exception.SystemException { 1485 getPersistence().setUsers(pk, userPKs); 1486 } 1487 1488 /** 1489 * 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. 1490 * 1491 * @param pk the primary key of the organization 1492 * @param users the users to be associated with the organization 1493 * @throws SystemException if a system exception occurred 1494 */ 1495 public static void setUsers(long pk, 1496 java.util.List<com.liferay.portal.model.User> users) 1497 throws com.liferay.portal.kernel.exception.SystemException { 1498 getPersistence().setUsers(pk, users); 1499 } 1500 1501 public static OrganizationPersistence getPersistence() { 1502 if (_persistence == null) { 1503 _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName()); 1504 1505 ReferenceRegistry.registerReference(OrganizationUtil.class, 1506 "_persistence"); 1507 } 1508 1509 return _persistence; 1510 } 1511 1512 public void setPersistence(OrganizationPersistence persistence) { 1513 _persistence = persistence; 1514 1515 ReferenceRegistry.registerReference(OrganizationUtil.class, 1516 "_persistence"); 1517 } 1518 1519 private static OrganizationPersistence _persistence; 1520 }