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