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