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