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