001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.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, boolean) 099 */ 100 public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge) 101 throws SystemException { 102 return getPersistence().update(shoppingItem, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(shoppingItem, merge, 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 boolean merge) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().updateImpl(shoppingItem, merge); 164 } 165 166 /** 167 * Returns the shopping item with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 168 * 169 * @param itemId the primary key of the shopping item 170 * @return the shopping item 171 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey( 175 long itemId) 176 throws com.liferay.portal.kernel.exception.SystemException, 177 com.liferay.portlet.shopping.NoSuchItemException { 178 return getPersistence().findByPrimaryKey(itemId); 179 } 180 181 /** 182 * Returns the shopping item with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param itemId the primary key of the shopping item 185 * @return the shopping item, or <code>null</code> if a shopping item with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey( 189 long itemId) throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(itemId); 191 } 192 193 /** 194 * Returns the shopping item where smallImageId = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 195 * 196 * @param smallImageId the small image ID 197 * @return the matching shopping item 198 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 199 * @throws SystemException if a system exception occurred 200 */ 201 public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId( 202 long smallImageId) 203 throws com.liferay.portal.kernel.exception.SystemException, 204 com.liferay.portlet.shopping.NoSuchItemException { 205 return getPersistence().findBySmallImageId(smallImageId); 206 } 207 208 /** 209 * Returns the shopping item where smallImageId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 210 * 211 * @param smallImageId the small image ID 212 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 213 * @throws SystemException if a system exception occurred 214 */ 215 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId( 216 long smallImageId) 217 throws com.liferay.portal.kernel.exception.SystemException { 218 return getPersistence().fetchBySmallImageId(smallImageId); 219 } 220 221 /** 222 * Returns the shopping item where smallImageId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 223 * 224 * @param smallImageId the small image ID 225 * @param retrieveFromCache whether to use the finder cache 226 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 227 * @throws SystemException if a system exception occurred 228 */ 229 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId( 230 long smallImageId, boolean retrieveFromCache) 231 throws com.liferay.portal.kernel.exception.SystemException { 232 return getPersistence() 233 .fetchBySmallImageId(smallImageId, retrieveFromCache); 234 } 235 236 /** 237 * Returns the shopping item where mediumImageId = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 238 * 239 * @param mediumImageId the medium image ID 240 * @return the matching shopping item 241 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 242 * @throws SystemException if a system exception occurred 243 */ 244 public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId( 245 long mediumImageId) 246 throws com.liferay.portal.kernel.exception.SystemException, 247 com.liferay.portlet.shopping.NoSuchItemException { 248 return getPersistence().findByMediumImageId(mediumImageId); 249 } 250 251 /** 252 * Returns the shopping item where mediumImageId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 253 * 254 * @param mediumImageId the medium image ID 255 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 256 * @throws SystemException if a system exception occurred 257 */ 258 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId( 259 long mediumImageId) 260 throws com.liferay.portal.kernel.exception.SystemException { 261 return getPersistence().fetchByMediumImageId(mediumImageId); 262 } 263 264 /** 265 * Returns the shopping item where mediumImageId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 266 * 267 * @param mediumImageId the medium image ID 268 * @param retrieveFromCache whether to use the finder cache 269 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId( 273 long mediumImageId, boolean retrieveFromCache) 274 throws com.liferay.portal.kernel.exception.SystemException { 275 return getPersistence() 276 .fetchByMediumImageId(mediumImageId, retrieveFromCache); 277 } 278 279 /** 280 * Returns the shopping item where largeImageId = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 281 * 282 * @param largeImageId the large image ID 283 * @return the matching shopping item 284 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 285 * @throws SystemException if a system exception occurred 286 */ 287 public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId( 288 long largeImageId) 289 throws com.liferay.portal.kernel.exception.SystemException, 290 com.liferay.portlet.shopping.NoSuchItemException { 291 return getPersistence().findByLargeImageId(largeImageId); 292 } 293 294 /** 295 * Returns the shopping item where largeImageId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 296 * 297 * @param largeImageId the large image ID 298 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 299 * @throws SystemException if a system exception occurred 300 */ 301 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId( 302 long largeImageId) 303 throws com.liferay.portal.kernel.exception.SystemException { 304 return getPersistence().fetchByLargeImageId(largeImageId); 305 } 306 307 /** 308 * Returns the shopping item where largeImageId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 309 * 310 * @param largeImageId the large image ID 311 * @param retrieveFromCache whether to use the finder cache 312 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 313 * @throws SystemException if a system exception occurred 314 */ 315 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId( 316 long largeImageId, boolean retrieveFromCache) 317 throws com.liferay.portal.kernel.exception.SystemException { 318 return getPersistence() 319 .fetchByLargeImageId(largeImageId, retrieveFromCache); 320 } 321 322 /** 323 * Returns all the shopping items where groupId = ? and categoryId = ?. 324 * 325 * @param groupId the group ID 326 * @param categoryId the category ID 327 * @return the matching shopping items 328 * @throws SystemException if a system exception occurred 329 */ 330 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C( 331 long groupId, long categoryId) 332 throws com.liferay.portal.kernel.exception.SystemException { 333 return getPersistence().findByG_C(groupId, categoryId); 334 } 335 336 /** 337 * Returns a range of all the shopping items where groupId = ? and categoryId = ?. 338 * 339 * <p> 340 * 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. 341 * </p> 342 * 343 * @param groupId the group ID 344 * @param categoryId the category ID 345 * @param start the lower bound of the range of shopping items 346 * @param end the upper bound of the range of shopping items (not inclusive) 347 * @return the range of matching shopping items 348 * @throws SystemException if a system exception occurred 349 */ 350 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C( 351 long groupId, long categoryId, int start, int end) 352 throws com.liferay.portal.kernel.exception.SystemException { 353 return getPersistence().findByG_C(groupId, categoryId, start, end); 354 } 355 356 /** 357 * Returns an ordered range of all the shopping items where groupId = ? and categoryId = ?. 358 * 359 * <p> 360 * 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. 361 * </p> 362 * 363 * @param groupId the group ID 364 * @param categoryId the category ID 365 * @param start the lower bound of the range of shopping items 366 * @param end the upper bound of the range of shopping items (not inclusive) 367 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 368 * @return the ordered range of matching shopping items 369 * @throws SystemException if a system exception occurred 370 */ 371 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C( 372 long groupId, long categoryId, int start, int end, 373 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 374 throws com.liferay.portal.kernel.exception.SystemException { 375 return getPersistence() 376 .findByG_C(groupId, categoryId, start, end, orderByComparator); 377 } 378 379 /** 380 * Returns the first shopping item in the ordered set where groupId = ? and categoryId = ?. 381 * 382 * @param groupId the group ID 383 * @param categoryId the category ID 384 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 385 * @return the first matching shopping item 386 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 387 * @throws SystemException if a system exception occurred 388 */ 389 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First( 390 long groupId, long categoryId, 391 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 392 throws com.liferay.portal.kernel.exception.SystemException, 393 com.liferay.portlet.shopping.NoSuchItemException { 394 return getPersistence() 395 .findByG_C_First(groupId, categoryId, orderByComparator); 396 } 397 398 /** 399 * Returns the first shopping item in the ordered set where groupId = ? and categoryId = ?. 400 * 401 * @param groupId the group ID 402 * @param categoryId the category ID 403 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 404 * @return the first matching shopping item, or <code>null</code> if a matching shopping item could not be found 405 * @throws SystemException if a system exception occurred 406 */ 407 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByG_C_First( 408 long groupId, long categoryId, 409 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 410 throws com.liferay.portal.kernel.exception.SystemException { 411 return getPersistence() 412 .fetchByG_C_First(groupId, categoryId, orderByComparator); 413 } 414 415 /** 416 * Returns the last shopping item in the ordered set where groupId = ? and categoryId = ?. 417 * 418 * @param groupId the group ID 419 * @param categoryId the category ID 420 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 421 * @return the last matching shopping item 422 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 423 * @throws SystemException if a system exception occurred 424 */ 425 public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last( 426 long groupId, long categoryId, 427 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 428 throws com.liferay.portal.kernel.exception.SystemException, 429 com.liferay.portlet.shopping.NoSuchItemException { 430 return getPersistence() 431 .findByG_C_Last(groupId, categoryId, orderByComparator); 432 } 433 434 /** 435 * Returns the last shopping item in the ordered set where groupId = ? and categoryId = ?. 436 * 437 * @param groupId the group ID 438 * @param categoryId the category ID 439 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 440 * @return the last matching shopping item, or <code>null</code> if a matching shopping item could not be found 441 * @throws SystemException if a system exception occurred 442 */ 443 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByG_C_Last( 444 long groupId, long categoryId, 445 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 return getPersistence() 448 .fetchByG_C_Last(groupId, categoryId, orderByComparator); 449 } 450 451 /** 452 * Returns the shopping items before and after the current shopping item in the ordered set where groupId = ? and categoryId = ?. 453 * 454 * @param itemId the primary key of the current shopping item 455 * @param groupId the group ID 456 * @param categoryId the category ID 457 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 458 * @return the previous, current, and next shopping item 459 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 460 * @throws SystemException if a system exception occurred 461 */ 462 public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext( 463 long itemId, long groupId, long categoryId, 464 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 465 throws com.liferay.portal.kernel.exception.SystemException, 466 com.liferay.portlet.shopping.NoSuchItemException { 467 return getPersistence() 468 .findByG_C_PrevAndNext(itemId, groupId, categoryId, 469 orderByComparator); 470 } 471 472 /** 473 * Returns all the shopping items that the user has permission to view where groupId = ? and categoryId = ?. 474 * 475 * @param groupId the group ID 476 * @param categoryId the category ID 477 * @return the matching shopping items that the user has permission to view 478 * @throws SystemException if a system exception occurred 479 */ 480 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C( 481 long groupId, long categoryId) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence().filterFindByG_C(groupId, categoryId); 484 } 485 486 /** 487 * Returns a range of all the shopping items that the user has permission to view where groupId = ? and categoryId = ?. 488 * 489 * <p> 490 * 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. 491 * </p> 492 * 493 * @param groupId the group ID 494 * @param categoryId the category ID 495 * @param start the lower bound of the range of shopping items 496 * @param end the upper bound of the range of shopping items (not inclusive) 497 * @return the range of matching shopping items that the user has permission to view 498 * @throws SystemException if a system exception occurred 499 */ 500 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C( 501 long groupId, long categoryId, int start, int end) 502 throws com.liferay.portal.kernel.exception.SystemException { 503 return getPersistence().filterFindByG_C(groupId, categoryId, start, end); 504 } 505 506 /** 507 * Returns an ordered range of all the shopping items that the user has permissions to view where groupId = ? and categoryId = ?. 508 * 509 * <p> 510 * 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. 511 * </p> 512 * 513 * @param groupId the group ID 514 * @param categoryId the category ID 515 * @param start the lower bound of the range of shopping items 516 * @param end the upper bound of the range of shopping items (not inclusive) 517 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 518 * @return the ordered range of matching shopping items that the user has permission to view 519 * @throws SystemException if a system exception occurred 520 */ 521 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C( 522 long groupId, long categoryId, int start, int end, 523 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 524 throws com.liferay.portal.kernel.exception.SystemException { 525 return getPersistence() 526 .filterFindByG_C(groupId, categoryId, start, end, 527 orderByComparator); 528 } 529 530 /** 531 * 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 = ?. 532 * 533 * @param itemId the primary key of the current shopping item 534 * @param groupId the group ID 535 * @param categoryId the category ID 536 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 537 * @return the previous, current, and next shopping item 538 * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found 539 * @throws SystemException if a system exception occurred 540 */ 541 public static com.liferay.portlet.shopping.model.ShoppingItem[] filterFindByG_C_PrevAndNext( 542 long itemId, long groupId, long categoryId, 543 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 544 throws com.liferay.portal.kernel.exception.SystemException, 545 com.liferay.portlet.shopping.NoSuchItemException { 546 return getPersistence() 547 .filterFindByG_C_PrevAndNext(itemId, groupId, categoryId, 548 orderByComparator); 549 } 550 551 /** 552 * Returns the shopping item where companyId = ? and sku = ? or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found. 553 * 554 * @param companyId the company ID 555 * @param sku the sku 556 * @return the matching shopping item 557 * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found 558 * @throws SystemException if a system exception occurred 559 */ 560 public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S( 561 long companyId, java.lang.String sku) 562 throws com.liferay.portal.kernel.exception.SystemException, 563 com.liferay.portlet.shopping.NoSuchItemException { 564 return getPersistence().findByC_S(companyId, sku); 565 } 566 567 /** 568 * Returns the shopping item where companyId = ? and sku = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 569 * 570 * @param companyId the company ID 571 * @param sku the sku 572 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 573 * @throws SystemException if a system exception occurred 574 */ 575 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S( 576 long companyId, java.lang.String sku) 577 throws com.liferay.portal.kernel.exception.SystemException { 578 return getPersistence().fetchByC_S(companyId, sku); 579 } 580 581 /** 582 * Returns the shopping item where companyId = ? and sku = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 583 * 584 * @param companyId the company ID 585 * @param sku the sku 586 * @param retrieveFromCache whether to use the finder cache 587 * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found 588 * @throws SystemException if a system exception occurred 589 */ 590 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S( 591 long companyId, java.lang.String sku, boolean retrieveFromCache) 592 throws com.liferay.portal.kernel.exception.SystemException { 593 return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache); 594 } 595 596 /** 597 * Returns all the shopping items. 598 * 599 * @return the shopping items 600 * @throws SystemException if a system exception occurred 601 */ 602 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll() 603 throws com.liferay.portal.kernel.exception.SystemException { 604 return getPersistence().findAll(); 605 } 606 607 /** 608 * Returns a range of all the shopping items. 609 * 610 * <p> 611 * 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. 612 * </p> 613 * 614 * @param start the lower bound of the range of shopping items 615 * @param end the upper bound of the range of shopping items (not inclusive) 616 * @return the range of shopping items 617 * @throws SystemException if a system exception occurred 618 */ 619 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll( 620 int start, int end) 621 throws com.liferay.portal.kernel.exception.SystemException { 622 return getPersistence().findAll(start, end); 623 } 624 625 /** 626 * Returns an ordered range of all the shopping items. 627 * 628 * <p> 629 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 630 * </p> 631 * 632 * @param start the lower bound of the range of shopping items 633 * @param end the upper bound of the range of shopping items (not inclusive) 634 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 635 * @return the ordered range of shopping items 636 * @throws SystemException if a system exception occurred 637 */ 638 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll( 639 int start, int end, 640 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 641 throws com.liferay.portal.kernel.exception.SystemException { 642 return getPersistence().findAll(start, end, orderByComparator); 643 } 644 645 /** 646 * Removes the shopping item where smallImageId = ? from the database. 647 * 648 * @param smallImageId the small image ID 649 * @return the shopping item that was removed 650 * @throws SystemException if a system exception occurred 651 */ 652 public static com.liferay.portlet.shopping.model.ShoppingItem removeBySmallImageId( 653 long smallImageId) 654 throws com.liferay.portal.kernel.exception.SystemException, 655 com.liferay.portlet.shopping.NoSuchItemException { 656 return getPersistence().removeBySmallImageId(smallImageId); 657 } 658 659 /** 660 * Removes the shopping item where mediumImageId = ? from the database. 661 * 662 * @param mediumImageId the medium image ID 663 * @return the shopping item that was removed 664 * @throws SystemException if a system exception occurred 665 */ 666 public static com.liferay.portlet.shopping.model.ShoppingItem removeByMediumImageId( 667 long mediumImageId) 668 throws com.liferay.portal.kernel.exception.SystemException, 669 com.liferay.portlet.shopping.NoSuchItemException { 670 return getPersistence().removeByMediumImageId(mediumImageId); 671 } 672 673 /** 674 * Removes the shopping item where largeImageId = ? from the database. 675 * 676 * @param largeImageId the large image ID 677 * @return the shopping item that was removed 678 * @throws SystemException if a system exception occurred 679 */ 680 public static com.liferay.portlet.shopping.model.ShoppingItem removeByLargeImageId( 681 long largeImageId) 682 throws com.liferay.portal.kernel.exception.SystemException, 683 com.liferay.portlet.shopping.NoSuchItemException { 684 return getPersistence().removeByLargeImageId(largeImageId); 685 } 686 687 /** 688 * Removes all the shopping items where groupId = ? and categoryId = ? from the database. 689 * 690 * @param groupId the group ID 691 * @param categoryId the category ID 692 * @throws SystemException if a system exception occurred 693 */ 694 public static void removeByG_C(long groupId, long categoryId) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 getPersistence().removeByG_C(groupId, categoryId); 697 } 698 699 /** 700 * Removes the shopping item where companyId = ? and sku = ? from the database. 701 * 702 * @param companyId the company ID 703 * @param sku the sku 704 * @return the shopping item that was removed 705 * @throws SystemException if a system exception occurred 706 */ 707 public static com.liferay.portlet.shopping.model.ShoppingItem removeByC_S( 708 long companyId, java.lang.String sku) 709 throws com.liferay.portal.kernel.exception.SystemException, 710 com.liferay.portlet.shopping.NoSuchItemException { 711 return getPersistence().removeByC_S(companyId, sku); 712 } 713 714 /** 715 * Removes all the shopping items from the database. 716 * 717 * @throws SystemException if a system exception occurred 718 */ 719 public static void removeAll() 720 throws com.liferay.portal.kernel.exception.SystemException { 721 getPersistence().removeAll(); 722 } 723 724 /** 725 * Returns the number of shopping items where smallImageId = ?. 726 * 727 * @param smallImageId the small image ID 728 * @return the number of matching shopping items 729 * @throws SystemException if a system exception occurred 730 */ 731 public static int countBySmallImageId(long smallImageId) 732 throws com.liferay.portal.kernel.exception.SystemException { 733 return getPersistence().countBySmallImageId(smallImageId); 734 } 735 736 /** 737 * Returns the number of shopping items where mediumImageId = ?. 738 * 739 * @param mediumImageId the medium image ID 740 * @return the number of matching shopping items 741 * @throws SystemException if a system exception occurred 742 */ 743 public static int countByMediumImageId(long mediumImageId) 744 throws com.liferay.portal.kernel.exception.SystemException { 745 return getPersistence().countByMediumImageId(mediumImageId); 746 } 747 748 /** 749 * Returns the number of shopping items where largeImageId = ?. 750 * 751 * @param largeImageId the large image ID 752 * @return the number of matching shopping items 753 * @throws SystemException if a system exception occurred 754 */ 755 public static int countByLargeImageId(long largeImageId) 756 throws com.liferay.portal.kernel.exception.SystemException { 757 return getPersistence().countByLargeImageId(largeImageId); 758 } 759 760 /** 761 * Returns the number of shopping items where groupId = ? and categoryId = ?. 762 * 763 * @param groupId the group ID 764 * @param categoryId the category ID 765 * @return the number of matching shopping items 766 * @throws SystemException if a system exception occurred 767 */ 768 public static int countByG_C(long groupId, long categoryId) 769 throws com.liferay.portal.kernel.exception.SystemException { 770 return getPersistence().countByG_C(groupId, categoryId); 771 } 772 773 /** 774 * Returns the number of shopping items that the user has permission to view where groupId = ? and categoryId = ?. 775 * 776 * @param groupId the group ID 777 * @param categoryId the category ID 778 * @return the number of matching shopping items that the user has permission to view 779 * @throws SystemException if a system exception occurred 780 */ 781 public static int filterCountByG_C(long groupId, long categoryId) 782 throws com.liferay.portal.kernel.exception.SystemException { 783 return getPersistence().filterCountByG_C(groupId, categoryId); 784 } 785 786 /** 787 * Returns the number of shopping items where companyId = ? and sku = ?. 788 * 789 * @param companyId the company ID 790 * @param sku the sku 791 * @return the number of matching shopping items 792 * @throws SystemException if a system exception occurred 793 */ 794 public static int countByC_S(long companyId, java.lang.String sku) 795 throws com.liferay.portal.kernel.exception.SystemException { 796 return getPersistence().countByC_S(companyId, sku); 797 } 798 799 /** 800 * Returns the number of shopping items. 801 * 802 * @return the number of shopping items 803 * @throws SystemException if a system exception occurred 804 */ 805 public static int countAll() 806 throws com.liferay.portal.kernel.exception.SystemException { 807 return getPersistence().countAll(); 808 } 809 810 /** 811 * Returns all the shopping item prices associated with the shopping item. 812 * 813 * @param pk the primary key of the shopping item 814 * @return the shopping item prices associated with the shopping item 815 * @throws SystemException if a system exception occurred 816 */ 817 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices( 818 long pk) throws com.liferay.portal.kernel.exception.SystemException { 819 return getPersistence().getShoppingItemPrices(pk); 820 } 821 822 /** 823 * Returns a range of all the shopping item prices associated with the shopping item. 824 * 825 * <p> 826 * 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. 827 * </p> 828 * 829 * @param pk the primary key of the shopping item 830 * @param start the lower bound of the range of shopping items 831 * @param end the upper bound of the range of shopping items (not inclusive) 832 * @return the range of shopping item prices associated with the shopping item 833 * @throws SystemException if a system exception occurred 834 */ 835 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices( 836 long pk, int start, int end) 837 throws com.liferay.portal.kernel.exception.SystemException { 838 return getPersistence().getShoppingItemPrices(pk, start, end); 839 } 840 841 /** 842 * Returns an ordered range of all the shopping item prices associated with the shopping item. 843 * 844 * <p> 845 * 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. 846 * </p> 847 * 848 * @param pk the primary key of the shopping item 849 * @param start the lower bound of the range of shopping items 850 * @param end the upper bound of the range of shopping items (not inclusive) 851 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 852 * @return the ordered range of shopping item prices associated with the shopping item 853 * @throws SystemException if a system exception occurred 854 */ 855 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices( 856 long pk, int start, int end, 857 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 858 throws com.liferay.portal.kernel.exception.SystemException { 859 return getPersistence() 860 .getShoppingItemPrices(pk, start, end, orderByComparator); 861 } 862 863 /** 864 * Returns the number of shopping item prices associated with the shopping item. 865 * 866 * @param pk the primary key of the shopping item 867 * @return the number of shopping item prices associated with the shopping item 868 * @throws SystemException if a system exception occurred 869 */ 870 public static int getShoppingItemPricesSize(long pk) 871 throws com.liferay.portal.kernel.exception.SystemException { 872 return getPersistence().getShoppingItemPricesSize(pk); 873 } 874 875 /** 876 * Returns <code>true</code> if the shopping item price is associated with the shopping item. 877 * 878 * @param pk the primary key of the shopping item 879 * @param shoppingItemPricePK the primary key of the shopping item price 880 * @return <code>true</code> if the shopping item price is associated with the shopping item; <code>false</code> otherwise 881 * @throws SystemException if a system exception occurred 882 */ 883 public static boolean containsShoppingItemPrice(long pk, 884 long shoppingItemPricePK) 885 throws com.liferay.portal.kernel.exception.SystemException { 886 return getPersistence() 887 .containsShoppingItemPrice(pk, shoppingItemPricePK); 888 } 889 890 /** 891 * Returns <code>true</code> if the shopping item has any shopping item prices associated with it. 892 * 893 * @param pk the primary key of the shopping item to check for associations with shopping item prices 894 * @return <code>true</code> if the shopping item has any shopping item prices associated with it; <code>false</code> otherwise 895 * @throws SystemException if a system exception occurred 896 */ 897 public static boolean containsShoppingItemPrices(long pk) 898 throws com.liferay.portal.kernel.exception.SystemException { 899 return getPersistence().containsShoppingItemPrices(pk); 900 } 901 902 public static ShoppingItemPersistence getPersistence() { 903 if (_persistence == null) { 904 _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName()); 905 906 ReferenceRegistry.registerReference(ShoppingItemUtil.class, 907 "_persistence"); 908 } 909 910 return _persistence; 911 } 912 913 /** 914 * @deprecated 915 */ 916 public void setPersistence(ShoppingItemPersistence persistence) { 917 } 918 919 private static ShoppingItemPersistence _persistence; 920 }