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