001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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#remove(com.liferay.portal.model.BaseModel) 097 */ 098 public static Phone remove(Phone phone) throws SystemException { 099 return getPersistence().remove(phone); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 104 */ 105 public static Phone update(Phone phone, boolean merge) 106 throws SystemException { 107 return getPersistence().update(phone, merge); 108 } 109 110 /** 111 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 112 */ 113 public static Phone update(Phone phone, boolean merge, 114 ServiceContext serviceContext) throws SystemException { 115 return getPersistence().update(phone, merge, serviceContext); 116 } 117 118 /** 119 * Caches the phone in the entity cache if it is enabled. 120 * 121 * @param phone the phone 122 */ 123 public static void cacheResult(com.liferay.portal.model.Phone phone) { 124 getPersistence().cacheResult(phone); 125 } 126 127 /** 128 * Caches the phones in the entity cache if it is enabled. 129 * 130 * @param phones the phones 131 */ 132 public static void cacheResult( 133 java.util.List<com.liferay.portal.model.Phone> phones) { 134 getPersistence().cacheResult(phones); 135 } 136 137 /** 138 * Creates a new phone with the primary key. Does not add the phone to the database. 139 * 140 * @param phoneId the primary key for the new phone 141 * @return the new phone 142 */ 143 public static com.liferay.portal.model.Phone create(long phoneId) { 144 return getPersistence().create(phoneId); 145 } 146 147 /** 148 * Removes the phone with the primary key from the database. Also notifies the appropriate model listeners. 149 * 150 * @param phoneId the primary key of the phone 151 * @return the phone that was removed 152 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 153 * @throws SystemException if a system exception occurred 154 */ 155 public static com.liferay.portal.model.Phone remove(long phoneId) 156 throws com.liferay.portal.NoSuchPhoneException, 157 com.liferay.portal.kernel.exception.SystemException { 158 return getPersistence().remove(phoneId); 159 } 160 161 public static com.liferay.portal.model.Phone updateImpl( 162 com.liferay.portal.model.Phone phone, boolean merge) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence().updateImpl(phone, merge); 165 } 166 167 /** 168 * Returns the phone with the primary key or throws a {@link com.liferay.portal.NoSuchPhoneException} if it could not be found. 169 * 170 * @param phoneId the primary key of the phone 171 * @return the phone 172 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portal.model.Phone findByPrimaryKey(long phoneId) 176 throws com.liferay.portal.NoSuchPhoneException, 177 com.liferay.portal.kernel.exception.SystemException { 178 return getPersistence().findByPrimaryKey(phoneId); 179 } 180 181 /** 182 * Returns the phone with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param phoneId the primary key of the phone 185 * @return the phone, or <code>null</code> if a phone with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portal.model.Phone fetchByPrimaryKey(long phoneId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(phoneId); 191 } 192 193 /** 194 * Returns all the phones where companyId = ?. 195 * 196 * @param companyId the company ID 197 * @return the matching phones 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId( 201 long companyId) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByCompanyId(companyId); 204 } 205 206 /** 207 * Returns a range of all the phones where companyId = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param companyId the company ID 214 * @param start the lower bound of the range of phones 215 * @param end the upper bound of the range of phones (not inclusive) 216 * @return the range of matching phones 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId( 220 long companyId, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByCompanyId(companyId, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the phones where companyId = ?. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param companyId the company ID 233 * @param start the lower bound of the range of phones 234 * @param end the upper bound of the range of phones (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching phones 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portal.model.Phone> findByCompanyId( 240 long companyId, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence() 244 .findByCompanyId(companyId, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first phone in the ordered set where companyId = ?. 249 * 250 * <p> 251 * 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. 252 * </p> 253 * 254 * @param companyId the company ID 255 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 256 * @return the first matching phone 257 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 258 * @throws SystemException if a system exception occurred 259 */ 260 public static com.liferay.portal.model.Phone findByCompanyId_First( 261 long companyId, 262 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 263 throws com.liferay.portal.NoSuchPhoneException, 264 com.liferay.portal.kernel.exception.SystemException { 265 return getPersistence() 266 .findByCompanyId_First(companyId, orderByComparator); 267 } 268 269 /** 270 * Returns the last phone in the ordered set where companyId = ?. 271 * 272 * <p> 273 * 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. 274 * </p> 275 * 276 * @param companyId the company ID 277 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 278 * @return the last matching phone 279 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 280 * @throws SystemException if a system exception occurred 281 */ 282 public static com.liferay.portal.model.Phone findByCompanyId_Last( 283 long companyId, 284 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 285 throws com.liferay.portal.NoSuchPhoneException, 286 com.liferay.portal.kernel.exception.SystemException { 287 return getPersistence() 288 .findByCompanyId_Last(companyId, orderByComparator); 289 } 290 291 /** 292 * Returns the phones before and after the current phone in the ordered set where companyId = ?. 293 * 294 * <p> 295 * 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. 296 * </p> 297 * 298 * @param phoneId the primary key of the current phone 299 * @param companyId the company ID 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the previous, current, and next phone 302 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 303 * @throws SystemException if a system exception occurred 304 */ 305 public static com.liferay.portal.model.Phone[] findByCompanyId_PrevAndNext( 306 long phoneId, long companyId, 307 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 308 throws com.liferay.portal.NoSuchPhoneException, 309 com.liferay.portal.kernel.exception.SystemException { 310 return getPersistence() 311 .findByCompanyId_PrevAndNext(phoneId, companyId, 312 orderByComparator); 313 } 314 315 /** 316 * Returns all the phones where userId = ?. 317 * 318 * @param userId the user ID 319 * @return the matching phones 320 * @throws SystemException if a system exception occurred 321 */ 322 public static java.util.List<com.liferay.portal.model.Phone> findByUserId( 323 long userId) throws com.liferay.portal.kernel.exception.SystemException { 324 return getPersistence().findByUserId(userId); 325 } 326 327 /** 328 * Returns a range of all the phones where userId = ?. 329 * 330 * <p> 331 * 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. 332 * </p> 333 * 334 * @param userId the user ID 335 * @param start the lower bound of the range of phones 336 * @param end the upper bound of the range of phones (not inclusive) 337 * @return the range of matching phones 338 * @throws SystemException if a system exception occurred 339 */ 340 public static java.util.List<com.liferay.portal.model.Phone> findByUserId( 341 long userId, int start, int end) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().findByUserId(userId, start, end); 344 } 345 346 /** 347 * Returns an ordered range of all the phones where userId = ?. 348 * 349 * <p> 350 * 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. 351 * </p> 352 * 353 * @param userId the user ID 354 * @param start the lower bound of the range of phones 355 * @param end the upper bound of the range of phones (not inclusive) 356 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 357 * @return the ordered range of matching phones 358 * @throws SystemException if a system exception occurred 359 */ 360 public static java.util.List<com.liferay.portal.model.Phone> findByUserId( 361 long userId, int start, int end, 362 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 363 throws com.liferay.portal.kernel.exception.SystemException { 364 return getPersistence() 365 .findByUserId(userId, start, end, orderByComparator); 366 } 367 368 /** 369 * Returns the first phone in the ordered set where userId = ?. 370 * 371 * <p> 372 * 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. 373 * </p> 374 * 375 * @param userId the user ID 376 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 377 * @return the first matching phone 378 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 379 * @throws SystemException if a system exception occurred 380 */ 381 public static com.liferay.portal.model.Phone findByUserId_First( 382 long userId, 383 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 384 throws com.liferay.portal.NoSuchPhoneException, 385 com.liferay.portal.kernel.exception.SystemException { 386 return getPersistence().findByUserId_First(userId, orderByComparator); 387 } 388 389 /** 390 * Returns the last phone in the ordered set where userId = ?. 391 * 392 * <p> 393 * 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. 394 * </p> 395 * 396 * @param userId the user ID 397 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 398 * @return the last matching phone 399 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 400 * @throws SystemException if a system exception occurred 401 */ 402 public static com.liferay.portal.model.Phone findByUserId_Last( 403 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().findByUserId_Last(userId, orderByComparator); 408 } 409 410 /** 411 * Returns the phones before and after the current phone in the ordered set where userId = ?. 412 * 413 * <p> 414 * 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. 415 * </p> 416 * 417 * @param phoneId the primary key of the current phone 418 * @param userId the user ID 419 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 420 * @return the previous, current, and next phone 421 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 422 * @throws SystemException if a system exception occurred 423 */ 424 public static com.liferay.portal.model.Phone[] findByUserId_PrevAndNext( 425 long phoneId, long userId, 426 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 427 throws com.liferay.portal.NoSuchPhoneException, 428 com.liferay.portal.kernel.exception.SystemException { 429 return getPersistence() 430 .findByUserId_PrevAndNext(phoneId, userId, orderByComparator); 431 } 432 433 /** 434 * Returns all the phones where companyId = ? and classNameId = ?. 435 * 436 * @param companyId the company ID 437 * @param classNameId the class name ID 438 * @return the matching phones 439 * @throws SystemException if a system exception occurred 440 */ 441 public static java.util.List<com.liferay.portal.model.Phone> findByC_C( 442 long companyId, long classNameId) 443 throws com.liferay.portal.kernel.exception.SystemException { 444 return getPersistence().findByC_C(companyId, classNameId); 445 } 446 447 /** 448 * Returns a range of all the phones where companyId = ? and classNameId = ?. 449 * 450 * <p> 451 * 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. 452 * </p> 453 * 454 * @param companyId the company ID 455 * @param classNameId the class name ID 456 * @param start the lower bound of the range of phones 457 * @param end the upper bound of the range of phones (not inclusive) 458 * @return the range of matching phones 459 * @throws SystemException if a system exception occurred 460 */ 461 public static java.util.List<com.liferay.portal.model.Phone> findByC_C( 462 long companyId, long classNameId, int start, int end) 463 throws com.liferay.portal.kernel.exception.SystemException { 464 return getPersistence().findByC_C(companyId, classNameId, start, end); 465 } 466 467 /** 468 * Returns an ordered range of all the phones where companyId = ? and classNameId = ?. 469 * 470 * <p> 471 * 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. 472 * </p> 473 * 474 * @param companyId the company ID 475 * @param classNameId the class name ID 476 * @param start the lower bound of the range of phones 477 * @param end the upper bound of the range of phones (not inclusive) 478 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 479 * @return the ordered range of matching phones 480 * @throws SystemException if a system exception occurred 481 */ 482 public static java.util.List<com.liferay.portal.model.Phone> findByC_C( 483 long companyId, long classNameId, int start, int end, 484 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 485 throws com.liferay.portal.kernel.exception.SystemException { 486 return getPersistence() 487 .findByC_C(companyId, classNameId, start, end, 488 orderByComparator); 489 } 490 491 /** 492 * Returns the first phone in the ordered set where companyId = ? and classNameId = ?. 493 * 494 * <p> 495 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 496 * </p> 497 * 498 * @param companyId the company ID 499 * @param classNameId the class name ID 500 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 501 * @return the first matching phone 502 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 503 * @throws SystemException if a system exception occurred 504 */ 505 public static com.liferay.portal.model.Phone findByC_C_First( 506 long companyId, long classNameId, 507 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 508 throws com.liferay.portal.NoSuchPhoneException, 509 com.liferay.portal.kernel.exception.SystemException { 510 return getPersistence() 511 .findByC_C_First(companyId, classNameId, orderByComparator); 512 } 513 514 /** 515 * Returns the last phone in the ordered set where companyId = ? and classNameId = ?. 516 * 517 * <p> 518 * 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. 519 * </p> 520 * 521 * @param companyId the company ID 522 * @param classNameId the class name ID 523 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 524 * @return the last matching phone 525 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 526 * @throws SystemException if a system exception occurred 527 */ 528 public static com.liferay.portal.model.Phone findByC_C_Last( 529 long companyId, long classNameId, 530 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 531 throws com.liferay.portal.NoSuchPhoneException, 532 com.liferay.portal.kernel.exception.SystemException { 533 return getPersistence() 534 .findByC_C_Last(companyId, classNameId, orderByComparator); 535 } 536 537 /** 538 * Returns the phones before and after the current phone in the ordered set where companyId = ? and classNameId = ?. 539 * 540 * <p> 541 * 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. 542 * </p> 543 * 544 * @param phoneId the primary key of the current phone 545 * @param companyId the company ID 546 * @param classNameId the class name ID 547 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 548 * @return the previous, current, and next phone 549 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 550 * @throws SystemException if a system exception occurred 551 */ 552 public static com.liferay.portal.model.Phone[] findByC_C_PrevAndNext( 553 long phoneId, long companyId, long classNameId, 554 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 555 throws com.liferay.portal.NoSuchPhoneException, 556 com.liferay.portal.kernel.exception.SystemException { 557 return getPersistence() 558 .findByC_C_PrevAndNext(phoneId, companyId, classNameId, 559 orderByComparator); 560 } 561 562 /** 563 * Returns all the phones where companyId = ? and classNameId = ? and classPK = ?. 564 * 565 * @param companyId the company ID 566 * @param classNameId the class name ID 567 * @param classPK the class p k 568 * @return the matching phones 569 * @throws SystemException if a system exception occurred 570 */ 571 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C( 572 long companyId, long classNameId, long classPK) 573 throws com.liferay.portal.kernel.exception.SystemException { 574 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 575 } 576 577 /** 578 * Returns a range of all the phones where companyId = ? and classNameId = ? and classPK = ?. 579 * 580 * <p> 581 * 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. 582 * </p> 583 * 584 * @param companyId the company ID 585 * @param classNameId the class name ID 586 * @param classPK the class p k 587 * @param start the lower bound of the range of phones 588 * @param end the upper bound of the range of phones (not inclusive) 589 * @return the range of matching phones 590 * @throws SystemException if a system exception occurred 591 */ 592 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C( 593 long companyId, long classNameId, long classPK, int start, int end) 594 throws com.liferay.portal.kernel.exception.SystemException { 595 return getPersistence() 596 .findByC_C_C(companyId, classNameId, classPK, start, end); 597 } 598 599 /** 600 * Returns an ordered range of all the phones where companyId = ? and classNameId = ? and classPK = ?. 601 * 602 * <p> 603 * 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. 604 * </p> 605 * 606 * @param companyId the company ID 607 * @param classNameId the class name ID 608 * @param classPK the class p k 609 * @param start the lower bound of the range of phones 610 * @param end the upper bound of the range of phones (not inclusive) 611 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 612 * @return the ordered range of matching phones 613 * @throws SystemException if a system exception occurred 614 */ 615 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C( 616 long companyId, long classNameId, long classPK, int start, int end, 617 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 618 throws com.liferay.portal.kernel.exception.SystemException { 619 return getPersistence() 620 .findByC_C_C(companyId, classNameId, classPK, start, end, 621 orderByComparator); 622 } 623 624 /** 625 * Returns the first phone in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 626 * 627 * <p> 628 * 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. 629 * </p> 630 * 631 * @param companyId the company ID 632 * @param classNameId the class name ID 633 * @param classPK the class p k 634 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 635 * @return the first matching phone 636 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 637 * @throws SystemException if a system exception occurred 638 */ 639 public static com.liferay.portal.model.Phone findByC_C_C_First( 640 long companyId, long classNameId, long classPK, 641 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 642 throws com.liferay.portal.NoSuchPhoneException, 643 com.liferay.portal.kernel.exception.SystemException { 644 return getPersistence() 645 .findByC_C_C_First(companyId, classNameId, classPK, 646 orderByComparator); 647 } 648 649 /** 650 * Returns the last phone in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 651 * 652 * <p> 653 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 654 * </p> 655 * 656 * @param companyId the company ID 657 * @param classNameId the class name ID 658 * @param classPK the class p k 659 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 660 * @return the last matching phone 661 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 662 * @throws SystemException if a system exception occurred 663 */ 664 public static com.liferay.portal.model.Phone findByC_C_C_Last( 665 long companyId, long classNameId, long classPK, 666 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 667 throws com.liferay.portal.NoSuchPhoneException, 668 com.liferay.portal.kernel.exception.SystemException { 669 return getPersistence() 670 .findByC_C_C_Last(companyId, classNameId, classPK, 671 orderByComparator); 672 } 673 674 /** 675 * Returns the phones before and after the current phone in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 676 * 677 * <p> 678 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 679 * </p> 680 * 681 * @param phoneId the primary key of the current phone 682 * @param companyId the company ID 683 * @param classNameId the class name ID 684 * @param classPK the class p k 685 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 686 * @return the previous, current, and next phone 687 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 688 * @throws SystemException if a system exception occurred 689 */ 690 public static com.liferay.portal.model.Phone[] findByC_C_C_PrevAndNext( 691 long phoneId, long companyId, long classNameId, long classPK, 692 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 693 throws com.liferay.portal.NoSuchPhoneException, 694 com.liferay.portal.kernel.exception.SystemException { 695 return getPersistence() 696 .findByC_C_C_PrevAndNext(phoneId, companyId, classNameId, 697 classPK, orderByComparator); 698 } 699 700 /** 701 * Returns all the phones where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 702 * 703 * @param companyId the company ID 704 * @param classNameId the class name ID 705 * @param classPK the class p k 706 * @param primary the primary 707 * @return the matching phones 708 * @throws SystemException if a system exception occurred 709 */ 710 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P( 711 long companyId, long classNameId, long classPK, boolean primary) 712 throws com.liferay.portal.kernel.exception.SystemException { 713 return getPersistence() 714 .findByC_C_C_P(companyId, classNameId, classPK, primary); 715 } 716 717 /** 718 * Returns a range of all the phones where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 719 * 720 * <p> 721 * 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. 722 * </p> 723 * 724 * @param companyId the company ID 725 * @param classNameId the class name ID 726 * @param classPK the class p k 727 * @param primary the primary 728 * @param start the lower bound of the range of phones 729 * @param end the upper bound of the range of phones (not inclusive) 730 * @return the range of matching phones 731 * @throws SystemException if a system exception occurred 732 */ 733 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P( 734 long companyId, long classNameId, long classPK, boolean primary, 735 int start, int end) 736 throws com.liferay.portal.kernel.exception.SystemException { 737 return getPersistence() 738 .findByC_C_C_P(companyId, classNameId, classPK, primary, 739 start, end); 740 } 741 742 /** 743 * Returns an ordered range of all the phones where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 744 * 745 * <p> 746 * 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. 747 * </p> 748 * 749 * @param companyId the company ID 750 * @param classNameId the class name ID 751 * @param classPK the class p k 752 * @param primary the primary 753 * @param start the lower bound of the range of phones 754 * @param end the upper bound of the range of phones (not inclusive) 755 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 756 * @return the ordered range of matching phones 757 * @throws SystemException if a system exception occurred 758 */ 759 public static java.util.List<com.liferay.portal.model.Phone> findByC_C_C_P( 760 long companyId, long classNameId, long classPK, boolean primary, 761 int start, int end, 762 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 763 throws com.liferay.portal.kernel.exception.SystemException { 764 return getPersistence() 765 .findByC_C_C_P(companyId, classNameId, classPK, primary, 766 start, end, orderByComparator); 767 } 768 769 /** 770 * Returns the first phone in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 771 * 772 * <p> 773 * 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. 774 * </p> 775 * 776 * @param companyId the company ID 777 * @param classNameId the class name ID 778 * @param classPK the class p k 779 * @param primary the primary 780 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 781 * @return the first matching phone 782 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 783 * @throws SystemException if a system exception occurred 784 */ 785 public static com.liferay.portal.model.Phone findByC_C_C_P_First( 786 long companyId, long classNameId, long classPK, boolean primary, 787 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 788 throws com.liferay.portal.NoSuchPhoneException, 789 com.liferay.portal.kernel.exception.SystemException { 790 return getPersistence() 791 .findByC_C_C_P_First(companyId, classNameId, classPK, 792 primary, orderByComparator); 793 } 794 795 /** 796 * Returns the last phone in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 797 * 798 * <p> 799 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 800 * </p> 801 * 802 * @param companyId the company ID 803 * @param classNameId the class name ID 804 * @param classPK the class p k 805 * @param primary the primary 806 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 807 * @return the last matching phone 808 * @throws com.liferay.portal.NoSuchPhoneException if a matching phone could not be found 809 * @throws SystemException if a system exception occurred 810 */ 811 public static com.liferay.portal.model.Phone findByC_C_C_P_Last( 812 long companyId, long classNameId, long classPK, boolean primary, 813 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 814 throws com.liferay.portal.NoSuchPhoneException, 815 com.liferay.portal.kernel.exception.SystemException { 816 return getPersistence() 817 .findByC_C_C_P_Last(companyId, classNameId, classPK, 818 primary, orderByComparator); 819 } 820 821 /** 822 * Returns the phones before and after the current phone in the ordered set where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 823 * 824 * <p> 825 * 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. 826 * </p> 827 * 828 * @param phoneId the primary key of the current phone 829 * @param companyId the company ID 830 * @param classNameId the class name ID 831 * @param classPK the class p k 832 * @param primary the primary 833 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 834 * @return the previous, current, and next phone 835 * @throws com.liferay.portal.NoSuchPhoneException if a phone with the primary key could not be found 836 * @throws SystemException if a system exception occurred 837 */ 838 public static com.liferay.portal.model.Phone[] findByC_C_C_P_PrevAndNext( 839 long phoneId, long companyId, long classNameId, long classPK, 840 boolean primary, 841 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 842 throws com.liferay.portal.NoSuchPhoneException, 843 com.liferay.portal.kernel.exception.SystemException { 844 return getPersistence() 845 .findByC_C_C_P_PrevAndNext(phoneId, companyId, classNameId, 846 classPK, primary, orderByComparator); 847 } 848 849 /** 850 * Returns all the phones. 851 * 852 * @return the phones 853 * @throws SystemException if a system exception occurred 854 */ 855 public static java.util.List<com.liferay.portal.model.Phone> findAll() 856 throws com.liferay.portal.kernel.exception.SystemException { 857 return getPersistence().findAll(); 858 } 859 860 /** 861 * Returns a range of all the phones. 862 * 863 * <p> 864 * 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. 865 * </p> 866 * 867 * @param start the lower bound of the range of phones 868 * @param end the upper bound of the range of phones (not inclusive) 869 * @return the range of phones 870 * @throws SystemException if a system exception occurred 871 */ 872 public static java.util.List<com.liferay.portal.model.Phone> findAll( 873 int start, int end) 874 throws com.liferay.portal.kernel.exception.SystemException { 875 return getPersistence().findAll(start, end); 876 } 877 878 /** 879 * Returns an ordered range of all the phones. 880 * 881 * <p> 882 * 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. 883 * </p> 884 * 885 * @param start the lower bound of the range of phones 886 * @param end the upper bound of the range of phones (not inclusive) 887 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 888 * @return the ordered range of phones 889 * @throws SystemException if a system exception occurred 890 */ 891 public static java.util.List<com.liferay.portal.model.Phone> findAll( 892 int start, int end, 893 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 894 throws com.liferay.portal.kernel.exception.SystemException { 895 return getPersistence().findAll(start, end, orderByComparator); 896 } 897 898 /** 899 * Removes all the phones where companyId = ? from the database. 900 * 901 * @param companyId the company ID 902 * @throws SystemException if a system exception occurred 903 */ 904 public static void removeByCompanyId(long companyId) 905 throws com.liferay.portal.kernel.exception.SystemException { 906 getPersistence().removeByCompanyId(companyId); 907 } 908 909 /** 910 * Removes all the phones where userId = ? from the database. 911 * 912 * @param userId the user ID 913 * @throws SystemException if a system exception occurred 914 */ 915 public static void removeByUserId(long userId) 916 throws com.liferay.portal.kernel.exception.SystemException { 917 getPersistence().removeByUserId(userId); 918 } 919 920 /** 921 * Removes all the phones where companyId = ? and classNameId = ? from the database. 922 * 923 * @param companyId the company ID 924 * @param classNameId the class name ID 925 * @throws SystemException if a system exception occurred 926 */ 927 public static void removeByC_C(long companyId, long classNameId) 928 throws com.liferay.portal.kernel.exception.SystemException { 929 getPersistence().removeByC_C(companyId, classNameId); 930 } 931 932 /** 933 * Removes all the phones where companyId = ? and classNameId = ? and classPK = ? from the database. 934 * 935 * @param companyId the company ID 936 * @param classNameId the class name ID 937 * @param classPK the class p k 938 * @throws SystemException if a system exception occurred 939 */ 940 public static void removeByC_C_C(long companyId, long classNameId, 941 long classPK) 942 throws com.liferay.portal.kernel.exception.SystemException { 943 getPersistence().removeByC_C_C(companyId, classNameId, classPK); 944 } 945 946 /** 947 * Removes all the phones where companyId = ? and classNameId = ? and classPK = ? and primary = ? from the database. 948 * 949 * @param companyId the company ID 950 * @param classNameId the class name ID 951 * @param classPK the class p k 952 * @param primary the primary 953 * @throws SystemException if a system exception occurred 954 */ 955 public static void removeByC_C_C_P(long companyId, long classNameId, 956 long classPK, boolean primary) 957 throws com.liferay.portal.kernel.exception.SystemException { 958 getPersistence() 959 .removeByC_C_C_P(companyId, classNameId, classPK, primary); 960 } 961 962 /** 963 * Removes all the phones from the database. 964 * 965 * @throws SystemException if a system exception occurred 966 */ 967 public static void removeAll() 968 throws com.liferay.portal.kernel.exception.SystemException { 969 getPersistence().removeAll(); 970 } 971 972 /** 973 * Returns the number of phones where companyId = ?. 974 * 975 * @param companyId the company ID 976 * @return the number of matching phones 977 * @throws SystemException if a system exception occurred 978 */ 979 public static int countByCompanyId(long companyId) 980 throws com.liferay.portal.kernel.exception.SystemException { 981 return getPersistence().countByCompanyId(companyId); 982 } 983 984 /** 985 * Returns the number of phones where userId = ?. 986 * 987 * @param userId the user ID 988 * @return the number of matching phones 989 * @throws SystemException if a system exception occurred 990 */ 991 public static int countByUserId(long userId) 992 throws com.liferay.portal.kernel.exception.SystemException { 993 return getPersistence().countByUserId(userId); 994 } 995 996 /** 997 * Returns the number of phones where companyId = ? and classNameId = ?. 998 * 999 * @param companyId the company ID 1000 * @param classNameId the class name ID 1001 * @return the number of matching phones 1002 * @throws SystemException if a system exception occurred 1003 */ 1004 public static int countByC_C(long companyId, long classNameId) 1005 throws com.liferay.portal.kernel.exception.SystemException { 1006 return getPersistence().countByC_C(companyId, classNameId); 1007 } 1008 1009 /** 1010 * Returns the number of phones where companyId = ? and classNameId = ? and classPK = ?. 1011 * 1012 * @param companyId the company ID 1013 * @param classNameId the class name ID 1014 * @param classPK the class p k 1015 * @return the number of matching phones 1016 * @throws SystemException if a system exception occurred 1017 */ 1018 public static int countByC_C_C(long companyId, long classNameId, 1019 long classPK) 1020 throws com.liferay.portal.kernel.exception.SystemException { 1021 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 1022 } 1023 1024 /** 1025 * Returns the number of phones where companyId = ? and classNameId = ? and classPK = ? and primary = ?. 1026 * 1027 * @param companyId the company ID 1028 * @param classNameId the class name ID 1029 * @param classPK the class p k 1030 * @param primary the primary 1031 * @return the number of matching phones 1032 * @throws SystemException if a system exception occurred 1033 */ 1034 public static int countByC_C_C_P(long companyId, long classNameId, 1035 long classPK, boolean primary) 1036 throws com.liferay.portal.kernel.exception.SystemException { 1037 return getPersistence() 1038 .countByC_C_C_P(companyId, classNameId, classPK, primary); 1039 } 1040 1041 /** 1042 * Returns the number of phones. 1043 * 1044 * @return the number of phones 1045 * @throws SystemException if a system exception occurred 1046 */ 1047 public static int countAll() 1048 throws com.liferay.portal.kernel.exception.SystemException { 1049 return getPersistence().countAll(); 1050 } 1051 1052 public static PhonePersistence getPersistence() { 1053 if (_persistence == null) { 1054 _persistence = (PhonePersistence)PortalBeanLocatorUtil.locate(PhonePersistence.class.getName()); 1055 1056 ReferenceRegistry.registerReference(PhoneUtil.class, "_persistence"); 1057 } 1058 1059 return _persistence; 1060 } 1061 1062 public void setPersistence(PhonePersistence persistence) { 1063 _persistence = persistence; 1064 1065 ReferenceRegistry.registerReference(PhoneUtil.class, "_persistence"); 1066 } 1067 1068 private static PhonePersistence _persistence; 1069 }