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