001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.shopping.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.shopping.model.ShoppingItemPrice; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the shopping item price service. This utility wraps {@link ShoppingItemPricePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see ShoppingItemPricePersistence 037 * @see ShoppingItemPricePersistenceImpl 038 * @generated 039 */ 040 public class ShoppingItemPriceUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(ShoppingItemPrice shoppingItemPrice) { 058 getPersistence().clearCache(shoppingItemPrice); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<ShoppingItemPrice> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<ShoppingItemPrice> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<ShoppingItemPrice> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static ShoppingItemPrice update( 101 ShoppingItemPrice shoppingItemPrice, boolean merge) 102 throws SystemException { 103 return getPersistence().update(shoppingItemPrice, merge); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 108 */ 109 public static ShoppingItemPrice update( 110 ShoppingItemPrice shoppingItemPrice, boolean merge, 111 ServiceContext serviceContext) throws SystemException { 112 return getPersistence().update(shoppingItemPrice, merge, serviceContext); 113 } 114 115 /** 116 * Caches the shopping item price in the entity cache if it is enabled. 117 * 118 * @param shoppingItemPrice the shopping item price 119 */ 120 public static void cacheResult( 121 com.liferay.portlet.shopping.model.ShoppingItemPrice shoppingItemPrice) { 122 getPersistence().cacheResult(shoppingItemPrice); 123 } 124 125 /** 126 * Caches the shopping item prices in the entity cache if it is enabled. 127 * 128 * @param shoppingItemPrices the shopping item prices 129 */ 130 public static void cacheResult( 131 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> shoppingItemPrices) { 132 getPersistence().cacheResult(shoppingItemPrices); 133 } 134 135 /** 136 * Creates a new shopping item price with the primary key. Does not add the shopping item price to the database. 137 * 138 * @param itemPriceId the primary key for the new shopping item price 139 * @return the new shopping item price 140 */ 141 public static com.liferay.portlet.shopping.model.ShoppingItemPrice create( 142 long itemPriceId) { 143 return getPersistence().create(itemPriceId); 144 } 145 146 /** 147 * Removes the shopping item price with the primary key from the database. Also notifies the appropriate model listeners. 148 * 149 * @param itemPriceId the primary key of the shopping item price 150 * @return the shopping item price that was removed 151 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a shopping item price with the primary key could not be found 152 * @throws SystemException if a system exception occurred 153 */ 154 public static com.liferay.portlet.shopping.model.ShoppingItemPrice remove( 155 long itemPriceId) 156 throws com.liferay.portal.kernel.exception.SystemException, 157 com.liferay.portlet.shopping.NoSuchItemPriceException { 158 return getPersistence().remove(itemPriceId); 159 } 160 161 public static com.liferay.portlet.shopping.model.ShoppingItemPrice updateImpl( 162 com.liferay.portlet.shopping.model.ShoppingItemPrice shoppingItemPrice, 163 boolean merge) 164 throws com.liferay.portal.kernel.exception.SystemException { 165 return getPersistence().updateImpl(shoppingItemPrice, merge); 166 } 167 168 /** 169 * Returns the shopping item price with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemPriceException} if it could not be found. 170 * 171 * @param itemPriceId the primary key of the shopping item price 172 * @return the shopping item price 173 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a shopping item price with the primary key could not be found 174 * @throws SystemException if a system exception occurred 175 */ 176 public static com.liferay.portlet.shopping.model.ShoppingItemPrice findByPrimaryKey( 177 long itemPriceId) 178 throws com.liferay.portal.kernel.exception.SystemException, 179 com.liferay.portlet.shopping.NoSuchItemPriceException { 180 return getPersistence().findByPrimaryKey(itemPriceId); 181 } 182 183 /** 184 * Returns the shopping item price with the primary key or returns <code>null</code> if it could not be found. 185 * 186 * @param itemPriceId the primary key of the shopping item price 187 * @return the shopping item price, or <code>null</code> if a shopping item price with the primary key could not be found 188 * @throws SystemException if a system exception occurred 189 */ 190 public static com.liferay.portlet.shopping.model.ShoppingItemPrice fetchByPrimaryKey( 191 long itemPriceId) 192 throws com.liferay.portal.kernel.exception.SystemException { 193 return getPersistence().fetchByPrimaryKey(itemPriceId); 194 } 195 196 /** 197 * Returns all the shopping item prices where itemId = ?. 198 * 199 * @param itemId the item ID 200 * @return the matching shopping item prices 201 * @throws SystemException if a system exception occurred 202 */ 203 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findByItemId( 204 long itemId) throws com.liferay.portal.kernel.exception.SystemException { 205 return getPersistence().findByItemId(itemId); 206 } 207 208 /** 209 * Returns a range of all the shopping item prices where itemId = ?. 210 * 211 * <p> 212 * 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. 213 * </p> 214 * 215 * @param itemId the item ID 216 * @param start the lower bound of the range of shopping item prices 217 * @param end the upper bound of the range of shopping item prices (not inclusive) 218 * @return the range of matching shopping item prices 219 * @throws SystemException if a system exception occurred 220 */ 221 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findByItemId( 222 long itemId, int start, int end) 223 throws com.liferay.portal.kernel.exception.SystemException { 224 return getPersistence().findByItemId(itemId, start, end); 225 } 226 227 /** 228 * Returns an ordered range of all the shopping item prices where itemId = ?. 229 * 230 * <p> 231 * 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. 232 * </p> 233 * 234 * @param itemId the item ID 235 * @param start the lower bound of the range of shopping item prices 236 * @param end the upper bound of the range of shopping item prices (not inclusive) 237 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 238 * @return the ordered range of matching shopping item prices 239 * @throws SystemException if a system exception occurred 240 */ 241 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findByItemId( 242 long itemId, int start, int end, 243 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 244 throws com.liferay.portal.kernel.exception.SystemException { 245 return getPersistence() 246 .findByItemId(itemId, start, end, orderByComparator); 247 } 248 249 /** 250 * Returns the first shopping item price in the ordered set where itemId = ?. 251 * 252 * @param itemId the item ID 253 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 254 * @return the first matching shopping item price 255 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a matching shopping item price could not be found 256 * @throws SystemException if a system exception occurred 257 */ 258 public static com.liferay.portlet.shopping.model.ShoppingItemPrice findByItemId_First( 259 long itemId, 260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 261 throws com.liferay.portal.kernel.exception.SystemException, 262 com.liferay.portlet.shopping.NoSuchItemPriceException { 263 return getPersistence().findByItemId_First(itemId, orderByComparator); 264 } 265 266 /** 267 * Returns the first shopping item price in the ordered set where itemId = ?. 268 * 269 * @param itemId the item ID 270 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 271 * @return the first matching shopping item price, or <code>null</code> if a matching shopping item price could not be found 272 * @throws SystemException if a system exception occurred 273 */ 274 public static com.liferay.portlet.shopping.model.ShoppingItemPrice fetchByItemId_First( 275 long itemId, 276 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 277 throws com.liferay.portal.kernel.exception.SystemException { 278 return getPersistence().fetchByItemId_First(itemId, orderByComparator); 279 } 280 281 /** 282 * Returns the last shopping item price in the ordered set where itemId = ?. 283 * 284 * @param itemId the item ID 285 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 286 * @return the last matching shopping item price 287 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a matching shopping item price could not be found 288 * @throws SystemException if a system exception occurred 289 */ 290 public static com.liferay.portlet.shopping.model.ShoppingItemPrice findByItemId_Last( 291 long itemId, 292 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 293 throws com.liferay.portal.kernel.exception.SystemException, 294 com.liferay.portlet.shopping.NoSuchItemPriceException { 295 return getPersistence().findByItemId_Last(itemId, orderByComparator); 296 } 297 298 /** 299 * Returns the last shopping item price in the ordered set where itemId = ?. 300 * 301 * @param itemId the item ID 302 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 303 * @return the last matching shopping item price, or <code>null</code> if a matching shopping item price could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public static com.liferay.portlet.shopping.model.ShoppingItemPrice fetchByItemId_Last( 307 long itemId, 308 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 309 throws com.liferay.portal.kernel.exception.SystemException { 310 return getPersistence().fetchByItemId_Last(itemId, orderByComparator); 311 } 312 313 /** 314 * Returns the shopping item prices before and after the current shopping item price in the ordered set where itemId = ?. 315 * 316 * @param itemPriceId the primary key of the current shopping item price 317 * @param itemId the item ID 318 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 319 * @return the previous, current, and next shopping item price 320 * @throws com.liferay.portlet.shopping.NoSuchItemPriceException if a shopping item price with the primary key could not be found 321 * @throws SystemException if a system exception occurred 322 */ 323 public static com.liferay.portlet.shopping.model.ShoppingItemPrice[] findByItemId_PrevAndNext( 324 long itemPriceId, long itemId, 325 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 326 throws com.liferay.portal.kernel.exception.SystemException, 327 com.liferay.portlet.shopping.NoSuchItemPriceException { 328 return getPersistence() 329 .findByItemId_PrevAndNext(itemPriceId, itemId, 330 orderByComparator); 331 } 332 333 /** 334 * Returns all the shopping item prices. 335 * 336 * @return the shopping item prices 337 * @throws SystemException if a system exception occurred 338 */ 339 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findAll() 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().findAll(); 342 } 343 344 /** 345 * Returns a range of all the shopping item prices. 346 * 347 * <p> 348 * 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. 349 * </p> 350 * 351 * @param start the lower bound of the range of shopping item prices 352 * @param end the upper bound of the range of shopping item prices (not inclusive) 353 * @return the range of shopping item prices 354 * @throws SystemException if a system exception occurred 355 */ 356 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findAll( 357 int start, int end) 358 throws com.liferay.portal.kernel.exception.SystemException { 359 return getPersistence().findAll(start, end); 360 } 361 362 /** 363 * Returns an ordered range of all the shopping item prices. 364 * 365 * <p> 366 * 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. 367 * </p> 368 * 369 * @param start the lower bound of the range of shopping item prices 370 * @param end the upper bound of the range of shopping item prices (not inclusive) 371 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 372 * @return the ordered range of shopping item prices 373 * @throws SystemException if a system exception occurred 374 */ 375 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> findAll( 376 int start, int end, 377 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 378 throws com.liferay.portal.kernel.exception.SystemException { 379 return getPersistence().findAll(start, end, orderByComparator); 380 } 381 382 /** 383 * Removes all the shopping item prices where itemId = ? from the database. 384 * 385 * @param itemId the item ID 386 * @throws SystemException if a system exception occurred 387 */ 388 public static void removeByItemId(long itemId) 389 throws com.liferay.portal.kernel.exception.SystemException { 390 getPersistence().removeByItemId(itemId); 391 } 392 393 /** 394 * Removes all the shopping item prices from the database. 395 * 396 * @throws SystemException if a system exception occurred 397 */ 398 public static void removeAll() 399 throws com.liferay.portal.kernel.exception.SystemException { 400 getPersistence().removeAll(); 401 } 402 403 /** 404 * Returns the number of shopping item prices where itemId = ?. 405 * 406 * @param itemId the item ID 407 * @return the number of matching shopping item prices 408 * @throws SystemException if a system exception occurred 409 */ 410 public static int countByItemId(long itemId) 411 throws com.liferay.portal.kernel.exception.SystemException { 412 return getPersistence().countByItemId(itemId); 413 } 414 415 /** 416 * Returns the number of shopping item prices. 417 * 418 * @return the number of shopping item prices 419 * @throws SystemException if a system exception occurred 420 */ 421 public static int countAll() 422 throws com.liferay.portal.kernel.exception.SystemException { 423 return getPersistence().countAll(); 424 } 425 426 public static ShoppingItemPricePersistence getPersistence() { 427 if (_persistence == null) { 428 _persistence = (ShoppingItemPricePersistence)PortalBeanLocatorUtil.locate(ShoppingItemPricePersistence.class.getName()); 429 430 ReferenceRegistry.registerReference(ShoppingItemPriceUtil.class, 431 "_persistence"); 432 } 433 434 return _persistence; 435 } 436 437 /** 438 * @deprecated 439 */ 440 public void setPersistence(ShoppingItemPricePersistence persistence) { 441 } 442 443 private static ShoppingItemPricePersistence _persistence; 444 }