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.portlet.shopping.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.service.ServiceContext; 023 024 import com.liferay.portlet.shopping.model.ShoppingItem; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the shopping item service. This utility wraps {@link ShoppingItemPersistenceImpl} 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see ShoppingItemPersistence 037 * @see ShoppingItemPersistenceImpl 038 * @generated 039 */ 040 public class ShoppingItemUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(ShoppingItem shoppingItem) { 058 getPersistence().clearCache(shoppingItem); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<ShoppingItem> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<ShoppingItem> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<ShoppingItem> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static ShoppingItem update(ShoppingItem shoppingItem) 101 throws SystemException { 102 return getPersistence().update(shoppingItem); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static ShoppingItem update(ShoppingItem shoppingItem, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(shoppingItem, serviceContext); 111 } 112 113 /** 114 * Caches the shopping item in the entity cache if it is enabled. 115 * 116 * @param shoppingItem the shopping item 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) { 120 getPersistence().cacheResult(shoppingItem); 121 } 122 123 /** 124 * Caches the shopping items in the entity cache if it is enabled. 125 * 126 * @param shoppingItems the shopping items 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) { 130 getPersistence().cacheResult(shoppingItems); 131 } 132 133 /** 134 * Creates a new shopping item with the primary key. Does not add the shopping item to the database. 135 * 136 * @param itemId the primary key for the new shopping item 137 * @return the new shopping item 138 */ 139 public static com.liferay.portlet.shopping.model.ShoppingItem create( 140 long itemId) { 141 return getPersistence().create(itemId); 142 } 143 144 /** 145 * Removes the shopping item with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param itemId the primary key of the shopping item 148 * @return the shopping item that was removed 149 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.shopping.model.ShoppingItem remove( 153 long itemId) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.shopping.NoSuchItemException { 156 return getPersistence().remove(itemId); 157 } 158 159 public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl( 160 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(shoppingItem); 163 } 164 165 /** 166 * Returns the shopping item with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 167 * 168 * @param itemId the primary key of the shopping item 169 * @return the shopping item 170 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey( 174 long itemId) 175 throws com.liferay.portal.kernel.exception.SystemException, 176 com.liferay.portlet.shopping.NoSuchItemException { 177 return getPersistence().findByPrimaryKey(itemId); 178 } 179 180 /** 181 * Returns the shopping item with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param itemId the primary key of the shopping item 184 * @return the shopping item, or <code>null</code> if a shopping item with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey( 188 long itemId) throws com.liferay.portal.kernel.exception.SystemException { 189 return getPersistence().fetchByPrimaryKey(itemId); 190 } 191 192 /** 193 * Returns the shopping item where smallImageId = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 194 * 195 * @param smallImageId the small image ID 196 * @return the matching shopping item 197 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 198 * @throws SystemException if a system exception occurred 199 */ 200 public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId( 201 long smallImageId) 202 throws com.liferay.portal.kernel.exception.SystemException, 203 com.liferay.portlet.shopping.NoSuchItemException { 204 return getPersistence().findBySmallImageId(smallImageId); 205 } 206 207 /** 208 * Returns the shopping item where smallImageId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 209 * 210 * @param smallImageId the small image ID 211 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 212 * @throws SystemException if a system exception occurred 213 */ 214 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId( 215 long smallImageId) 216 throws com.liferay.portal.kernel.exception.SystemException { 217 return getPersistence().fetchBySmallImageId(smallImageId); 218 } 219 220 /** 221 * Returns the shopping item where smallImageId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 222 * 223 * @param smallImageId the small image ID 224 * @param retrieveFromCache whether to use the finder cache 225 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 226 * @throws SystemException if a system exception occurred 227 */ 228 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId( 229 long smallImageId, boolean retrieveFromCache) 230 throws com.liferay.portal.kernel.exception.SystemException { 231 return getPersistence() 232 .fetchBySmallImageId(smallImageId, retrieveFromCache); 233 } 234 235 /** 236 * Returns the shopping item where mediumImageId = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 237 * 238 * @param mediumImageId the medium image ID 239 * @return the matching shopping item 240 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 241 * @throws SystemException if a system exception occurred 242 */ 243 public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId( 244 long mediumImageId) 245 throws com.liferay.portal.kernel.exception.SystemException, 246 com.liferay.portlet.shopping.NoSuchItemException { 247 return getPersistence().findByMediumImageId(mediumImageId); 248 } 249 250 /** 251 * Returns the shopping item where mediumImageId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 252 * 253 * @param mediumImageId the medium image ID 254 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 255 * @throws SystemException if a system exception occurred 256 */ 257 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId( 258 long mediumImageId) 259 throws com.liferay.portal.kernel.exception.SystemException { 260 return getPersistence().fetchByMediumImageId(mediumImageId); 261 } 262 263 /** 264 * Returns the shopping item where mediumImageId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 265 * 266 * @param mediumImageId the medium image ID 267 * @param retrieveFromCache whether to use the finder cache 268 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 269 * @throws SystemException if a system exception occurred 270 */ 271 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId( 272 long mediumImageId, boolean retrieveFromCache) 273 throws com.liferay.portal.kernel.exception.SystemException { 274 return getPersistence() 275 .fetchByMediumImageId(mediumImageId, retrieveFromCache); 276 } 277 278 /** 279 * Returns the shopping item where largeImageId = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 280 * 281 * @param largeImageId the large image ID 282 * @return the matching shopping item 283 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId( 287 long largeImageId) 288 throws com.liferay.portal.kernel.exception.SystemException, 289 com.liferay.portlet.shopping.NoSuchItemException { 290 return getPersistence().findByLargeImageId(largeImageId); 291 } 292 293 /** 294 * Returns the shopping item where largeImageId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 295 * 296 * @param largeImageId the large image ID 297 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 298 * @throws SystemException if a system exception occurred 299 */ 300 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId( 301 long largeImageId) 302 throws com.liferay.portal.kernel.exception.SystemException { 303 return getPersistence().fetchByLargeImageId(largeImageId); 304 } 305 306 /** 307 * Returns the shopping item where largeImageId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 308 * 309 * @param largeImageId the large image ID 310 * @param retrieveFromCache whether to use the finder cache 311 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 312 * @throws SystemException if a system exception occurred 313 */ 314 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId( 315 long largeImageId, boolean retrieveFromCache) 316 throws com.liferay.portal.kernel.exception.SystemException { 317 return getPersistence() 318 .fetchByLargeImageId(largeImageId, retrieveFromCache); 319 } 320 321 /** 322 * Returns all the shopping items where groupId = ? and categoryId = ?. 323 * 324 * @param groupId the group ID 325 * @param categoryId the category ID 326 * @return the matching shopping items 327 * @throws SystemException if a system exception occurred 328 */ 329 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C( 330 long groupId, long categoryId) 331 throws com.liferay.portal.kernel.exception.SystemException { 332 return getPersistence().findByG_C(groupId, categoryId); 333 } 334 335 /** 336 * Returns a range of all the shopping items where groupId = ? and categoryId = ?. 337 * 338 * <p> 339 * 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. 340 * </p> 341 * 342 * @param groupId the group ID 343 * @param categoryId the category ID 344 * @param start the lower bound of the range of shopping items 345 * @param end the upper bound of the range of shopping items (not inclusive) 346 * @return the range of matching shopping items 347 * @throws SystemException if a system exception occurred 348 */ 349 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C( 350 long groupId, long categoryId, int start, int end) 351 throws com.liferay.portal.kernel.exception.SystemException { 352 return getPersistence().findByG_C(groupId, categoryId, start, end); 353 } 354 355 /** 356 * Returns an ordered range of all the shopping items where groupId = ? and categoryId = ?. 357 * 358 * <p> 359 * 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. 360 * </p> 361 * 362 * @param groupId the group ID 363 * @param categoryId the category ID 364 * @param start the lower bound of the range of shopping items 365 * @param end the upper bound of the range of shopping items (not inclusive) 366 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 367 * @return the ordered range of matching shopping items 368 * @throws SystemException if a system exception occurred 369 */ 370 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C( 371 long groupId, long categoryId, int start, int end, 372 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 373 throws com.liferay.portal.kernel.exception.SystemException { 374 return getPersistence() 375 .findByG_C(groupId, categoryId, start, end, orderByComparator); 376 } 377 378 /** 379 * Returns the first shopping item in the ordered set where groupId = ? and categoryId = ?. 380 * 381 * @param groupId the group ID 382 * @param categoryId the category ID 383 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 384 * @return the first matching shopping item 385 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 386 * @throws SystemException if a system exception occurred 387 */ 388 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First( 389 long groupId, long categoryId, 390 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 391 throws com.liferay.portal.kernel.exception.SystemException, 392 com.liferay.portlet.shopping.NoSuchItemException { 393 return getPersistence() 394 .findByG_C_First(groupId, categoryId, orderByComparator); 395 } 396 397 /** 398 * Returns the first shopping item in the ordered set where groupId = ? and categoryId = ?. 399 * 400 * @param groupId the group ID 401 * @param categoryId the category ID 402 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 403 * @return the first matching shopping item, or <code>null</code> if a matching shopping item could not be found 404 * @throws SystemException if a system exception occurred 405 */ 406 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByG_C_First( 407 long groupId, long categoryId, 408 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 409 throws com.liferay.portal.kernel.exception.SystemException { 410 return getPersistence() 411 .fetchByG_C_First(groupId, categoryId, orderByComparator); 412 } 413 414 /** 415 * Returns the last shopping item in the ordered set where groupId = ? and categoryId = ?. 416 * 417 * @param groupId the group ID 418 * @param categoryId the category ID 419 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 420 * @return the last matching shopping item 421 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 422 * @throws SystemException if a system exception occurred 423 */ 424 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last( 425 long groupId, long categoryId, 426 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 427 throws com.liferay.portal.kernel.exception.SystemException, 428 com.liferay.portlet.shopping.NoSuchItemException { 429 return getPersistence() 430 .findByG_C_Last(groupId, categoryId, orderByComparator); 431 } 432 433 /** 434 * Returns the last shopping item in the ordered set where groupId = ? and categoryId = ?. 435 * 436 * @param groupId the group ID 437 * @param categoryId the category ID 438 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 439 * @return the last matching shopping item, or <code>null</code> if a matching shopping item could not be found 440 * @throws SystemException if a system exception occurred 441 */ 442 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByG_C_Last( 443 long groupId, long categoryId, 444 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 445 throws com.liferay.portal.kernel.exception.SystemException { 446 return getPersistence() 447 .fetchByG_C_Last(groupId, categoryId, orderByComparator); 448 } 449 450 /** 451 * Returns the shopping items before and after the current shopping item in the ordered set where groupId = ? and categoryId = ?. 452 * 453 * @param itemId the primary key of the current shopping item 454 * @param groupId the group ID 455 * @param categoryId the category ID 456 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 457 * @return the previous, current, and next shopping item 458 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 459 * @throws SystemException if a system exception occurred 460 */ 461 public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext( 462 long itemId, long groupId, long categoryId, 463 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 464 throws com.liferay.portal.kernel.exception.SystemException, 465 com.liferay.portlet.shopping.NoSuchItemException { 466 return getPersistence() 467 .findByG_C_PrevAndNext(itemId, groupId, categoryId, 468 orderByComparator); 469 } 470 471 /** 472 * Returns all the shopping items that the user has permission to view where groupId = ? and categoryId = ?. 473 * 474 * @param groupId the group ID 475 * @param categoryId the category ID 476 * @return the matching shopping items that the user has permission to view 477 * @throws SystemException if a system exception occurred 478 */ 479 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C( 480 long groupId, long categoryId) 481 throws com.liferay.portal.kernel.exception.SystemException { 482 return getPersistence().filterFindByG_C(groupId, categoryId); 483 } 484 485 /** 486 * Returns a range of all the shopping items that the user has permission to view where groupId = ? and categoryId = ?. 487 * 488 * <p> 489 * 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. 490 * </p> 491 * 492 * @param groupId the group ID 493 * @param categoryId the category ID 494 * @param start the lower bound of the range of shopping items 495 * @param end the upper bound of the range of shopping items (not inclusive) 496 * @return the range of matching shopping items that the user has permission to view 497 * @throws SystemException if a system exception occurred 498 */ 499 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C( 500 long groupId, long categoryId, int start, int end) 501 throws com.liferay.portal.kernel.exception.SystemException { 502 return getPersistence().filterFindByG_C(groupId, categoryId, start, end); 503 } 504 505 /** 506 * Returns an ordered range of all the shopping items that the user has permissions to view where groupId = ? and categoryId = ?. 507 * 508 * <p> 509 * 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. 510 * </p> 511 * 512 * @param groupId the group ID 513 * @param categoryId the category ID 514 * @param start the lower bound of the range of shopping items 515 * @param end the upper bound of the range of shopping items (not inclusive) 516 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 517 * @return the ordered range of matching shopping items that the user has permission to view 518 * @throws SystemException if a system exception occurred 519 */ 520 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C( 521 long groupId, long categoryId, int start, int end, 522 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 523 throws com.liferay.portal.kernel.exception.SystemException { 524 return getPersistence() 525 .filterFindByG_C(groupId, categoryId, start, end, 526 orderByComparator); 527 } 528 529 /** 530 * Returns the shopping items before and after the current shopping item in the ordered set of shopping items that the user has permission to view where groupId = ? and categoryId = ?. 531 * 532 * @param itemId the primary key of the current shopping item 533 * @param groupId the group ID 534 * @param categoryId the category ID 535 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 536 * @return the previous, current, and next shopping item 537 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 538 * @throws SystemException if a system exception occurred 539 */ 540 public static com.liferay.portlet.shopping.model.ShoppingItem[] filterFindByG_C_PrevAndNext( 541 long itemId, long groupId, long categoryId, 542 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 543 throws com.liferay.portal.kernel.exception.SystemException, 544 com.liferay.portlet.shopping.NoSuchItemException { 545 return getPersistence() 546 .filterFindByG_C_PrevAndNext(itemId, groupId, categoryId, 547 orderByComparator); 548 } 549 550 /** 551 * Returns the shopping item where companyId = ? and sku = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 552 * 553 * @param companyId the company ID 554 * @param sku the sku 555 * @return the matching shopping item 556 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 557 * @throws SystemException if a system exception occurred 558 */ 559 public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S( 560 long companyId, java.lang.String sku) 561 throws com.liferay.portal.kernel.exception.SystemException, 562 com.liferay.portlet.shopping.NoSuchItemException { 563 return getPersistence().findByC_S(companyId, sku); 564 } 565 566 /** 567 * Returns the shopping item where companyId = ? and sku = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 568 * 569 * @param companyId the company ID 570 * @param sku the sku 571 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 572 * @throws SystemException if a system exception occurred 573 */ 574 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S( 575 long companyId, java.lang.String sku) 576 throws com.liferay.portal.kernel.exception.SystemException { 577 return getPersistence().fetchByC_S(companyId, sku); 578 } 579 580 /** 581 * Returns the shopping item where companyId = ? and sku = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 582 * 583 * @param companyId the company ID 584 * @param sku the sku 585 * @param retrieveFromCache whether to use the finder cache 586 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 587 * @throws SystemException if a system exception occurred 588 */ 589 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S( 590 long companyId, java.lang.String sku, boolean retrieveFromCache) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache); 593 } 594 595 /** 596 * Returns all the shopping items. 597 * 598 * @return the shopping items 599 * @throws SystemException if a system exception occurred 600 */ 601 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll() 602 throws com.liferay.portal.kernel.exception.SystemException { 603 return getPersistence().findAll(); 604 } 605 606 /** 607 * Returns a range of all the shopping items. 608 * 609 * <p> 610 * 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. 611 * </p> 612 * 613 * @param start the lower bound of the range of shopping items 614 * @param end the upper bound of the range of shopping items (not inclusive) 615 * @return the range of shopping items 616 * @throws SystemException if a system exception occurred 617 */ 618 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll( 619 int start, int end) 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return getPersistence().findAll(start, end); 622 } 623 624 /** 625 * Returns an ordered range of all the shopping items. 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 start the lower bound of the range of shopping items 632 * @param end the upper bound of the range of shopping items (not inclusive) 633 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 634 * @return the ordered range of shopping items 635 * @throws SystemException if a system exception occurred 636 */ 637 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll( 638 int start, int end, 639 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().findAll(start, end, orderByComparator); 642 } 643 644 /** 645 * Removes the shopping item where smallImageId = ? from the database. 646 * 647 * @param smallImageId the small image ID 648 * @return the shopping item that was removed 649 * @throws SystemException if a system exception occurred 650 */ 651 public static com.liferay.portlet.shopping.model.ShoppingItem removeBySmallImageId( 652 long smallImageId) 653 throws com.liferay.portal.kernel.exception.SystemException, 654 com.liferay.portlet.shopping.NoSuchItemException { 655 return getPersistence().removeBySmallImageId(smallImageId); 656 } 657 658 /** 659 * Removes the shopping item where mediumImageId = ? from the database. 660 * 661 * @param mediumImageId the medium image ID 662 * @return the shopping item that was removed 663 * @throws SystemException if a system exception occurred 664 */ 665 public static com.liferay.portlet.shopping.model.ShoppingItem removeByMediumImageId( 666 long mediumImageId) 667 throws com.liferay.portal.kernel.exception.SystemException, 668 com.liferay.portlet.shopping.NoSuchItemException { 669 return getPersistence().removeByMediumImageId(mediumImageId); 670 } 671 672 /** 673 * Removes the shopping item where largeImageId = ? from the database. 674 * 675 * @param largeImageId the large image ID 676 * @return the shopping item that was removed 677 * @throws SystemException if a system exception occurred 678 */ 679 public static com.liferay.portlet.shopping.model.ShoppingItem removeByLargeImageId( 680 long largeImageId) 681 throws com.liferay.portal.kernel.exception.SystemException, 682 com.liferay.portlet.shopping.NoSuchItemException { 683 return getPersistence().removeByLargeImageId(largeImageId); 684 } 685 686 /** 687 * Removes all the shopping items where groupId = ? and categoryId = ? from the database. 688 * 689 * @param groupId the group ID 690 * @param categoryId the category ID 691 * @throws SystemException if a system exception occurred 692 */ 693 public static void removeByG_C(long groupId, long categoryId) 694 throws com.liferay.portal.kernel.exception.SystemException { 695 getPersistence().removeByG_C(groupId, categoryId); 696 } 697 698 /** 699 * Removes the shopping item where companyId = ? and sku = ? from the database. 700 * 701 * @param companyId the company ID 702 * @param sku the sku 703 * @return the shopping item that was removed 704 * @throws SystemException if a system exception occurred 705 */ 706 public static com.liferay.portlet.shopping.model.ShoppingItem removeByC_S( 707 long companyId, java.lang.String sku) 708 throws com.liferay.portal.kernel.exception.SystemException, 709 com.liferay.portlet.shopping.NoSuchItemException { 710 return getPersistence().removeByC_S(companyId, sku); 711 } 712 713 /** 714 * Removes all the shopping items from the database. 715 * 716 * @throws SystemException if a system exception occurred 717 */ 718 public static void removeAll() 719 throws com.liferay.portal.kernel.exception.SystemException { 720 getPersistence().removeAll(); 721 } 722 723 /** 724 * Returns the number of shopping items where smallImageId = ?. 725 * 726 * @param smallImageId the small image ID 727 * @return the number of matching shopping items 728 * @throws SystemException if a system exception occurred 729 */ 730 public static int countBySmallImageId(long smallImageId) 731 throws com.liferay.portal.kernel.exception.SystemException { 732 return getPersistence().countBySmallImageId(smallImageId); 733 } 734 735 /** 736 * Returns the number of shopping items where mediumImageId = ?. 737 * 738 * @param mediumImageId the medium image ID 739 * @return the number of matching shopping items 740 * @throws SystemException if a system exception occurred 741 */ 742 public static int countByMediumImageId(long mediumImageId) 743 throws com.liferay.portal.kernel.exception.SystemException { 744 return getPersistence().countByMediumImageId(mediumImageId); 745 } 746 747 /** 748 * Returns the number of shopping items where largeImageId = ?. 749 * 750 * @param largeImageId the large image ID 751 * @return the number of matching shopping items 752 * @throws SystemException if a system exception occurred 753 */ 754 public static int countByLargeImageId(long largeImageId) 755 throws com.liferay.portal.kernel.exception.SystemException { 756 return getPersistence().countByLargeImageId(largeImageId); 757 } 758 759 /** 760 * Returns the number of shopping items where groupId = ? and categoryId = ?. 761 * 762 * @param groupId the group ID 763 * @param categoryId the category ID 764 * @return the number of matching shopping items 765 * @throws SystemException if a system exception occurred 766 */ 767 public static int countByG_C(long groupId, long categoryId) 768 throws com.liferay.portal.kernel.exception.SystemException { 769 return getPersistence().countByG_C(groupId, categoryId); 770 } 771 772 /** 773 * Returns the number of shopping items that the user has permission to view where groupId = ? and categoryId = ?. 774 * 775 * @param groupId the group ID 776 * @param categoryId the category ID 777 * @return the number of matching shopping items that the user has permission to view 778 * @throws SystemException if a system exception occurred 779 */ 780 public static int filterCountByG_C(long groupId, long categoryId) 781 throws com.liferay.portal.kernel.exception.SystemException { 782 return getPersistence().filterCountByG_C(groupId, categoryId); 783 } 784 785 /** 786 * Returns the number of shopping items where companyId = ? and sku = ?. 787 * 788 * @param companyId the company ID 789 * @param sku the sku 790 * @return the number of matching shopping items 791 * @throws SystemException if a system exception occurred 792 */ 793 public static int countByC_S(long companyId, java.lang.String sku) 794 throws com.liferay.portal.kernel.exception.SystemException { 795 return getPersistence().countByC_S(companyId, sku); 796 } 797 798 /** 799 * Returns the number of shopping items. 800 * 801 * @return the number of shopping items 802 * @throws SystemException if a system exception occurred 803 */ 804 public static int countAll() 805 throws com.liferay.portal.kernel.exception.SystemException { 806 return getPersistence().countAll(); 807 } 808 809 /** 810 * Returns all the shopping item prices associated with the shopping item. 811 * 812 * @param pk the primary key of the shopping item 813 * @return the shopping item prices associated with the shopping item 814 * @throws SystemException if a system exception occurred 815 */ 816 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices( 817 long pk) throws com.liferay.portal.kernel.exception.SystemException { 818 return getPersistence().getShoppingItemPrices(pk); 819 } 820 821 /** 822 * Returns a range of all the shopping item prices associated with the shopping item. 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 pk the primary key of the shopping item 829 * @param start the lower bound of the range of shopping items 830 * @param end the upper bound of the range of shopping items (not inclusive) 831 * @return the range of shopping item prices associated with the shopping item 832 * @throws SystemException if a system exception occurred 833 */ 834 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices( 835 long pk, int start, int end) 836 throws com.liferay.portal.kernel.exception.SystemException { 837 return getPersistence().getShoppingItemPrices(pk, start, end); 838 } 839 840 /** 841 * Returns an ordered range of all the shopping item prices associated with the shopping item. 842 * 843 * <p> 844 * 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. 845 * </p> 846 * 847 * @param pk the primary key of the shopping item 848 * @param start the lower bound of the range of shopping items 849 * @param end the upper bound of the range of shopping items (not inclusive) 850 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 851 * @return the ordered range of shopping item prices associated with the shopping item 852 * @throws SystemException if a system exception occurred 853 */ 854 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices( 855 long pk, int start, int end, 856 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 857 throws com.liferay.portal.kernel.exception.SystemException { 858 return getPersistence() 859 .getShoppingItemPrices(pk, start, end, orderByComparator); 860 } 861 862 /** 863 * Returns the number of shopping item prices associated with the shopping item. 864 * 865 * @param pk the primary key of the shopping item 866 * @return the number of shopping item prices associated with the shopping item 867 * @throws SystemException if a system exception occurred 868 */ 869 public static int getShoppingItemPricesSize(long pk) 870 throws com.liferay.portal.kernel.exception.SystemException { 871 return getPersistence().getShoppingItemPricesSize(pk); 872 } 873 874 /** 875 * Returns <code>true</code> if the shopping item price is associated with the shopping item. 876 * 877 * @param pk the primary key of the shopping item 878 * @param shoppingItemPricePK the primary key of the shopping item price 879 * @return <code>true</code> if the shopping item price is associated with the shopping item; <code>false</code> otherwise 880 * @throws SystemException if a system exception occurred 881 */ 882 public static boolean containsShoppingItemPrice(long pk, 883 long shoppingItemPricePK) 884 throws com.liferay.portal.kernel.exception.SystemException { 885 return getPersistence() 886 .containsShoppingItemPrice(pk, shoppingItemPricePK); 887 } 888 889 /** 890 * Returns <code>true</code> if the shopping item has any shopping item prices associated with it. 891 * 892 * @param pk the primary key of the shopping item to check for associations with shopping item prices 893 * @return <code>true</code> if the shopping item has any shopping item prices associated with it; <code>false</code> otherwise 894 * @throws SystemException if a system exception occurred 895 */ 896 public static boolean containsShoppingItemPrices(long pk) 897 throws com.liferay.portal.kernel.exception.SystemException { 898 return getPersistence().containsShoppingItemPrices(pk); 899 } 900 901 public static ShoppingItemPersistence getPersistence() { 902 if (_persistence == null) { 903 _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName()); 904 905 ReferenceRegistry.registerReference(ShoppingItemUtil.class, 906 "_persistence"); 907 } 908 909 return _persistence; 910 } 911 912 /** 913 * @deprecated 914 */ 915 public void setPersistence(ShoppingItemPersistence persistence) { 916 } 917 918 private static ShoppingItemPersistence _persistence; 919 }