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