001 /** 002 * Copyright (c) 2000-2012 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.ShoppingItemField; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the shopping item field service. This utility wraps {@link ShoppingItemFieldPersistenceImpl} 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 ShoppingItemFieldPersistence 037 * @see ShoppingItemFieldPersistenceImpl 038 * @generated 039 */ 040 public class ShoppingItemFieldUtil { 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(ShoppingItemField shoppingItemField) { 058 getPersistence().clearCache(shoppingItemField); 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<ShoppingItemField> 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<ShoppingItemField> 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<ShoppingItemField> 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) 099 */ 100 public static ShoppingItemField update(ShoppingItemField shoppingItemField) 101 throws SystemException { 102 return getPersistence().update(shoppingItemField); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static ShoppingItemField update( 109 ShoppingItemField shoppingItemField, ServiceContext serviceContext) 110 throws SystemException { 111 return getPersistence().update(shoppingItemField, serviceContext); 112 } 113 114 /** 115 * Caches the shopping item field in the entity cache if it is enabled. 116 * 117 * @param shoppingItemField the shopping item field 118 */ 119 public static void cacheResult( 120 com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) { 121 getPersistence().cacheResult(shoppingItemField); 122 } 123 124 /** 125 * Caches the shopping item fields in the entity cache if it is enabled. 126 * 127 * @param shoppingItemFields the shopping item fields 128 */ 129 public static void cacheResult( 130 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> shoppingItemFields) { 131 getPersistence().cacheResult(shoppingItemFields); 132 } 133 134 /** 135 * Creates a new shopping item field with the primary key. Does not add the shopping item field to the database. 136 * 137 * @param itemFieldId the primary key for the new shopping item field 138 * @return the new shopping item field 139 */ 140 public static com.liferay.portlet.shopping.model.ShoppingItemField create( 141 long itemFieldId) { 142 return getPersistence().create(itemFieldId); 143 } 144 145 /** 146 * Removes the shopping item field with the primary key from the database. Also notifies the appropriate model listeners. 147 * 148 * @param itemFieldId the primary key of the shopping item field 149 * @return the shopping item field that was removed 150 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 151 * @throws SystemException if a system exception occurred 152 */ 153 public static com.liferay.portlet.shopping.model.ShoppingItemField remove( 154 long itemFieldId) 155 throws com.liferay.portal.kernel.exception.SystemException, 156 com.liferay.portlet.shopping.NoSuchItemFieldException { 157 return getPersistence().remove(itemFieldId); 158 } 159 160 public static com.liferay.portlet.shopping.model.ShoppingItemField updateImpl( 161 com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().updateImpl(shoppingItemField); 164 } 165 166 /** 167 * Returns the shopping item field with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemFieldException} if it could not be found. 168 * 169 * @param itemFieldId the primary key of the shopping item field 170 * @return the shopping item field 171 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portlet.shopping.model.ShoppingItemField findByPrimaryKey( 175 long itemFieldId) 176 throws com.liferay.portal.kernel.exception.SystemException, 177 com.liferay.portlet.shopping.NoSuchItemFieldException { 178 return getPersistence().findByPrimaryKey(itemFieldId); 179 } 180 181 /** 182 * Returns the shopping item field with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param itemFieldId the primary key of the shopping item field 185 * @return the shopping item field, or <code>null</code> if a shopping item field with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portlet.shopping.model.ShoppingItemField fetchByPrimaryKey( 189 long itemFieldId) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return getPersistence().fetchByPrimaryKey(itemFieldId); 192 } 193 194 /** 195 * Returns all the shopping item fields where itemId = ?. 196 * 197 * @param itemId the item ID 198 * @return the matching shopping item fields 199 * @throws SystemException if a system exception occurred 200 */ 201 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 202 long itemId) throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByItemId(itemId); 204 } 205 206 /** 207 * Returns a range of all the shopping item fields where itemId = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param itemId the item ID 214 * @param start the lower bound of the range of shopping item fields 215 * @param end the upper bound of the range of shopping item fields (not inclusive) 216 * @return the range of matching shopping item fields 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 220 long itemId, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByItemId(itemId, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the shopping item fields where itemId = ?. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param itemId the item ID 233 * @param start the lower bound of the range of shopping item fields 234 * @param end the upper bound of the range of shopping item fields (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching shopping item fields 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findByItemId( 240 long itemId, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence() 244 .findByItemId(itemId, start, end, orderByComparator); 245 } 246 247 /** 248 * Returns the first shopping item field in the ordered set where itemId = ?. 249 * 250 * @param itemId the item ID 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the first matching shopping item field 253 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found 254 * @throws SystemException if a system exception occurred 255 */ 256 public static com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_First( 257 long itemId, 258 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 259 throws com.liferay.portal.kernel.exception.SystemException, 260 com.liferay.portlet.shopping.NoSuchItemFieldException { 261 return getPersistence().findByItemId_First(itemId, orderByComparator); 262 } 263 264 /** 265 * Returns the first shopping item field in the ordered set where itemId = ?. 266 * 267 * @param itemId the item ID 268 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 269 * @return the first matching shopping item field, or <code>null</code> if a matching shopping item field could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portlet.shopping.model.ShoppingItemField fetchByItemId_First( 273 long itemId, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.kernel.exception.SystemException { 276 return getPersistence().fetchByItemId_First(itemId, orderByComparator); 277 } 278 279 /** 280 * Returns the last shopping item field in the ordered set where itemId = ?. 281 * 282 * @param itemId the item ID 283 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 284 * @return the last matching shopping item field 285 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a matching shopping item field could not be found 286 * @throws SystemException if a system exception occurred 287 */ 288 public static com.liferay.portlet.shopping.model.ShoppingItemField findByItemId_Last( 289 long itemId, 290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 291 throws com.liferay.portal.kernel.exception.SystemException, 292 com.liferay.portlet.shopping.NoSuchItemFieldException { 293 return getPersistence().findByItemId_Last(itemId, orderByComparator); 294 } 295 296 /** 297 * Returns the last shopping item field in the ordered set where itemId = ?. 298 * 299 * @param itemId the item ID 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the last matching shopping item field, or <code>null</code> if a matching shopping item field could not be found 302 * @throws SystemException if a system exception occurred 303 */ 304 public static com.liferay.portlet.shopping.model.ShoppingItemField fetchByItemId_Last( 305 long itemId, 306 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 307 throws com.liferay.portal.kernel.exception.SystemException { 308 return getPersistence().fetchByItemId_Last(itemId, orderByComparator); 309 } 310 311 /** 312 * Returns the shopping item fields before and after the current shopping item field in the ordered set where itemId = ?. 313 * 314 * @param itemFieldId the primary key of the current shopping item field 315 * @param itemId the item ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next shopping item field 318 * @throws com.liferay.portlet.shopping.NoSuchItemFieldException if a shopping item field with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portlet.shopping.model.ShoppingItemField[] findByItemId_PrevAndNext( 322 long itemFieldId, long itemId, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.kernel.exception.SystemException, 325 com.liferay.portlet.shopping.NoSuchItemFieldException { 326 return getPersistence() 327 .findByItemId_PrevAndNext(itemFieldId, itemId, 328 orderByComparator); 329 } 330 331 /** 332 * Returns all the shopping item fields. 333 * 334 * @return the shopping item fields 335 * @throws SystemException if a system exception occurred 336 */ 337 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll() 338 throws com.liferay.portal.kernel.exception.SystemException { 339 return getPersistence().findAll(); 340 } 341 342 /** 343 * Returns a range of all the shopping item fields. 344 * 345 * <p> 346 * 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. 347 * </p> 348 * 349 * @param start the lower bound of the range of shopping item fields 350 * @param end the upper bound of the range of shopping item fields (not inclusive) 351 * @return the range of shopping item fields 352 * @throws SystemException if a system exception occurred 353 */ 354 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll( 355 int start, int end) 356 throws com.liferay.portal.kernel.exception.SystemException { 357 return getPersistence().findAll(start, end); 358 } 359 360 /** 361 * Returns an ordered range of all the shopping item fields. 362 * 363 * <p> 364 * 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. 365 * </p> 366 * 367 * @param start the lower bound of the range of shopping item fields 368 * @param end the upper bound of the range of shopping item fields (not inclusive) 369 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 370 * @return the ordered range of shopping item fields 371 * @throws SystemException if a system exception occurred 372 */ 373 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> findAll( 374 int start, int end, 375 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 376 throws com.liferay.portal.kernel.exception.SystemException { 377 return getPersistence().findAll(start, end, orderByComparator); 378 } 379 380 /** 381 * Removes all the shopping item fields where itemId = ? from the database. 382 * 383 * @param itemId the item ID 384 * @throws SystemException if a system exception occurred 385 */ 386 public static void removeByItemId(long itemId) 387 throws com.liferay.portal.kernel.exception.SystemException { 388 getPersistence().removeByItemId(itemId); 389 } 390 391 /** 392 * Removes all the shopping item fields from the database. 393 * 394 * @throws SystemException if a system exception occurred 395 */ 396 public static void removeAll() 397 throws com.liferay.portal.kernel.exception.SystemException { 398 getPersistence().removeAll(); 399 } 400 401 /** 402 * Returns the number of shopping item fields where itemId = ?. 403 * 404 * @param itemId the item ID 405 * @return the number of matching shopping item fields 406 * @throws SystemException if a system exception occurred 407 */ 408 public static int countByItemId(long itemId) 409 throws com.liferay.portal.kernel.exception.SystemException { 410 return getPersistence().countByItemId(itemId); 411 } 412 413 /** 414 * Returns the number of shopping item fields. 415 * 416 * @return the number of shopping item fields 417 * @throws SystemException if a system exception occurred 418 */ 419 public static int countAll() 420 throws com.liferay.portal.kernel.exception.SystemException { 421 return getPersistence().countAll(); 422 } 423 424 public static ShoppingItemFieldPersistence getPersistence() { 425 if (_persistence == null) { 426 _persistence = (ShoppingItemFieldPersistence)PortalBeanLocatorUtil.locate(ShoppingItemFieldPersistence.class.getName()); 427 428 ReferenceRegistry.registerReference(ShoppingItemFieldUtil.class, 429 "_persistence"); 430 } 431 432 return _persistence; 433 } 434 435 /** 436 * @deprecated 437 */ 438 public void setPersistence(ShoppingItemFieldPersistence persistence) { 439 } 440 441 private static ShoppingItemFieldPersistence _persistence; 442 }