001 /** 002 * Copyright (c) 2000-2012 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.model.Address; 018 019 /** 020 * The persistence interface for the address service. 021 * 022 * <p> 023 * Caching information and settings can be found in <code>portal.properties</code> 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see AddressPersistenceImpl 028 * @see AddressUtil 029 * @generated 030 */ 031 public interface AddressPersistence extends BasePersistence<Address> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * Never modify or reference this interface directly. Always use {@link AddressUtil} to access the address persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 036 */ 037 038 /** 039 * Caches the address in the entity cache if it is enabled. 040 * 041 * @param address the address 042 */ 043 public void cacheResult(com.liferay.portal.model.Address address); 044 045 /** 046 * Caches the addresses in the entity cache if it is enabled. 047 * 048 * @param addresses the addresses 049 */ 050 public void cacheResult( 051 java.util.List<com.liferay.portal.model.Address> addresses); 052 053 /** 054 * Creates a new address with the primary key. Does not add the address to the database. 055 * 056 * @param addressId the primary key for the new address 057 * @return the new address 058 */ 059 public com.liferay.portal.model.Address create(long addressId); 060 061 /** 062 * Removes the address with the primary key from the database. Also notifies the appropriate model listeners. 063 * 064 * @param addressId the primary key of the address 065 * @return the address that was removed 066 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 067 * @throws SystemException if a system exception occurred 068 */ 069 public com.liferay.portal.model.Address remove(long addressId) 070 throws com.liferay.portal.NoSuchAddressException, 071 com.liferay.portal.kernel.exception.SystemException; 072 073 public com.liferay.portal.model.Address updateImpl( 074 com.liferay.portal.model.Address address, boolean merge) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Returns the address with the primary key or throws a {@link com.liferay.portal.NoSuchAddressException} if it could not be found. 079 * 080 * @param addressId the primary key of the address 081 * @return the address 082 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portal.model.Address findByPrimaryKey(long addressId) 086 throws com.liferay.portal.NoSuchAddressException, 087 com.liferay.portal.kernel.exception.SystemException; 088 089 /** 090 * Returns the address with the primary key or returns <code>null</code> if it could not be found. 091 * 092 * @param addressId the primary key of the address 093 * @return the address, or <code>null</code> if a address with the primary key could not be found 094 * @throws SystemException if a system exception occurred 095 */ 096 public com.liferay.portal.model.Address fetchByPrimaryKey(long addressId) 097 throws com.liferay.portal.kernel.exception.SystemException; 098 099 /** 100 * Returns all the addresses where companyId = ?. 101 * 102 * @param companyId the company ID 103 * @return the matching addresses 104 * @throws SystemException if a system exception occurred 105 */ 106 public java.util.List<com.liferay.portal.model.Address> findByCompanyId( 107 long companyId) 108 throws com.liferay.portal.kernel.exception.SystemException; 109 110 /** 111 * Returns a range of all the addresses where companyId = ?. 112 * 113 * <p> 114 * 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. 115 * </p> 116 * 117 * @param companyId the company ID 118 * @param start the lower bound of the range of addresses 119 * @param end the upper bound of the range of addresses (not inclusive) 120 * @return the range of matching addresses 121 * @throws SystemException if a system exception occurred 122 */ 123 public java.util.List<com.liferay.portal.model.Address> findByCompanyId( 124 long companyId, int start, int end) 125 throws com.liferay.portal.kernel.exception.SystemException; 126 127 /** 128 * Returns an ordered range of all the addresses where companyId = ?. 129 * 130 * <p> 131 * 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. 132 * </p> 133 * 134 * @param companyId the company ID 135 * @param start the lower bound of the range of addresses 136 * @param end the upper bound of the range of addresses (not inclusive) 137 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 138 * @return the ordered range of matching addresses 139 * @throws SystemException if a system exception occurred 140 */ 141 public java.util.List<com.liferay.portal.model.Address> findByCompanyId( 142 long companyId, int start, int end, 143 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 144 throws com.liferay.portal.kernel.exception.SystemException; 145 146 /** 147 * Returns the first address in the ordered set where companyId = ?. 148 * 149 * <p> 150 * 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. 151 * </p> 152 * 153 * @param companyId the company ID 154 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 155 * @return the first matching address 156 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 157 * @throws SystemException if a system exception occurred 158 */ 159 public com.liferay.portal.model.Address findByCompanyId_First( 160 long companyId, 161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 162 throws com.liferay.portal.NoSuchAddressException, 163 com.liferay.portal.kernel.exception.SystemException; 164 165 /** 166 * Returns the last address in the ordered set where companyId = ?. 167 * 168 * <p> 169 * 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. 170 * </p> 171 * 172 * @param companyId the company ID 173 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 174 * @return the last matching address 175 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 176 * @throws SystemException if a system exception occurred 177 */ 178 public com.liferay.portal.model.Address findByCompanyId_Last( 179 long companyId, 180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 181 throws com.liferay.portal.NoSuchAddressException, 182 com.liferay.portal.kernel.exception.SystemException; 183 184 /** 185 * Returns the addresses before and after the current address in the ordered set where companyId = ?. 186 * 187 * <p> 188 * 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. 189 * </p> 190 * 191 * @param addressId the primary key of the current address 192 * @param companyId the company ID 193 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 194 * @return the previous, current, and next address 195 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 196 * @throws SystemException if a system exception occurred 197 */ 198 public com.liferay.portal.model.Address[] findByCompanyId_PrevAndNext( 199 long addressId, long companyId, 200 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 201 throws com.liferay.portal.NoSuchAddressException, 202 com.liferay.portal.kernel.exception.SystemException; 203 204 /** 205 * Returns all the addresses where userId = ?. 206 * 207 * @param userId the user ID 208 * @return the matching addresses 209 * @throws SystemException if a system exception occurred 210 */ 211 public java.util.List<com.liferay.portal.model.Address> findByUserId( 212 long userId) throws com.liferay.portal.kernel.exception.SystemException; 213 214 /** 215 * Returns a range of all the addresses where userId = ?. 216 * 217 * <p> 218 * 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. 219 * </p> 220 * 221 * @param userId the user ID 222 * @param start the lower bound of the range of addresses 223 * @param end the upper bound of the range of addresses (not inclusive) 224 * @return the range of matching addresses 225 * @throws SystemException if a system exception occurred 226 */ 227 public java.util.List<com.liferay.portal.model.Address> findByUserId( 228 long userId, int start, int end) 229 throws com.liferay.portal.kernel.exception.SystemException; 230 231 /** 232 * Returns an ordered range of all the addresses where userId = ?. 233 * 234 * <p> 235 * 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. 236 * </p> 237 * 238 * @param userId the user ID 239 * @param start the lower bound of the range of addresses 240 * @param end the upper bound of the range of addresses (not inclusive) 241 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 242 * @return the ordered range of matching addresses 243 * @throws SystemException if a system exception occurred 244 */ 245 public java.util.List<com.liferay.portal.model.Address> findByUserId( 246 long userId, int start, int end, 247 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Returns the first address in the ordered set where userId = ?. 252 * 253 * <p> 254 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 255 * </p> 256 * 257 * @param userId the user ID 258 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 259 * @return the first matching address 260 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 261 * @throws SystemException if a system exception occurred 262 */ 263 public com.liferay.portal.model.Address findByUserId_First(long userId, 264 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 265 throws com.liferay.portal.NoSuchAddressException, 266 com.liferay.portal.kernel.exception.SystemException; 267 268 /** 269 * Returns the last address in the ordered set where userId = ?. 270 * 271 * <p> 272 * 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. 273 * </p> 274 * 275 * @param userId the user ID 276 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 277 * @return the last matching address 278 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 279 * @throws SystemException if a system exception occurred 280 */ 281 public com.liferay.portal.model.Address findByUserId_Last(long userId, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchAddressException, 284 com.liferay.portal.kernel.exception.SystemException; 285 286 /** 287 * Returns the addresses before and after the current address in the ordered set where userId = ?. 288 * 289 * <p> 290 * 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. 291 * </p> 292 * 293 * @param addressId the primary key of the current address 294 * @param userId the user ID 295 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 296 * @return the previous, current, and next address 297 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 298 * @throws SystemException if a system exception occurred 299 */ 300 public com.liferay.portal.model.Address[] findByUserId_PrevAndNext( 301 long addressId, long userId, 302 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 303 throws com.liferay.portal.NoSuchAddressException, 304 com.liferay.portal.kernel.exception.SystemException; 305 306 /** 307 * Returns all the addresses where companyId = ? and classNameId = ?. 308 * 309 * @param companyId the company ID 310 * @param classNameId the class name ID 311 * @return the matching addresses 312 * @throws SystemException if a system exception occurred 313 */ 314 public java.util.List<com.liferay.portal.model.Address> findByC_C( 315 long companyId, long classNameId) 316 throws com.liferay.portal.kernel.exception.SystemException; 317 318 /** 319 * Returns a range of all the addresses where companyId = ? and classNameId = ?. 320 * 321 * <p> 322 * 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. 323 * </p> 324 * 325 * @param companyId the company ID 326 * @param classNameId the class name ID 327 * @param start the lower bound of the range of addresses 328 * @param end the upper bound of the range of addresses (not inclusive) 329 * @return the range of matching addresses 330 * @throws SystemException if a system exception occurred 331 */ 332 public java.util.List<com.liferay.portal.model.Address> findByC_C( 333 long companyId, long classNameId, int start, int end) 334 throws com.liferay.portal.kernel.exception.SystemException; 335 336 /** 337 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ?. 338 * 339 * <p> 340 * 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. 341 * </p> 342 * 343 * @param companyId the company ID 344 * @param classNameId the class name ID 345 * @param start the lower bound of the range of addresses 346 * @param end the upper bound of the range of addresses (not inclusive) 347 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 348 * @return the ordered range of matching addresses 349 * @throws SystemException if a system exception occurred 350 */ 351 public java.util.List<com.liferay.portal.model.Address> findByC_C( 352 long companyId, long classNameId, int start, int end, 353 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 354 throws com.liferay.portal.kernel.exception.SystemException; 355 356 /** 357 * Returns the first address in the ordered set where companyId = ? and classNameId = ?. 358 * 359 * <p> 360 * 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. 361 * </p> 362 * 363 * @param companyId the company ID 364 * @param classNameId the class name ID 365 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 366 * @return the first 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 com.liferay.portal.model.Address findByC_C_First(long companyId, 371 long classNameId, 372 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 373 throws com.liferay.portal.NoSuchAddressException, 374 com.liferay.portal.kernel.exception.SystemException; 375 376 /** 377 * Returns the last address in the ordered set where companyId = ? and classNameId = ?. 378 * 379 * <p> 380 * 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. 381 * </p> 382 * 383 * @param companyId the company ID 384 * @param classNameId the class name ID 385 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 386 * @return the last matching address 387 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 388 * @throws SystemException if a system exception occurred 389 */ 390 public com.liferay.portal.model.Address findByC_C_Last(long companyId, 391 long classNameId, 392 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 393 throws com.liferay.portal.NoSuchAddressException, 394 com.liferay.portal.kernel.exception.SystemException; 395 396 /** 397 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ?. 398 * 399 * <p> 400 * 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. 401 * </p> 402 * 403 * @param addressId the primary key of the current address 404 * @param companyId the company ID 405 * @param classNameId the class name ID 406 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 407 * @return the previous, current, and next address 408 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 409 * @throws SystemException if a system exception occurred 410 */ 411 public com.liferay.portal.model.Address[] findByC_C_PrevAndNext( 412 long addressId, long companyId, long classNameId, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.NoSuchAddressException, 415 com.liferay.portal.kernel.exception.SystemException; 416 417 /** 418 * Returns all the addresses where companyId = ? and classNameId = ? and classPK = ?. 419 * 420 * @param companyId the company ID 421 * @param classNameId the class name ID 422 * @param classPK the class p k 423 * @return the matching addresses 424 * @throws SystemException if a system exception occurred 425 */ 426 public java.util.List<com.liferay.portal.model.Address> findByC_C_C( 427 long companyId, long classNameId, long classPK) 428 throws com.liferay.portal.kernel.exception.SystemException; 429 430 /** 431 * Returns a range of all the addresses where companyId = ? and classNameId = ? and classPK = ?. 432 * 433 * <p> 434 * 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. 435 * </p> 436 * 437 * @param companyId the company ID 438 * @param classNameId the class name ID 439 * @param classPK the class p k 440 * @param start the lower bound of the range of addresses 441 * @param end the upper bound of the range of addresses (not inclusive) 442 * @return the range of matching addresses 443 * @throws SystemException if a system exception occurred 444 */ 445 public java.util.List<com.liferay.portal.model.Address> findByC_C_C( 446 long companyId, long classNameId, long classPK, int start, int end) 447 throws com.liferay.portal.kernel.exception.SystemException; 448 449 /** 450 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ? and classPK = ?. 451 * 452 * <p> 453 * 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. 454 * </p> 455 * 456 * @param companyId the company ID 457 * @param classNameId the class name ID 458 * @param classPK the class p k 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 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 462 * @return the ordered range of matching addresses 463 * @throws SystemException if a system exception occurred 464 */ 465 public java.util.List<com.liferay.portal.model.Address> findByC_C_C( 466 long companyId, long classNameId, long classPK, int start, int end, 467 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 468 throws com.liferay.portal.kernel.exception.SystemException; 469 470 /** 471 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 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. 475 * </p> 476 * 477 * @param companyId the company ID 478 * @param classNameId the class name ID 479 * @param classPK the class p k 480 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 481 * @return the first matching address 482 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 483 * @throws SystemException if a system exception occurred 484 */ 485 public com.liferay.portal.model.Address findByC_C_C_First(long companyId, 486 long classNameId, long classPK, 487 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 488 throws com.liferay.portal.NoSuchAddressException, 489 com.liferay.portal.kernel.exception.SystemException; 490 491 /** 492 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 493 * 494 * <p> 495 * 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. 496 * </p> 497 * 498 * @param companyId the company ID 499 * @param classNameId the class name ID 500 * @param classPK the class p k 501 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 502 * @return the last 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 com.liferay.portal.model.Address findByC_C_C_Last(long companyId, 507 long classNameId, long classPK, 508 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 509 throws com.liferay.portal.NoSuchAddressException, 510 com.liferay.portal.kernel.exception.SystemException; 511 512 /** 513 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 514 * 515 * <p> 516 * 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. 517 * </p> 518 * 519 * @param addressId the primary key of the current address 520 * @param companyId the company ID 521 * @param classNameId the class name ID 522 * @param classPK the class p k 523 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 524 * @return the previous, current, and next address 525 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 526 * @throws SystemException if a system exception occurred 527 */ 528 public com.liferay.portal.model.Address[] findByC_C_C_PrevAndNext( 529 long addressId, long companyId, long classNameId, long classPK, 530 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 531 throws com.liferay.portal.NoSuchAddressException, 532 com.liferay.portal.kernel.exception.SystemException; 533 534 /** 535 * Returns all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 536 * 537 * @param companyId the company ID 538 * @param classNameId the class name ID 539 * @param classPK the class p k 540 * @param mailing the mailing 541 * @return the matching addresses 542 * @throws SystemException if a system exception occurred 543 */ 544 public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M( 545 long companyId, long classNameId, long classPK, boolean mailing) 546 throws com.liferay.portal.kernel.exception.SystemException; 547 548 /** 549 * Returns a range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 550 * 551 * <p> 552 * 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. 553 * </p> 554 * 555 * @param companyId the company ID 556 * @param classNameId the class name ID 557 * @param classPK the class p k 558 * @param mailing the mailing 559 * @param start the lower bound of the range of addresses 560 * @param end the upper bound of the range of addresses (not inclusive) 561 * @return the range of matching addresses 562 * @throws SystemException if a system exception occurred 563 */ 564 public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M( 565 long companyId, long classNameId, long classPK, boolean mailing, 566 int start, int end) 567 throws com.liferay.portal.kernel.exception.SystemException; 568 569 /** 570 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 571 * 572 * <p> 573 * 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. 574 * </p> 575 * 576 * @param companyId the company ID 577 * @param classNameId the class name ID 578 * @param classPK the class p k 579 * @param mailing the mailing 580 * @param start the lower bound of the range of addresses 581 * @param end the upper bound of the range of addresses (not inclusive) 582 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 583 * @return the ordered range of matching addresses 584 * @throws SystemException if a system exception occurred 585 */ 586 public java.util.List<com.liferay.portal.model.Address> findByC_C_C_M( 587 long companyId, long classNameId, long classPK, boolean mailing, 588 int start, int end, 589 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 590 throws com.liferay.portal.kernel.exception.SystemException; 591 592 /** 593 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 594 * 595 * <p> 596 * 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. 597 * </p> 598 * 599 * @param companyId the company ID 600 * @param classNameId the class name ID 601 * @param classPK the class p k 602 * @param mailing the mailing 603 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 604 * @return the first matching address 605 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 606 * @throws SystemException if a system exception occurred 607 */ 608 public com.liferay.portal.model.Address findByC_C_C_M_First( 609 long companyId, long classNameId, long classPK, boolean mailing, 610 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 611 throws com.liferay.portal.NoSuchAddressException, 612 com.liferay.portal.kernel.exception.SystemException; 613 614 /** 615 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 616 * 617 * <p> 618 * 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. 619 * </p> 620 * 621 * @param companyId the company ID 622 * @param classNameId the class name ID 623 * @param classPK the class p k 624 * @param mailing the mailing 625 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 626 * @return the last matching address 627 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 628 * @throws SystemException if a system exception occurred 629 */ 630 public com.liferay.portal.model.Address findByC_C_C_M_Last(long companyId, 631 long classNameId, long classPK, boolean mailing, 632 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 633 throws com.liferay.portal.NoSuchAddressException, 634 com.liferay.portal.kernel.exception.SystemException; 635 636 /** 637 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 638 * 639 * <p> 640 * 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. 641 * </p> 642 * 643 * @param addressId the primary key of the current address 644 * @param companyId the company ID 645 * @param classNameId the class name ID 646 * @param classPK the class p k 647 * @param mailing the mailing 648 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 649 * @return the previous, current, and next address 650 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 651 * @throws SystemException if a system exception occurred 652 */ 653 public com.liferay.portal.model.Address[] findByC_C_C_M_PrevAndNext( 654 long addressId, long companyId, long classNameId, long classPK, 655 boolean mailing, 656 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 657 throws com.liferay.portal.NoSuchAddressException, 658 com.liferay.portal.kernel.exception.SystemException; 659 660 /** 661 * Returns all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 662 * 663 * @param companyId the company ID 664 * @param classNameId the class name ID 665 * @param classPK the class p k 666 * @param primary the primary 667 * @return the matching addresses 668 * @throws SystemException if a system exception occurred 669 */ 670 public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P( 671 long companyId, long classNameId, long classPK, boolean primary) 672 throws com.liferay.portal.kernel.exception.SystemException; 673 674 /** 675 * Returns a range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 676 * 677 * <p> 678 * 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. 679 * </p> 680 * 681 * @param companyId the company ID 682 * @param classNameId the class name ID 683 * @param classPK the class p k 684 * @param primary the primary 685 * @param start the lower bound of the range of addresses 686 * @param end the upper bound of the range of addresses (not inclusive) 687 * @return the range of matching addresses 688 * @throws SystemException if a system exception occurred 689 */ 690 public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P( 691 long companyId, long classNameId, long classPK, boolean primary, 692 int start, int end) 693 throws com.liferay.portal.kernel.exception.SystemException; 694 695 /** 696 * Returns an ordered range of all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 697 * 698 * <p> 699 * 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. 700 * </p> 701 * 702 * @param companyId the company ID 703 * @param classNameId the class name ID 704 * @param classPK the class p k 705 * @param primary the primary 706 * @param start the lower bound of the range of addresses 707 * @param end the upper bound of the range of addresses (not inclusive) 708 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 709 * @return the ordered range of matching addresses 710 * @throws SystemException if a system exception occurred 711 */ 712 public java.util.List<com.liferay.portal.model.Address> findByC_C_C_P( 713 long companyId, long classNameId, long classPK, boolean primary, 714 int start, int end, 715 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 716 throws com.liferay.portal.kernel.exception.SystemException; 717 718 /** 719 * Returns the first address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 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 726 * @param classNameId the class name ID 727 * @param classPK the class p k 728 * @param primary the primary 729 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 730 * @return the first matching address 731 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 732 * @throws SystemException if a system exception occurred 733 */ 734 public com.liferay.portal.model.Address findByC_C_C_P_First( 735 long companyId, long classNameId, long classPK, boolean primary, 736 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 737 throws com.liferay.portal.NoSuchAddressException, 738 com.liferay.portal.kernel.exception.SystemException; 739 740 /** 741 * Returns the last address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 742 * 743 * <p> 744 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 745 * </p> 746 * 747 * @param companyId the company ID 748 * @param classNameId the class name ID 749 * @param classPK the class p k 750 * @param primary the primary 751 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 752 * @return the last matching address 753 * @throws com.liferay.portal.NoSuchAddressException if a matching address could not be found 754 * @throws SystemException if a system exception occurred 755 */ 756 public com.liferay.portal.model.Address findByC_C_C_P_Last(long companyId, 757 long classNameId, long classPK, boolean primary, 758 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 759 throws com.liferay.portal.NoSuchAddressException, 760 com.liferay.portal.kernel.exception.SystemException; 761 762 /** 763 * Returns the addresses before and after the current address in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 764 * 765 * <p> 766 * 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. 767 * </p> 768 * 769 * @param addressId the primary key of the current address 770 * @param companyId the company ID 771 * @param classNameId the class name ID 772 * @param classPK the class p k 773 * @param primary the primary 774 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 775 * @return the previous, current, and next address 776 * @throws com.liferay.portal.NoSuchAddressException if a address with the primary key could not be found 777 * @throws SystemException if a system exception occurred 778 */ 779 public com.liferay.portal.model.Address[] findByC_C_C_P_PrevAndNext( 780 long addressId, long companyId, long classNameId, long classPK, 781 boolean primary, 782 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 783 throws com.liferay.portal.NoSuchAddressException, 784 com.liferay.portal.kernel.exception.SystemException; 785 786 /** 787 * Returns all the addresses. 788 * 789 * @return the addresses 790 * @throws SystemException if a system exception occurred 791 */ 792 public java.util.List<com.liferay.portal.model.Address> findAll() 793 throws com.liferay.portal.kernel.exception.SystemException; 794 795 /** 796 * Returns a range of all the addresses. 797 * 798 * <p> 799 * 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. 800 * </p> 801 * 802 * @param start the lower bound of the range of addresses 803 * @param end the upper bound of the range of addresses (not inclusive) 804 * @return the range of addresses 805 * @throws SystemException if a system exception occurred 806 */ 807 public java.util.List<com.liferay.portal.model.Address> findAll(int start, 808 int end) throws com.liferay.portal.kernel.exception.SystemException; 809 810 /** 811 * Returns an ordered range of all the addresses. 812 * 813 * <p> 814 * 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. 815 * </p> 816 * 817 * @param start the lower bound of the range of addresses 818 * @param end the upper bound of the range of addresses (not inclusive) 819 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 820 * @return the ordered range of addresses 821 * @throws SystemException if a system exception occurred 822 */ 823 public java.util.List<com.liferay.portal.model.Address> findAll(int start, 824 int end, 825 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 826 throws com.liferay.portal.kernel.exception.SystemException; 827 828 /** 829 * Removes all the addresses where companyId = ? from the database. 830 * 831 * @param companyId the company ID 832 * @throws SystemException if a system exception occurred 833 */ 834 public void removeByCompanyId(long companyId) 835 throws com.liferay.portal.kernel.exception.SystemException; 836 837 /** 838 * Removes all the addresses where userId = ? from the database. 839 * 840 * @param userId the user ID 841 * @throws SystemException if a system exception occurred 842 */ 843 public void removeByUserId(long userId) 844 throws com.liferay.portal.kernel.exception.SystemException; 845 846 /** 847 * Removes all the addresses where companyId = ? and classNameId = ? from the database. 848 * 849 * @param companyId the company ID 850 * @param classNameId the class name ID 851 * @throws SystemException if a system exception occurred 852 */ 853 public void removeByC_C(long companyId, long classNameId) 854 throws com.liferay.portal.kernel.exception.SystemException; 855 856 /** 857 * Removes all the addresses where companyId = ? and classNameId = ? and classPK = ? from the database. 858 * 859 * @param companyId the company ID 860 * @param classNameId the class name ID 861 * @param classPK the class p k 862 * @throws SystemException if a system exception occurred 863 */ 864 public void removeByC_C_C(long companyId, long classNameId, long classPK) 865 throws com.liferay.portal.kernel.exception.SystemException; 866 867 /** 868 * Removes all the addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ? from the database. 869 * 870 * @param companyId the company ID 871 * @param classNameId the class name ID 872 * @param classPK the class p k 873 * @param mailing the mailing 874 * @throws SystemException if a system exception occurred 875 */ 876 public void removeByC_C_C_M(long companyId, long classNameId, long classPK, 877 boolean mailing) 878 throws com.liferay.portal.kernel.exception.SystemException; 879 880 /** 881 * Removes all the addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ? from the database. 882 * 883 * @param companyId the company ID 884 * @param classNameId the class name ID 885 * @param classPK the class p k 886 * @param primary the primary 887 * @throws SystemException if a system exception occurred 888 */ 889 public void removeByC_C_C_P(long companyId, long classNameId, long classPK, 890 boolean primary) 891 throws com.liferay.portal.kernel.exception.SystemException; 892 893 /** 894 * Removes all the addresses from the database. 895 * 896 * @throws SystemException if a system exception occurred 897 */ 898 public void removeAll() 899 throws com.liferay.portal.kernel.exception.SystemException; 900 901 /** 902 * Returns the number of addresses where companyId = ?. 903 * 904 * @param companyId the company ID 905 * @return the number of matching addresses 906 * @throws SystemException if a system exception occurred 907 */ 908 public int countByCompanyId(long companyId) 909 throws com.liferay.portal.kernel.exception.SystemException; 910 911 /** 912 * Returns the number of addresses where userId = ?. 913 * 914 * @param userId the user ID 915 * @return the number of matching addresses 916 * @throws SystemException if a system exception occurred 917 */ 918 public int countByUserId(long userId) 919 throws com.liferay.portal.kernel.exception.SystemException; 920 921 /** 922 * Returns the number of addresses where companyId = ? and classNameId = ?. 923 * 924 * @param companyId the company ID 925 * @param classNameId the class name ID 926 * @return the number of matching addresses 927 * @throws SystemException if a system exception occurred 928 */ 929 public int countByC_C(long companyId, long classNameId) 930 throws com.liferay.portal.kernel.exception.SystemException; 931 932 /** 933 * Returns the number of addresses where companyId = ? and classNameId = ? and classPK = ?. 934 * 935 * @param companyId the company ID 936 * @param classNameId the class name ID 937 * @param classPK the class p k 938 * @return the number of matching addresses 939 * @throws SystemException if a system exception occurred 940 */ 941 public int countByC_C_C(long companyId, long classNameId, long classPK) 942 throws com.liferay.portal.kernel.exception.SystemException; 943 944 /** 945 * Returns the number of addresses where companyId = ? and classNameId = ? and classPK = ? and mailing = ?. 946 * 947 * @param companyId the company ID 948 * @param classNameId the class name ID 949 * @param classPK the class p k 950 * @param mailing the mailing 951 * @return the number of matching addresses 952 * @throws SystemException if a system exception occurred 953 */ 954 public int countByC_C_C_M(long companyId, long classNameId, long classPK, 955 boolean mailing) 956 throws com.liferay.portal.kernel.exception.SystemException; 957 958 /** 959 * Returns the number of addresses where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 960 * 961 * @param companyId the company ID 962 * @param classNameId the class name ID 963 * @param classPK the class p k 964 * @param primary the primary 965 * @return the number of matching addresses 966 * @throws SystemException if a system exception occurred 967 */ 968 public int countByC_C_C_P(long companyId, long classNameId, long classPK, 969 boolean primary) 970 throws com.liferay.portal.kernel.exception.SystemException; 971 972 /** 973 * Returns the number of addresses. 974 * 975 * @return the number of addresses 976 * @throws SystemException if a system exception occurred 977 */ 978 public int countAll() 979 throws com.liferay.portal.kernel.exception.SystemException; 980 }