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