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