001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.Address; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the address service. This utility wraps {@link AddressPersistenceImpl} 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 AddressPersistence 036 * @see AddressPersistenceImpl 037 * @generated 038 */ 039 public class AddressUtil { 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(Address address) { 057 getPersistence().clearCache(address); 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<Address> findWithDynamicQuery(DynamicQuery dynamicQuery) 072 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<Address> 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<Address> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 098 */ 099 public static Address update(Address address, boolean merge) 100 throws SystemException { 101 return getPersistence().update(address, merge); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 106 */ 107 public static Address update(Address address, boolean merge, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(address, merge, serviceContext); 110 } 111 112 /** 113 * Caches the address in the entity cache if it is enabled. 114 * 115 * @param address the address 116 */ 117 public static void cacheResult(com.liferay.portal.model.Address address) { 118 getPersistence().cacheResult(address); 119 } 120 121 /** 122 * Caches the addresses in the entity cache if it is enabled. 123 * 124 * @param addresses the addresses 125 */ 126 public static void cacheResult( 127 java.util.List<com.liferay.portal.model.Address> addresses) { 128 getPersistence().cacheResult(addresses); 129 } 130 131 /** 132 * Creates a new address with the primary key. Does not add the address to the database. 133 * 134 * @param addressId the primary key for the new address 135 * @return the new address 136 */ 137 public static com.liferay.portal.model.Address create(long addressId) { 138 return getPersistence().create(addressId); 139 } 140 141 /** 142 * Removes the address with the primary key from the database. Also notifies the appropriate model listeners. 143 * 144 * @param addressId the primary key of the address 145 * @return the address that was removed 146 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 147 * @throws SystemException if a system exception occurred 148 */ 149 public static com.liferay.portal.model.Address remove(long addressId) 150 throws com.liferay.portal.NoSuchAddressException, 151 com.liferay.portal.kernel.exception.SystemException { 152 return getPersistence().remove(addressId); 153 } 154 155 public static com.liferay.portal.model.Address updateImpl( 156 com.liferay.portal.model.Address address, boolean merge) 157 throws com.liferay.portal.kernel.exception.SystemException { 158 return getPersistence().updateImpl(address, merge); 159 } 160 161 /** 162 * Returns the address with the primary key or throws a {@link com.liferay.portal.NoSuchAddressException} if it could not be found. 163 * 164 * @param addressId the primary key of the address 165 * @return the address 166 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 167 * @throws SystemException if a system exception occurred 168 */ 169 public static com.liferay.portal.model.Address findByPrimaryKey( 170 long addressId) 171 throws com.liferay.portal.NoSuchAddressException, 172 com.liferay.portal.kernel.exception.SystemException { 173 return getPersistence().findByPrimaryKey(addressId); 174 } 175 176 /** 177 * Returns the address with the primary key or returns <code>null</code> if it could not be found. 178 * 179 * @param addressId the primary key of the address 180 * @return the address, or <code>null</code> if a address with the primary key could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public static com.liferay.portal.model.Address fetchByPrimaryKey( 184 long addressId) 185 throws com.liferay.portal.kernel.exception.SystemException { 186 return getPersistence().fetchByPrimaryKey(addressId); 187 } 188 189 /** 190 * Returns all the addresses where companyId = ?. 191 * 192 * @param companyId the company ID 193 * @return the matching addresses 194 * @throws SystemException if a system exception occurred 195 */ 196 public static java.util.List<com.liferay.portal.model.Address> findByCompanyId( 197 long companyId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().findByCompanyId(companyId); 200 } 201 202 /** 203 * Returns a range of all the addresses where companyId = ?. 204 * 205 * <p> 206 * 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. 207 * </p> 208 * 209 * @param companyId the company ID 210 * @param start the lower bound of the range of addresses 211 * @param end the upper bound of the range of addresses (not inclusive) 212 * @return the range of matching addresses 213 * @throws SystemException if a system exception occurred 214 */ 215 public static java.util.List<com.liferay.portal.model.Address> findByCompanyId( 216 long companyId, int start, int end) 217 throws com.liferay.portal.kernel.exception.SystemException { 218 return getPersistence().findByCompanyId(companyId, start, end); 219 } 220 221 /** 222 * Returns an ordered range of all the addresses where companyId = ?. 223 * 224 * <p> 225 * 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. 226 * </p> 227 * 228 * @param companyId the company ID 229 * @param start the lower bound of the range of addresses 230 * @param end the upper bound of the range of addresses (not inclusive) 231 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 232 * @return the ordered range of matching addresses 233 * @throws SystemException if a system exception occurred 234 */ 235 public static java.util.List<com.liferay.portal.model.Address> findByCompanyId( 236 long companyId, int start, int end, 237 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 238 throws com.liferay.portal.kernel.exception.SystemException { 239 return getPersistence() 240 .findByCompanyId(companyId, start, end, orderByComparator); 241 } 242 243 /** 244 * Returns the first address in the ordered set where companyId = ?. 245 * 246 * @param companyId the company ID 247 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 248 * @return the first matching address 249 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 250 * @throws SystemException if a system exception occurred 251 */ 252 public static com.liferay.portal.model.Address findByCompanyId_First( 253 long companyId, 254 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 255 throws com.liferay.portal.NoSuchAddressException, 256 com.liferay.portal.kernel.exception.SystemException { 257 return getPersistence() 258 .findByCompanyId_First(companyId, orderByComparator); 259 } 260 261 /** 262 * Returns the first address in the ordered set where companyId = ?. 263 * 264 * @param companyId the company ID 265 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 266 * @return the first matching address, or <code>null</code> if a matching address could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public static com.liferay.portal.model.Address fetchByCompanyId_First( 270 long companyId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.kernel.exception.SystemException { 273 return getPersistence() 274 .fetchByCompanyId_First(companyId, orderByComparator); 275 } 276 277 /** 278 * Returns the last address in the ordered set where companyId = ?. 279 * 280 * @param companyId the company ID 281 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 282 * @return the last matching address 283 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.Address findByCompanyId_Last( 287 long companyId, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.NoSuchAddressException, 290 com.liferay.portal.kernel.exception.SystemException { 291 return getPersistence() 292 .findByCompanyId_Last(companyId, orderByComparator); 293 } 294 295 /** 296 * Returns the last address in the ordered set where companyId = ?. 297 * 298 * @param companyId the company ID 299 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 300 * @return the last matching address, or <code>null</code> if a matching address could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public static com.liferay.portal.model.Address fetchByCompanyId_Last( 304 long companyId, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence() 308 .fetchByCompanyId_Last(companyId, orderByComparator); 309 } 310 311 /** 312 * Returns the addresses before and after the current address in the ordered set where companyId = ?. 313 * 314 * @param addressId the primary key of the current address 315 * @param companyId the company ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next address 318 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext( 322 long addressId, long companyId, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.NoSuchAddressException, 325 com.liferay.portal.kernel.exception.SystemException { 326 return getPersistence() 327 .findByCompanyId_PrevAndNext(addressId, companyId, 328 orderByComparator); 329 } 330 331 /** 332 * Returns all the addresses where userId = ?. 333 * 334 * @param userId the user ID 335 * @return the matching addresses 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portal.model.Address> findByUserId( 339 long userId) throws com.liferay.portal.kernel.exception.SystemException { 340 return getPersistence().findByUserId(userId); 341 } 342 343 /** 344 * Returns a range of all the addresses where userId = ?. 345 * 346 * <p> 347 * 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. 348 * </p> 349 * 350 * @param userId the user ID 351 * @param start the lower bound of the range of addresses 352 * @param end the upper bound of the range of addresses (not inclusive) 353 * @return the range of matching addresses 354 * @throws SystemException if a system exception occurred 355 */ 356 public static java.util.List<com.liferay.portal.model.Address> findByUserId( 357 long userId, int start, int end) 358 throws com.liferay.portal.kernel.exception.SystemException { 359 return getPersistence().findByUserId(userId, start, end); 360 } 361 362 /** 363 * Returns an ordered range of all the addresses where userId = ?. 364 * 365 * <p> 366 * 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. 367 * </p> 368 * 369 * @param userId the user ID 370 * @param start the lower bound of the range of addresses 371 * @param end the upper bound of the range of addresses (not inclusive) 372 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 373 * @return the ordered range of matching addresses 374 * @throws SystemException if a system exception occurred 375 */ 376 public static java.util.List<com.liferay.portal.model.Address> findByUserId( 377 long userId, int start, int end, 378 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 379 throws com.liferay.portal.kernel.exception.SystemException { 380 return getPersistence() 381 .findByUserId(userId, start, end, orderByComparator); 382 } 383 384 /** 385 * Returns the first address in the ordered set where userId = ?. 386 * 387 * @param userId the user ID 388 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 389 * @return the first matching address 390 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 391 * @throws SystemException if a system exception occurred 392 */ 393 public static com.liferay.portal.model.Address findByUserId_First( 394 long userId, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.NoSuchAddressException, 397 com.liferay.portal.kernel.exception.SystemException { 398 return getPersistence().findByUserId_First(userId, orderByComparator); 399 } 400 401 /** 402 * Returns the first address in the ordered set where userId = ?. 403 * 404 * @param userId the user ID 405 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 406 * @return the first matching address, or <code>null</code> if a matching address could not be found 407 * @throws SystemException if a system exception occurred 408 */ 409 public static com.liferay.portal.model.Address fetchByUserId_First( 410 long userId, 411 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getPersistence().fetchByUserId_First(userId, orderByComparator); 414 } 415 416 /** 417 * Returns the last address in the ordered set where userId = ?. 418 * 419 * @param userId the user ID 420 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 421 * @return the last matching address 422 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 423 * @throws SystemException if a system exception occurred 424 */ 425 public static com.liferay.portal.model.Address findByUserId_Last( 426 long userId, 427 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 428 throws com.liferay.portal.NoSuchAddressException, 429 com.liferay.portal.kernel.exception.SystemException { 430 return getPersistence().findByUserId_Last(userId, orderByComparator); 431 } 432 433 /** 434 * Returns the last address in the ordered set where userId = ?. 435 * 436 * @param userId the user ID 437 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 438 * @return the last matching address, or <code>null</code> if a matching address could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portal.model.Address fetchByUserId_Last( 442 long userId, 443 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 444 throws com.liferay.portal.kernel.exception.SystemException { 445 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 446 } 447 448 /** 449 * Returns the addresses before and after the current address in the ordered set where userId = ?. 450 * 451 * @param addressId the primary key of the current address 452 * @param userId the user ID 453 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 454 * @return the previous, current, and next address 455 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 456 * @throws SystemException if a system exception occurred 457 */ 458 public static com.liferay.portal.model.Address[] findByUserId_PrevAndNext( 459 long addressId, long userId, 460 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 461 throws com.liferay.portal.NoSuchAddressException, 462 com.liferay.portal.kernel.exception.SystemException { 463 return getPersistence() 464 .findByUserId_PrevAndNext(addressId, userId, 465 orderByComparator); 466 } 467 468 /** 469 * Returns all the addresses where companyId = ? and classNameId = ?. 470 * 471 * @param companyId the company ID 472 * @param classNameId the class name ID 473 * @return the matching addresses 474 * @throws SystemException if a system exception occurred 475 */ 476 public static java.util.List<com.liferay.portal.model.Address> findByC_C( 477 long companyId, long classNameId) 478 throws com.liferay.portal.kernel.exception.SystemException { 479 return getPersistence().findByC_C(companyId, classNameId); 480 } 481 482 /** 483 * Returns a range of all the addresses where companyId = ? and classNameId = ?. 484 * 485 * <p> 486 * 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. 487 * </p> 488 * 489 * @param companyId the company ID 490 * @param classNameId the class name ID 491 * @param start the lower bound of the range of addresses 492 * @param end the upper bound of the range of addresses (not inclusive) 493 * @return the range of matching addresses 494 * @throws SystemException if a system exception occurred 495 */ 496 public static java.util.List<com.liferay.portal.model.Address> findByC_C( 497 long companyId, long classNameId, int start, int end) 498 throws com.liferay.portal.kernel.exception.SystemException { 499 return getPersistence().findByC_C(companyId, classNameId, start, end); 500 } 501 502 /** 503 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ?. 504 * 505 * <p> 506 * 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. 507 * </p> 508 * 509 * @param companyId the company ID 510 * @param classNameId the class name ID 511 * @param start the lower bound of the range of addresses 512 * @param end the upper bound of the range of addresses (not inclusive) 513 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 514 * @return the ordered range of matching addresses 515 * @throws SystemException if a system exception occurred 516 */ 517 public static java.util.List<com.liferay.portal.model.Address> findByC_C( 518 long companyId, long classNameId, int start, int end, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.kernel.exception.SystemException { 521 return getPersistence() 522 .findByC_C(companyId, classNameId, start, end, 523 orderByComparator); 524 } 525 526 /** 527 * Returns the first address in the ordered set where companyId = ? and classNameId = ?. 528 * 529 * @param companyId the company ID 530 * @param classNameId the class name ID 531 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 532 * @return the first matching address 533 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 534 * @throws SystemException if a system exception occurred 535 */ 536 public static com.liferay.portal.model.Address findByC_C_First( 537 long companyId, long classNameId, 538 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 539 throws com.liferay.portal.NoSuchAddressException, 540 com.liferay.portal.kernel.exception.SystemException { 541 return getPersistence() 542 .findByC_C_First(companyId, classNameId, orderByComparator); 543 } 544 545 /** 546 * Returns the first address in the ordered set where companyId = ? and classNameId = ?. 547 * 548 * @param companyId the company ID 549 * @param classNameId the class name ID 550 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 551 * @return the first matching address, or <code>null</code> if a matching address could not be found 552 * @throws SystemException if a system exception occurred 553 */ 554 public static com.liferay.portal.model.Address fetchByC_C_First( 555 long companyId, long classNameId, 556 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 557 throws com.liferay.portal.kernel.exception.SystemException { 558 return getPersistence() 559 .fetchByC_C_First(companyId, classNameId, orderByComparator); 560 } 561 562 /** 563 * Returns the last address in the ordered set where companyId = ? and classNameId = ?. 564 * 565 * @param companyId the company ID 566 * @param classNameId the class name ID 567 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 568 * @return the last matching address 569 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 570 * @throws SystemException if a system exception occurred 571 */ 572 public static com.liferay.portal.model.Address findByC_C_Last( 573 long companyId, long classNameId, 574 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 575 throws com.liferay.portal.NoSuchAddressException, 576 com.liferay.portal.kernel.exception.SystemException { 577 return getPersistence() 578 .findByC_C_Last(companyId, classNameId, orderByComparator); 579 } 580 581 /** 582 * Returns the last address in the ordered set where companyId = ? and classNameId = ?. 583 * 584 * @param companyId the company ID 585 * @param classNameId the class name ID 586 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 587 * @return the last matching address, or <code>null</code> if a matching address could not be found 588 * @throws SystemException if a system exception occurred 589 */ 590 public static com.liferay.portal.model.Address fetchByC_C_Last( 591 long companyId, long classNameId, 592 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 593 throws com.liferay.portal.kernel.exception.SystemException { 594 return getPersistence() 595 .fetchByC_C_Last(companyId, classNameId, orderByComparator); 596 } 597 598 /** 599 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ?. 600 * 601 * @param addressId the primary key of the current address 602 * @param companyId the company ID 603 * @param classNameId the class name ID 604 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 605 * @return the previous, current, and next address 606 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 607 * @throws SystemException if a system exception occurred 608 */ 609 public static com.liferay.portal.model.Address[] findByC_C_PrevAndNext( 610 long addressId, long companyId, long classNameId, 611 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 612 throws com.liferay.portal.NoSuchAddressException, 613 com.liferay.portal.kernel.exception.SystemException { 614 return getPersistence() 615 .findByC_C_PrevAndNext(addressId, companyId, classNameId, 616 orderByComparator); 617 } 618 619 /** 620 * Returns all the addresses where companyId = ? and classNameId = ? and classPK = ?. 621 * 622 * @param companyId the company ID 623 * @param classNameId the class name ID 624 * @param classPK the class p k 625 * @return the matching addresses 626 * @throws SystemException if a system exception occurred 627 */ 628 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C( 629 long companyId, long classNameId, long classPK) 630 throws com.liferay.portal.kernel.exception.SystemException { 631 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 632 } 633 634 /** 635 * Returns a range of all the addresses where companyId = ? and classNameId = ? and classPK = ?. 636 * 637 * <p> 638 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 639 * </p> 640 * 641 * @param companyId the company ID 642 * @param classNameId the class name ID 643 * @param classPK the class p k 644 * @param start the lower bound of the range of addresses 645 * @param end the upper bound of the range of addresses (not inclusive) 646 * @return the range of matching addresses 647 * @throws SystemException if a system exception occurred 648 */ 649 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C( 650 long companyId, long classNameId, long classPK, int start, int end) 651 throws com.liferay.portal.kernel.exception.SystemException { 652 return getPersistence() 653 .findByC_C_C(companyId, classNameId, classPK, start, end); 654 } 655 656 /** 657 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ? and classPK = ?. 658 * 659 * <p> 660 * 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. 661 * </p> 662 * 663 * @param companyId the company ID 664 * @param classNameId the class name ID 665 * @param classPK the class p k 666 * @param start the lower bound of the range of addresses 667 * @param end the upper bound of the range of addresses (not inclusive) 668 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 669 * @return the ordered range of matching addresses 670 * @throws SystemException if a system exception occurred 671 */ 672 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C( 673 long companyId, long classNameId, long classPK, int start, int end, 674 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 675 throws com.liferay.portal.kernel.exception.SystemException { 676 return getPersistence() 677 .findByC_C_C(companyId, classNameId, classPK, start, end, 678 orderByComparator); 679 } 680 681 /** 682 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 683 * 684 * @param companyId the company ID 685 * @param classNameId the class name ID 686 * @param classPK the class p k 687 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 688 * @return the first matching address 689 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 690 * @throws SystemException if a system exception occurred 691 */ 692 public static com.liferay.portal.model.Address findByC_C_C_First( 693 long companyId, long classNameId, long classPK, 694 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 695 throws com.liferay.portal.NoSuchAddressException, 696 com.liferay.portal.kernel.exception.SystemException { 697 return getPersistence() 698 .findByC_C_C_First(companyId, classNameId, classPK, 699 orderByComparator); 700 } 701 702 /** 703 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 704 * 705 * @param companyId the company ID 706 * @param classNameId the class name ID 707 * @param classPK the class p k 708 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 709 * @return the first matching address, or <code>null</code> if a matching address could not be found 710 * @throws SystemException if a system exception occurred 711 */ 712 public static com.liferay.portal.model.Address fetchByC_C_C_First( 713 long companyId, long classNameId, long classPK, 714 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 715 throws com.liferay.portal.kernel.exception.SystemException { 716 return getPersistence() 717 .fetchByC_C_C_First(companyId, classNameId, classPK, 718 orderByComparator); 719 } 720 721 /** 722 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 723 * 724 * @param companyId the company ID 725 * @param classNameId the class name ID 726 * @param classPK the class p k 727 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 728 * @return the last matching address 729 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 730 * @throws SystemException if a system exception occurred 731 */ 732 public static com.liferay.portal.model.Address findByC_C_C_Last( 733 long companyId, long classNameId, long classPK, 734 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 735 throws com.liferay.portal.NoSuchAddressException, 736 com.liferay.portal.kernel.exception.SystemException { 737 return getPersistence() 738 .findByC_C_C_Last(companyId, classNameId, classPK, 739 orderByComparator); 740 } 741 742 /** 743 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 744 * 745 * @param companyId the company ID 746 * @param classNameId the class name ID 747 * @param classPK the class p k 748 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 749 * @return the last matching address, or <code>null</code> if a matching address could not be found 750 * @throws SystemException if a system exception occurred 751 */ 752 public static com.liferay.portal.model.Address fetchByC_C_C_Last( 753 long companyId, long classNameId, long classPK, 754 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 755 throws com.liferay.portal.kernel.exception.SystemException { 756 return getPersistence() 757 .fetchByC_C_C_Last(companyId, classNameId, classPK, 758 orderByComparator); 759 } 760 761 /** 762 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 763 * 764 * @param addressId the primary key of the current address 765 * @param companyId the company ID 766 * @param classNameId the class name ID 767 * @param classPK the class p k 768 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 769 * @return the previous, current, and next address 770 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 771 * @throws SystemException if a system exception occurred 772 */ 773 public static com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext( 774 long addressId, long companyId, long classNameId, long classPK, 775 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 776 throws com.liferay.portal.NoSuchAddressException, 777 com.liferay.portal.kernel.exception.SystemException { 778 return getPersistence() 779 .findByC_C_C_PrevAndNext(addressId, companyId, classNameId, 780 classPK, orderByComparator); 781 } 782 783 /** 784 * Returns all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 785 * 786 * @param companyId the company ID 787 * @param classNameId the class name ID 788 * @param classPK the class p k 789 * @param mailing the mailing 790 * @return the matching addresses 791 * @throws SystemException if a system exception occurred 792 */ 793 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M( 794 long companyId, long classNameId, long classPK, boolean mailing) 795 throws com.liferay.portal.kernel.exception.SystemException { 796 return getPersistence() 797 .findByC_C_C_M(companyId, classNameId, classPK, mailing); 798 } 799 800 /** 801 * Returns a range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 802 * 803 * <p> 804 * 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. 805 * </p> 806 * 807 * @param companyId the company ID 808 * @param classNameId the class name ID 809 * @param classPK the class p k 810 * @param mailing the mailing 811 * @param start the lower bound of the range of addresses 812 * @param end the upper bound of the range of addresses (not inclusive) 813 * @return the range of matching addresses 814 * @throws SystemException if a system exception occurred 815 */ 816 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M( 817 long companyId, long classNameId, long classPK, boolean mailing, 818 int start, int end) 819 throws com.liferay.portal.kernel.exception.SystemException { 820 return getPersistence() 821 .findByC_C_C_M(companyId, classNameId, classPK, mailing, 822 start, end); 823 } 824 825 /** 826 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 827 * 828 * <p> 829 * 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. 830 * </p> 831 * 832 * @param companyId the company ID 833 * @param classNameId the class name ID 834 * @param classPK the class p k 835 * @param mailing the mailing 836 * @param start the lower bound of the range of addresses 837 * @param end the upper bound of the range of addresses (not inclusive) 838 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 839 * @return the ordered range of matching addresses 840 * @throws SystemException if a system exception occurred 841 */ 842 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_M( 843 long companyId, long classNameId, long classPK, boolean mailing, 844 int start, int end, 845 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 846 throws com.liferay.portal.kernel.exception.SystemException { 847 return getPersistence() 848 .findByC_C_C_M(companyId, classNameId, classPK, mailing, 849 start, end, orderByComparator); 850 } 851 852 /** 853 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 854 * 855 * @param companyId the company ID 856 * @param classNameId the class name ID 857 * @param classPK the class p k 858 * @param mailing the mailing 859 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 860 * @return the first matching address 861 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 862 * @throws SystemException if a system exception occurred 863 */ 864 public static com.liferay.portal.model.Address findByC_C_C_M_First( 865 long companyId, long classNameId, long classPK, boolean mailing, 866 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 867 throws com.liferay.portal.NoSuchAddressException, 868 com.liferay.portal.kernel.exception.SystemException { 869 return getPersistence() 870 .findByC_C_C_M_First(companyId, classNameId, classPK, 871 mailing, orderByComparator); 872 } 873 874 /** 875 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 876 * 877 * @param companyId the company ID 878 * @param classNameId the class name ID 879 * @param classPK the class p k 880 * @param mailing the mailing 881 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 882 * @return the first matching address, or <code>null</code> if a matching address could not be found 883 * @throws SystemException if a system exception occurred 884 */ 885 public static com.liferay.portal.model.Address fetchByC_C_C_M_First( 886 long companyId, long classNameId, long classPK, boolean mailing, 887 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 888 throws com.liferay.portal.kernel.exception.SystemException { 889 return getPersistence() 890 .fetchByC_C_C_M_First(companyId, classNameId, classPK, 891 mailing, orderByComparator); 892 } 893 894 /** 895 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 896 * 897 * @param companyId the company ID 898 * @param classNameId the class name ID 899 * @param classPK the class p k 900 * @param mailing the mailing 901 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 902 * @return the last matching address 903 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 904 * @throws SystemException if a system exception occurred 905 */ 906 public static com.liferay.portal.model.Address findByC_C_C_M_Last( 907 long companyId, long classNameId, long classPK, boolean mailing, 908 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 909 throws com.liferay.portal.NoSuchAddressException, 910 com.liferay.portal.kernel.exception.SystemException { 911 return getPersistence() 912 .findByC_C_C_M_Last(companyId, classNameId, classPK, 913 mailing, orderByComparator); 914 } 915 916 /** 917 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 918 * 919 * @param companyId the company ID 920 * @param classNameId the class name ID 921 * @param classPK the class p k 922 * @param mailing the mailing 923 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 924 * @return the last matching address, or <code>null</code> if a matching address could not be found 925 * @throws SystemException if a system exception occurred 926 */ 927 public static com.liferay.portal.model.Address fetchByC_C_C_M_Last( 928 long companyId, long classNameId, long classPK, boolean mailing, 929 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 930 throws com.liferay.portal.kernel.exception.SystemException { 931 return getPersistence() 932 .fetchByC_C_C_M_Last(companyId, classNameId, classPK, 933 mailing, orderByComparator); 934 } 935 936 /** 937 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 938 * 939 * @param addressId the primary key of the current address 940 * @param companyId the company ID 941 * @param classNameId the class name ID 942 * @param classPK the class p k 943 * @param mailing the mailing 944 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 945 * @return the previous, current, and next address 946 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 947 * @throws SystemException if a system exception occurred 948 */ 949 public static com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext( 950 long addressId, long companyId, long classNameId, long classPK, 951 boolean mailing, 952 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 953 throws com.liferay.portal.NoSuchAddressException, 954 com.liferay.portal.kernel.exception.SystemException { 955 return getPersistence() 956 .findByC_C_C_M_PrevAndNext(addressId, companyId, 957 classNameId, classPK, mailing, orderByComparator); 958 } 959 960 /** 961 * Returns all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 962 * 963 * @param companyId the company ID 964 * @param classNameId the class name ID 965 * @param classPK the class p k 966 * @param primary the primary 967 * @return the matching addresses 968 * @throws SystemException if a system exception occurred 969 */ 970 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P( 971 long companyId, long classNameId, long classPK, boolean primary) 972 throws com.liferay.portal.kernel.exception.SystemException { 973 return getPersistence() 974 .findByC_C_C_P(companyId, classNameId, classPK, primary); 975 } 976 977 /** 978 * Returns a range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 979 * 980 * <p> 981 * 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. 982 * </p> 983 * 984 * @param companyId the company ID 985 * @param classNameId the class name ID 986 * @param classPK the class p k 987 * @param primary the primary 988 * @param start the lower bound of the range of addresses 989 * @param end the upper bound of the range of addresses (not inclusive) 990 * @return the range of matching addresses 991 * @throws SystemException if a system exception occurred 992 */ 993 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P( 994 long companyId, long classNameId, long classPK, boolean primary, 995 int start, int end) 996 throws com.liferay.portal.kernel.exception.SystemException { 997 return getPersistence() 998 .findByC_C_C_P(companyId, classNameId, classPK, primary, 999 start, end); 1000 } 1001 1002 /** 1003 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1004 * 1005 * <p> 1006 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 1007 * </p> 1008 * 1009 * @param companyId the company ID 1010 * @param classNameId the class name ID 1011 * @param classPK the class p k 1012 * @param primary the primary 1013 * @param start the lower bound of the range of addresses 1014 * @param end the upper bound of the range of addresses (not inclusive) 1015 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1016 * @return the ordered range of matching addresses 1017 * @throws SystemException if a system exception occurred 1018 */ 1019 public static java.util.List<com.liferay.portal.model.Address> findByC_C_C_P( 1020 long companyId, long classNameId, long classPK, boolean primary, 1021 int start, int end, 1022 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1023 throws com.liferay.portal.kernel.exception.SystemException { 1024 return getPersistence() 1025 .findByC_C_C_P(companyId, classNameId, classPK, primary, 1026 start, end, orderByComparator); 1027 } 1028 1029 /** 1030 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1031 * 1032 * @param companyId the company ID 1033 * @param classNameId the class name ID 1034 * @param classPK the class p k 1035 * @param primary the primary 1036 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1037 * @return the first matching address 1038 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 1039 * @throws SystemException if a system exception occurred 1040 */ 1041 public static com.liferay.portal.model.Address findByC_C_C_P_First( 1042 long companyId, long classNameId, long classPK, boolean primary, 1043 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1044 throws com.liferay.portal.NoSuchAddressException, 1045 com.liferay.portal.kernel.exception.SystemException { 1046 return getPersistence() 1047 .findByC_C_C_P_First(companyId, classNameId, classPK, 1048 primary, orderByComparator); 1049 } 1050 1051 /** 1052 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1053 * 1054 * @param companyId the company ID 1055 * @param classNameId the class name ID 1056 * @param classPK the class p k 1057 * @param primary the primary 1058 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1059 * @return the first matching address, or <code>null</code> if a matching address could not be found 1060 * @throws SystemException if a system exception occurred 1061 */ 1062 public static com.liferay.portal.model.Address fetchByC_C_C_P_First( 1063 long companyId, long classNameId, long classPK, boolean primary, 1064 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1065 throws com.liferay.portal.kernel.exception.SystemException { 1066 return getPersistence() 1067 .fetchByC_C_C_P_First(companyId, classNameId, classPK, 1068 primary, orderByComparator); 1069 } 1070 1071 /** 1072 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1073 * 1074 * @param companyId the company ID 1075 * @param classNameId the class name ID 1076 * @param classPK the class p k 1077 * @param primary the primary 1078 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1079 * @return the last matching address 1080 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 1081 * @throws SystemException if a system exception occurred 1082 */ 1083 public static com.liferay.portal.model.Address findByC_C_C_P_Last( 1084 long companyId, long classNameId, long classPK, boolean primary, 1085 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1086 throws com.liferay.portal.NoSuchAddressException, 1087 com.liferay.portal.kernel.exception.SystemException { 1088 return getPersistence() 1089 .findByC_C_C_P_Last(companyId, classNameId, classPK, 1090 primary, orderByComparator); 1091 } 1092 1093 /** 1094 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1095 * 1096 * @param companyId the company ID 1097 * @param classNameId the class name ID 1098 * @param classPK the class p k 1099 * @param primary the primary 1100 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1101 * @return the last matching address, or <code>null</code> if a matching address could not be found 1102 * @throws SystemException if a system exception occurred 1103 */ 1104 public static com.liferay.portal.model.Address fetchByC_C_C_P_Last( 1105 long companyId, long classNameId, long classPK, boolean primary, 1106 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1107 throws com.liferay.portal.kernel.exception.SystemException { 1108 return getPersistence() 1109 .fetchByC_C_C_P_Last(companyId, classNameId, classPK, 1110 primary, orderByComparator); 1111 } 1112 1113 /** 1114 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1115 * 1116 * @param addressId the primary key of the current address 1117 * @param companyId the company ID 1118 * @param classNameId the class name ID 1119 * @param classPK the class p k 1120 * @param primary the primary 1121 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1122 * @return the previous, current, and next address 1123 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 1124 * @throws SystemException if a system exception occurred 1125 */ 1126 public static com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext( 1127 long addressId, long companyId, long classNameId, long classPK, 1128 boolean primary, 1129 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1130 throws com.liferay.portal.NoSuchAddressException, 1131 com.liferay.portal.kernel.exception.SystemException { 1132 return getPersistence() 1133 .findByC_C_C_P_PrevAndNext(addressId, companyId, 1134 classNameId, classPK, primary, orderByComparator); 1135 } 1136 1137 /** 1138 * Returns all the addresses. 1139 * 1140 * @return the addresses 1141 * @throws SystemException if a system exception occurred 1142 */ 1143 public static java.util.List<com.liferay.portal.model.Address> findAll() 1144 throws com.liferay.portal.kernel.exception.SystemException { 1145 return getPersistence().findAll(); 1146 } 1147 1148 /** 1149 * Returns a range of all the addresses. 1150 * 1151 * <p> 1152 * 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. 1153 * </p> 1154 * 1155 * @param start the lower bound of the range of addresses 1156 * @param end the upper bound of the range of addresses (not inclusive) 1157 * @return the range of addresses 1158 * @throws SystemException if a system exception occurred 1159 */ 1160 public static java.util.List<com.liferay.portal.model.Address> findAll( 1161 int start, int end) 1162 throws com.liferay.portal.kernel.exception.SystemException { 1163 return getPersistence().findAll(start, end); 1164 } 1165 1166 /** 1167 * Returns an ordered range of all the addresses. 1168 * 1169 * <p> 1170 * 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. 1171 * </p> 1172 * 1173 * @param start the lower bound of the range of addresses 1174 * @param end the upper bound of the range of addresses (not inclusive) 1175 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1176 * @return the ordered range of addresses 1177 * @throws SystemException if a system exception occurred 1178 */ 1179 public static java.util.List<com.liferay.portal.model.Address> findAll( 1180 int start, int end, 1181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1182 throws com.liferay.portal.kernel.exception.SystemException { 1183 return getPersistence().findAll(start, end, orderByComparator); 1184 } 1185 1186 /** 1187 * Removes all the addresses where companyId = ? from the database. 1188 * 1189 * @param companyId the company ID 1190 * @throws SystemException if a system exception occurred 1191 */ 1192 public static void removeByCompanyId(long companyId) 1193 throws com.liferay.portal.kernel.exception.SystemException { 1194 getPersistence().removeByCompanyId(companyId); 1195 } 1196 1197 /** 1198 * Removes all the addresses where userId = ? from the database. 1199 * 1200 * @param userId the user ID 1201 * @throws SystemException if a system exception occurred 1202 */ 1203 public static void removeByUserId(long userId) 1204 throws com.liferay.portal.kernel.exception.SystemException { 1205 getPersistence().removeByUserId(userId); 1206 } 1207 1208 /** 1209 * Removes all the addresses where companyId = ? and classNameId = ? from the database. 1210 * 1211 * @param companyId the company ID 1212 * @param classNameId the class name ID 1213 * @throws SystemException if a system exception occurred 1214 */ 1215 public static void removeByC_C(long companyId, long classNameId) 1216 throws com.liferay.portal.kernel.exception.SystemException { 1217 getPersistence().removeByC_C(companyId, classNameId); 1218 } 1219 1220 /** 1221 * Removes all the addresses where companyId = ? and classNameId = ? and classPK = ? from the database. 1222 * 1223 * @param companyId the company ID 1224 * @param classNameId the class name ID 1225 * @param classPK the class p k 1226 * @throws SystemException if a system exception occurred 1227 */ 1228 public static void removeByC_C_C(long companyId, long classNameId, 1229 long classPK) 1230 throws com.liferay.portal.kernel.exception.SystemException { 1231 getPersistence().removeByC_C_C(companyId, classNameId, classPK); 1232 } 1233 1234 /** 1235 * Removes all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ? from the database. 1236 * 1237 * @param companyId the company ID 1238 * @param classNameId the class name ID 1239 * @param classPK the class p k 1240 * @param mailing the mailing 1241 * @throws SystemException if a system exception occurred 1242 */ 1243 public static void removeByC_C_C_M(long companyId, long classNameId, 1244 long classPK, boolean mailing) 1245 throws com.liferay.portal.kernel.exception.SystemException { 1246 getPersistence() 1247 .removeByC_C_C_M(companyId, classNameId, classPK, mailing); 1248 } 1249 1250 /** 1251 * Removes all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ? from the database. 1252 * 1253 * @param companyId the company ID 1254 * @param classNameId the class name ID 1255 * @param classPK the class p k 1256 * @param primary the primary 1257 * @throws SystemException if a system exception occurred 1258 */ 1259 public static void removeByC_C_C_P(long companyId, long classNameId, 1260 long classPK, boolean primary) 1261 throws com.liferay.portal.kernel.exception.SystemException { 1262 getPersistence() 1263 .removeByC_C_C_P(companyId, classNameId, classPK, primary); 1264 } 1265 1266 /** 1267 * Removes all the addresses from the database. 1268 * 1269 * @throws SystemException if a system exception occurred 1270 */ 1271 public static void removeAll() 1272 throws com.liferay.portal.kernel.exception.SystemException { 1273 getPersistence().removeAll(); 1274 } 1275 1276 /** 1277 * Returns the number of addresses where companyId = ?. 1278 * 1279 * @param companyId the company ID 1280 * @return the number of matching addresses 1281 * @throws SystemException if a system exception occurred 1282 */ 1283 public static int countByCompanyId(long companyId) 1284 throws com.liferay.portal.kernel.exception.SystemException { 1285 return getPersistence().countByCompanyId(companyId); 1286 } 1287 1288 /** 1289 * Returns the number of addresses where userId = ?. 1290 * 1291 * @param userId the user ID 1292 * @return the number of matching addresses 1293 * @throws SystemException if a system exception occurred 1294 */ 1295 public static int countByUserId(long userId) 1296 throws com.liferay.portal.kernel.exception.SystemException { 1297 return getPersistence().countByUserId(userId); 1298 } 1299 1300 /** 1301 * Returns the number of addresses where companyId = ? and classNameId = ?. 1302 * 1303 * @param companyId the company ID 1304 * @param classNameId the class name ID 1305 * @return the number of matching addresses 1306 * @throws SystemException if a system exception occurred 1307 */ 1308 public static int countByC_C(long companyId, long classNameId) 1309 throws com.liferay.portal.kernel.exception.SystemException { 1310 return getPersistence().countByC_C(companyId, classNameId); 1311 } 1312 1313 /** 1314 * Returns the number of addresses where companyId = ? and classNameId = ? and classPK = ?. 1315 * 1316 * @param companyId the company ID 1317 * @param classNameId the class name ID 1318 * @param classPK the class p k 1319 * @return the number of matching addresses 1320 * @throws SystemException if a system exception occurred 1321 */ 1322 public static int countByC_C_C(long companyId, long classNameId, 1323 long classPK) 1324 throws com.liferay.portal.kernel.exception.SystemException { 1325 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 1326 } 1327 1328 /** 1329 * Returns the number of addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 1330 * 1331 * @param companyId the company ID 1332 * @param classNameId the class name ID 1333 * @param classPK the class p k 1334 * @param mailing the mailing 1335 * @return the number of matching addresses 1336 * @throws SystemException if a system exception occurred 1337 */ 1338 public static int countByC_C_C_M(long companyId, long classNameId, 1339 long classPK, boolean mailing) 1340 throws com.liferay.portal.kernel.exception.SystemException { 1341 return getPersistence() 1342 .countByC_C_C_M(companyId, classNameId, classPK, mailing); 1343 } 1344 1345 /** 1346 * Returns the number of addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1347 * 1348 * @param companyId the company ID 1349 * @param classNameId the class name ID 1350 * @param classPK the class p k 1351 * @param primary the primary 1352 * @return the number of matching addresses 1353 * @throws SystemException if a system exception occurred 1354 */ 1355 public static int countByC_C_C_P(long companyId, long classNameId, 1356 long classPK, boolean primary) 1357 throws com.liferay.portal.kernel.exception.SystemException { 1358 return getPersistence() 1359 .countByC_C_C_P(companyId, classNameId, classPK, primary); 1360 } 1361 1362 /** 1363 * Returns the number of addresses. 1364 * 1365 * @return the number of addresses 1366 * @throws SystemException if a system exception occurred 1367 */ 1368 public static int countAll() 1369 throws com.liferay.portal.kernel.exception.SystemException { 1370 return getPersistence().countAll(); 1371 } 1372 1373 public static AddressPersistence getPersistence() { 1374 if (_persistence == null) { 1375 _persistence = (AddressPersistence)PortalBeanLocatorUtil.locate(AddressPersistence.class.getName()); 1376 1377 ReferenceRegistry.registerReference(AddressUtil.class, 1378 "_persistence"); 1379 } 1380 1381 return _persistence; 1382 } 1383 1384 /** 1385 * @deprecated 1386 */ 1387 public void setPersistence(AddressPersistence persistence) { 1388 } 1389 1390 private static AddressPersistence _persistence; 1391 }