001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service.persistence;
022:
023: /**
024: * <a href="ShoppingOrderItemUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ShoppingOrderItemUtil {
030: public static com.liferay.portlet.shopping.model.ShoppingOrderItem create(
031: long orderItemId) {
032: return getPersistence().create(orderItemId);
033: }
034:
035: public static com.liferay.portlet.shopping.model.ShoppingOrderItem remove(
036: long orderItemId)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portlet.shopping.NoSuchOrderItemException {
039: return getPersistence().remove(orderItemId);
040: }
041:
042: public static com.liferay.portlet.shopping.model.ShoppingOrderItem remove(
043: com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(shoppingOrderItem);
046: }
047:
048: public static com.liferay.portlet.shopping.model.ShoppingOrderItem update(
049: com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(shoppingOrderItem);
052: }
053:
054: public static com.liferay.portlet.shopping.model.ShoppingOrderItem update(
055: com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(shoppingOrderItem, merge);
058: }
059:
060: public static com.liferay.portlet.shopping.model.ShoppingOrderItem updateImpl(
061: com.liferay.portlet.shopping.model.ShoppingOrderItem shoppingOrderItem,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(shoppingOrderItem, merge);
064: }
065:
066: public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByPrimaryKey(
067: long orderItemId)
068: throws com.liferay.portal.SystemException,
069: com.liferay.portlet.shopping.NoSuchOrderItemException {
070: return getPersistence().findByPrimaryKey(orderItemId);
071: }
072:
073: public static com.liferay.portlet.shopping.model.ShoppingOrderItem fetchByPrimaryKey(
074: long orderItemId) throws com.liferay.portal.SystemException {
075: return getPersistence().fetchByPrimaryKey(orderItemId);
076: }
077:
078: public static java.util.List findByOrderId(long orderId)
079: throws com.liferay.portal.SystemException {
080: return getPersistence().findByOrderId(orderId);
081: }
082:
083: public static java.util.List findByOrderId(long orderId, int begin,
084: int end) throws com.liferay.portal.SystemException {
085: return getPersistence().findByOrderId(orderId, begin, end);
086: }
087:
088: public static java.util.List findByOrderId(long orderId, int begin,
089: int end,
090: com.liferay.portal.kernel.util.OrderByComparator obc)
091: throws com.liferay.portal.SystemException {
092: return getPersistence().findByOrderId(orderId, begin, end, obc);
093: }
094:
095: public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_First(
096: long orderId,
097: com.liferay.portal.kernel.util.OrderByComparator obc)
098: throws com.liferay.portal.SystemException,
099: com.liferay.portlet.shopping.NoSuchOrderItemException {
100: return getPersistence().findByOrderId_First(orderId, obc);
101: }
102:
103: public static com.liferay.portlet.shopping.model.ShoppingOrderItem findByOrderId_Last(
104: long orderId,
105: com.liferay.portal.kernel.util.OrderByComparator obc)
106: throws com.liferay.portal.SystemException,
107: com.liferay.portlet.shopping.NoSuchOrderItemException {
108: return getPersistence().findByOrderId_Last(orderId, obc);
109: }
110:
111: public static com.liferay.portlet.shopping.model.ShoppingOrderItem[] findByOrderId_PrevAndNext(
112: long orderItemId, long orderId,
113: com.liferay.portal.kernel.util.OrderByComparator obc)
114: throws com.liferay.portal.SystemException,
115: com.liferay.portlet.shopping.NoSuchOrderItemException {
116: return getPersistence().findByOrderId_PrevAndNext(orderItemId,
117: orderId, obc);
118: }
119:
120: public static java.util.List findWithDynamicQuery(
121: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
122: throws com.liferay.portal.SystemException {
123: return getPersistence().findWithDynamicQuery(queryInitializer);
124: }
125:
126: public static java.util.List findWithDynamicQuery(
127: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
128: int begin, int end)
129: throws com.liferay.portal.SystemException {
130: return getPersistence().findWithDynamicQuery(queryInitializer,
131: begin, end);
132: }
133:
134: public static java.util.List findAll()
135: throws com.liferay.portal.SystemException {
136: return getPersistence().findAll();
137: }
138:
139: public static java.util.List findAll(int begin, int end)
140: throws com.liferay.portal.SystemException {
141: return getPersistence().findAll(begin, end);
142: }
143:
144: public static java.util.List findAll(int begin, int end,
145: com.liferay.portal.kernel.util.OrderByComparator obc)
146: throws com.liferay.portal.SystemException {
147: return getPersistence().findAll(begin, end, obc);
148: }
149:
150: public static void removeByOrderId(long orderId)
151: throws com.liferay.portal.SystemException {
152: getPersistence().removeByOrderId(orderId);
153: }
154:
155: public static void removeAll()
156: throws com.liferay.portal.SystemException {
157: getPersistence().removeAll();
158: }
159:
160: public static int countByOrderId(long orderId)
161: throws com.liferay.portal.SystemException {
162: return getPersistence().countByOrderId(orderId);
163: }
164:
165: public static int countAll()
166: throws com.liferay.portal.SystemException {
167: return getPersistence().countAll();
168: }
169:
170: public static ShoppingOrderItemPersistence getPersistence() {
171: return _getUtil()._persistence;
172: }
173:
174: public void setPersistence(ShoppingOrderItemPersistence persistence) {
175: _persistence = persistence;
176: }
177:
178: private static ShoppingOrderItemUtil _getUtil() {
179: if (_util == null) {
180: _util = (ShoppingOrderItemUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
181: .locate(_UTIL);
182: }
183:
184: return _util;
185: }
186:
187: private static final String _UTIL = ShoppingOrderItemUtil.class
188: .getName();
189: private static ShoppingOrderItemUtil _util;
190: private ShoppingOrderItemPersistence _persistence;
191: }
|