001 /** 002 * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.Contact; 020 021 /** 022 * The persistence interface for the contact service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.ContactPersistenceImpl 030 * @see ContactUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface ContactPersistence extends BasePersistence<Contact> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link ContactUtil} to access the contact persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the contacts where companyId = ?. 043 * 044 * @param companyId the company ID 045 * @return the matching contacts 046 */ 047 public java.util.List<Contact> findByCompanyId(long companyId); 048 049 /** 050 * Returns a range of all the contacts where companyId = ?. 051 * 052 * <p> 053 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 054 * </p> 055 * 056 * @param companyId the company ID 057 * @param start the lower bound of the range of contacts 058 * @param end the upper bound of the range of contacts (not inclusive) 059 * @return the range of matching contacts 060 */ 061 public java.util.List<Contact> findByCompanyId(long companyId, int start, 062 int end); 063 064 /** 065 * Returns an ordered range of all the contacts where companyId = ?. 066 * 067 * <p> 068 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 069 * </p> 070 * 071 * @param companyId the company ID 072 * @param start the lower bound of the range of contacts 073 * @param end the upper bound of the range of contacts (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching contacts 076 */ 077 public java.util.List<Contact> findByCompanyId(long companyId, int start, 078 int end, 079 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 080 081 /** 082 * Returns an ordered range of all the contacts where companyId = ?. 083 * 084 * <p> 085 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 086 * </p> 087 * 088 * @param companyId the company ID 089 * @param start the lower bound of the range of contacts 090 * @param end the upper bound of the range of contacts (not inclusive) 091 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 092 * @param retrieveFromCache whether to retrieve from the finder cache 093 * @return the ordered range of matching contacts 094 */ 095 public java.util.List<Contact> findByCompanyId(long companyId, int start, 096 int end, 097 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator, 098 boolean retrieveFromCache); 099 100 /** 101 * Returns the first contact in the ordered set where companyId = ?. 102 * 103 * @param companyId the company ID 104 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 105 * @return the first matching contact 106 * @throws NoSuchContactException if a matching contact could not be found 107 */ 108 public Contact findByCompanyId_First(long companyId, 109 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 110 throws com.liferay.portal.exception.NoSuchContactException; 111 112 /** 113 * Returns the first contact in the ordered set where companyId = ?. 114 * 115 * @param companyId the company ID 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the first matching contact, or <code>null</code> if a matching contact could not be found 118 */ 119 public Contact fetchByCompanyId_First(long companyId, 120 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 121 122 /** 123 * Returns the last contact in the ordered set where companyId = ?. 124 * 125 * @param companyId the company ID 126 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 127 * @return the last matching contact 128 * @throws NoSuchContactException if a matching contact could not be found 129 */ 130 public Contact findByCompanyId_Last(long companyId, 131 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 132 throws com.liferay.portal.exception.NoSuchContactException; 133 134 /** 135 * Returns the last contact in the ordered set where companyId = ?. 136 * 137 * @param companyId the company ID 138 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 139 * @return the last matching contact, or <code>null</code> if a matching contact could not be found 140 */ 141 public Contact fetchByCompanyId_Last(long companyId, 142 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 143 144 /** 145 * Returns the contacts before and after the current contact in the ordered set where companyId = ?. 146 * 147 * @param contactId the primary key of the current contact 148 * @param companyId the company ID 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the previous, current, and next contact 151 * @throws NoSuchContactException if a contact with the primary key could not be found 152 */ 153 public Contact[] findByCompanyId_PrevAndNext(long contactId, 154 long companyId, 155 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 156 throws com.liferay.portal.exception.NoSuchContactException; 157 158 /** 159 * Removes all the contacts where companyId = ? from the database. 160 * 161 * @param companyId the company ID 162 */ 163 public void removeByCompanyId(long companyId); 164 165 /** 166 * Returns the number of contacts where companyId = ?. 167 * 168 * @param companyId the company ID 169 * @return the number of matching contacts 170 */ 171 public int countByCompanyId(long companyId); 172 173 /** 174 * Returns all the contacts where accountId = ?. 175 * 176 * @param accountId the account ID 177 * @return the matching contacts 178 */ 179 public java.util.List<Contact> findByAccountId(long accountId); 180 181 /** 182 * Returns a range of all the contacts where accountId = ?. 183 * 184 * <p> 185 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 186 * </p> 187 * 188 * @param accountId the account ID 189 * @param start the lower bound of the range of contacts 190 * @param end the upper bound of the range of contacts (not inclusive) 191 * @return the range of matching contacts 192 */ 193 public java.util.List<Contact> findByAccountId(long accountId, int start, 194 int end); 195 196 /** 197 * Returns an ordered range of all the contacts where accountId = ?. 198 * 199 * <p> 200 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 201 * </p> 202 * 203 * @param accountId the account ID 204 * @param start the lower bound of the range of contacts 205 * @param end the upper bound of the range of contacts (not inclusive) 206 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 207 * @return the ordered range of matching contacts 208 */ 209 public java.util.List<Contact> findByAccountId(long accountId, int start, 210 int end, 211 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 212 213 /** 214 * Returns an ordered range of all the contacts where accountId = ?. 215 * 216 * <p> 217 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 218 * </p> 219 * 220 * @param accountId the account ID 221 * @param start the lower bound of the range of contacts 222 * @param end the upper bound of the range of contacts (not inclusive) 223 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 224 * @param retrieveFromCache whether to retrieve from the finder cache 225 * @return the ordered range of matching contacts 226 */ 227 public java.util.List<Contact> findByAccountId(long accountId, int start, 228 int end, 229 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator, 230 boolean retrieveFromCache); 231 232 /** 233 * Returns the first contact in the ordered set where accountId = ?. 234 * 235 * @param accountId the account ID 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the first matching contact 238 * @throws NoSuchContactException if a matching contact could not be found 239 */ 240 public Contact findByAccountId_First(long accountId, 241 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 242 throws com.liferay.portal.exception.NoSuchContactException; 243 244 /** 245 * Returns the first contact in the ordered set where accountId = ?. 246 * 247 * @param accountId the account ID 248 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 249 * @return the first matching contact, or <code>null</code> if a matching contact could not be found 250 */ 251 public Contact fetchByAccountId_First(long accountId, 252 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 253 254 /** 255 * Returns the last contact in the ordered set where accountId = ?. 256 * 257 * @param accountId the account ID 258 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 259 * @return the last matching contact 260 * @throws NoSuchContactException if a matching contact could not be found 261 */ 262 public Contact findByAccountId_Last(long accountId, 263 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 264 throws com.liferay.portal.exception.NoSuchContactException; 265 266 /** 267 * Returns the last contact in the ordered set where accountId = ?. 268 * 269 * @param accountId the account ID 270 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 271 * @return the last matching contact, or <code>null</code> if a matching contact could not be found 272 */ 273 public Contact fetchByAccountId_Last(long accountId, 274 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 275 276 /** 277 * Returns the contacts before and after the current contact in the ordered set where accountId = ?. 278 * 279 * @param contactId the primary key of the current contact 280 * @param accountId the account ID 281 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 282 * @return the previous, current, and next contact 283 * @throws NoSuchContactException if a contact with the primary key could not be found 284 */ 285 public Contact[] findByAccountId_PrevAndNext(long contactId, 286 long accountId, 287 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 288 throws com.liferay.portal.exception.NoSuchContactException; 289 290 /** 291 * Removes all the contacts where accountId = ? from the database. 292 * 293 * @param accountId the account ID 294 */ 295 public void removeByAccountId(long accountId); 296 297 /** 298 * Returns the number of contacts where accountId = ?. 299 * 300 * @param accountId the account ID 301 * @return the number of matching contacts 302 */ 303 public int countByAccountId(long accountId); 304 305 /** 306 * Returns all the contacts where classNameId = ? and classPK = ?. 307 * 308 * @param classNameId the class name ID 309 * @param classPK the class p k 310 * @return the matching contacts 311 */ 312 public java.util.List<Contact> findByC_C(long classNameId, long classPK); 313 314 /** 315 * Returns a range of all the contacts where classNameId = ? and classPK = ?. 316 * 317 * <p> 318 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 319 * </p> 320 * 321 * @param classNameId the class name ID 322 * @param classPK the class p k 323 * @param start the lower bound of the range of contacts 324 * @param end the upper bound of the range of contacts (not inclusive) 325 * @return the range of matching contacts 326 */ 327 public java.util.List<Contact> findByC_C(long classNameId, long classPK, 328 int start, int end); 329 330 /** 331 * Returns an ordered range of all the contacts where classNameId = ? and classPK = ?. 332 * 333 * <p> 334 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 335 * </p> 336 * 337 * @param classNameId the class name ID 338 * @param classPK the class p k 339 * @param start the lower bound of the range of contacts 340 * @param end the upper bound of the range of contacts (not inclusive) 341 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 342 * @return the ordered range of matching contacts 343 */ 344 public java.util.List<Contact> findByC_C(long classNameId, long classPK, 345 int start, int end, 346 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 347 348 /** 349 * Returns an ordered range of all the contacts where classNameId = ? and classPK = ?. 350 * 351 * <p> 352 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 353 * </p> 354 * 355 * @param classNameId the class name ID 356 * @param classPK the class p k 357 * @param start the lower bound of the range of contacts 358 * @param end the upper bound of the range of contacts (not inclusive) 359 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 360 * @param retrieveFromCache whether to retrieve from the finder cache 361 * @return the ordered range of matching contacts 362 */ 363 public java.util.List<Contact> findByC_C(long classNameId, long classPK, 364 int start, int end, 365 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator, 366 boolean retrieveFromCache); 367 368 /** 369 * Returns the first contact in the ordered set where classNameId = ? and classPK = ?. 370 * 371 * @param classNameId the class name ID 372 * @param classPK the class p k 373 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 374 * @return the first matching contact 375 * @throws NoSuchContactException if a matching contact could not be found 376 */ 377 public Contact findByC_C_First(long classNameId, long classPK, 378 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 379 throws com.liferay.portal.exception.NoSuchContactException; 380 381 /** 382 * Returns the first contact in the ordered set where classNameId = ? and classPK = ?. 383 * 384 * @param classNameId the class name ID 385 * @param classPK the class p k 386 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 387 * @return the first matching contact, or <code>null</code> if a matching contact could not be found 388 */ 389 public Contact fetchByC_C_First(long classNameId, long classPK, 390 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 391 392 /** 393 * Returns the last contact in the ordered set where classNameId = ? and classPK = ?. 394 * 395 * @param classNameId the class name ID 396 * @param classPK the class p k 397 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 398 * @return the last matching contact 399 * @throws NoSuchContactException if a matching contact could not be found 400 */ 401 public Contact findByC_C_Last(long classNameId, long classPK, 402 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 403 throws com.liferay.portal.exception.NoSuchContactException; 404 405 /** 406 * Returns the last contact in the ordered set where classNameId = ? and classPK = ?. 407 * 408 * @param classNameId the class name ID 409 * @param classPK the class p k 410 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 411 * @return the last matching contact, or <code>null</code> if a matching contact could not be found 412 */ 413 public Contact fetchByC_C_Last(long classNameId, long classPK, 414 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 415 416 /** 417 * Returns the contacts before and after the current contact in the ordered set where classNameId = ? and classPK = ?. 418 * 419 * @param contactId the primary key of the current contact 420 * @param classNameId the class name ID 421 * @param classPK the class p k 422 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 423 * @return the previous, current, and next contact 424 * @throws NoSuchContactException if a contact with the primary key could not be found 425 */ 426 public Contact[] findByC_C_PrevAndNext(long contactId, long classNameId, 427 long classPK, 428 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator) 429 throws com.liferay.portal.exception.NoSuchContactException; 430 431 /** 432 * Removes all the contacts where classNameId = ? and classPK = ? from the database. 433 * 434 * @param classNameId the class name ID 435 * @param classPK the class p k 436 */ 437 public void removeByC_C(long classNameId, long classPK); 438 439 /** 440 * Returns the number of contacts where classNameId = ? and classPK = ?. 441 * 442 * @param classNameId the class name ID 443 * @param classPK the class p k 444 * @return the number of matching contacts 445 */ 446 public int countByC_C(long classNameId, long classPK); 447 448 /** 449 * Caches the contact in the entity cache if it is enabled. 450 * 451 * @param contact the contact 452 */ 453 public void cacheResult(Contact contact); 454 455 /** 456 * Caches the contacts in the entity cache if it is enabled. 457 * 458 * @param contacts the contacts 459 */ 460 public void cacheResult(java.util.List<Contact> contacts); 461 462 /** 463 * Creates a new contact with the primary key. Does not add the contact to the database. 464 * 465 * @param contactId the primary key for the new contact 466 * @return the new contact 467 */ 468 public Contact create(long contactId); 469 470 /** 471 * Removes the contact with the primary key from the database. Also notifies the appropriate model listeners. 472 * 473 * @param contactId the primary key of the contact 474 * @return the contact that was removed 475 * @throws NoSuchContactException if a contact with the primary key could not be found 476 */ 477 public Contact remove(long contactId) 478 throws com.liferay.portal.exception.NoSuchContactException; 479 480 public Contact updateImpl(Contact contact); 481 482 /** 483 * Returns the contact with the primary key or throws a {@link NoSuchContactException} if it could not be found. 484 * 485 * @param contactId the primary key of the contact 486 * @return the contact 487 * @throws NoSuchContactException if a contact with the primary key could not be found 488 */ 489 public Contact findByPrimaryKey(long contactId) 490 throws com.liferay.portal.exception.NoSuchContactException; 491 492 /** 493 * Returns the contact with the primary key or returns <code>null</code> if it could not be found. 494 * 495 * @param contactId the primary key of the contact 496 * @return the contact, or <code>null</code> if a contact with the primary key could not be found 497 */ 498 public Contact fetchByPrimaryKey(long contactId); 499 500 @Override 501 public java.util.Map<java.io.Serializable, Contact> fetchByPrimaryKeys( 502 java.util.Set<java.io.Serializable> primaryKeys); 503 504 /** 505 * Returns all the contacts. 506 * 507 * @return the contacts 508 */ 509 public java.util.List<Contact> findAll(); 510 511 /** 512 * Returns a range of all the contacts. 513 * 514 * <p> 515 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 516 * </p> 517 * 518 * @param start the lower bound of the range of contacts 519 * @param end the upper bound of the range of contacts (not inclusive) 520 * @return the range of contacts 521 */ 522 public java.util.List<Contact> findAll(int start, int end); 523 524 /** 525 * Returns an ordered range of all the contacts. 526 * 527 * <p> 528 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 529 * </p> 530 * 531 * @param start the lower bound of the range of contacts 532 * @param end the upper bound of the range of contacts (not inclusive) 533 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 534 * @return the ordered range of contacts 535 */ 536 public java.util.List<Contact> findAll(int start, int end, 537 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator); 538 539 /** 540 * Returns an ordered range of all the contacts. 541 * 542 * <p> 543 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ContactModelImpl}. 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. 544 * </p> 545 * 546 * @param start the lower bound of the range of contacts 547 * @param end the upper bound of the range of contacts (not inclusive) 548 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 549 * @param retrieveFromCache whether to retrieve from the finder cache 550 * @return the ordered range of contacts 551 */ 552 public java.util.List<Contact> findAll(int start, int end, 553 com.liferay.portal.kernel.util.OrderByComparator<Contact> orderByComparator, 554 boolean retrieveFromCache); 555 556 /** 557 * Removes all the contacts from the database. 558 */ 559 public void removeAll(); 560 561 /** 562 * Returns the number of contacts. 563 * 564 * @return the number of contacts 565 */ 566 public int countAll(); 567 }