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="ShoppingCartPersistence.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public interface ShoppingCartPersistence {
030: public com.liferay.portlet.shopping.model.ShoppingCart create(
031: long cartId);
032:
033: public com.liferay.portlet.shopping.model.ShoppingCart remove(
034: long cartId) throws com.liferay.portal.SystemException,
035: com.liferay.portlet.shopping.NoSuchCartException;
036:
037: public com.liferay.portlet.shopping.model.ShoppingCart remove(
038: com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
039: throws com.liferay.portal.SystemException;
040:
041: public com.liferay.portlet.shopping.model.ShoppingCart update(
042: com.liferay.portlet.shopping.model.ShoppingCart shoppingCart)
043: throws com.liferay.portal.SystemException;
044:
045: public com.liferay.portlet.shopping.model.ShoppingCart update(
046: com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
047: boolean merge) throws com.liferay.portal.SystemException;
048:
049: public com.liferay.portlet.shopping.model.ShoppingCart updateImpl(
050: com.liferay.portlet.shopping.model.ShoppingCart shoppingCart,
051: boolean merge) throws com.liferay.portal.SystemException;
052:
053: public com.liferay.portlet.shopping.model.ShoppingCart findByPrimaryKey(
054: long cartId) throws com.liferay.portal.SystemException,
055: com.liferay.portlet.shopping.NoSuchCartException;
056:
057: public com.liferay.portlet.shopping.model.ShoppingCart fetchByPrimaryKey(
058: long cartId) throws com.liferay.portal.SystemException;
059:
060: public java.util.List findByGroupId(long groupId)
061: throws com.liferay.portal.SystemException;
062:
063: public java.util.List findByGroupId(long groupId, int begin, int end)
064: throws com.liferay.portal.SystemException;
065:
066: public java.util.List findByGroupId(long groupId, int begin,
067: int end,
068: com.liferay.portal.kernel.util.OrderByComparator obc)
069: throws com.liferay.portal.SystemException;
070:
071: public com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_First(
072: long groupId,
073: com.liferay.portal.kernel.util.OrderByComparator obc)
074: throws com.liferay.portal.SystemException,
075: com.liferay.portlet.shopping.NoSuchCartException;
076:
077: public com.liferay.portlet.shopping.model.ShoppingCart findByGroupId_Last(
078: long groupId,
079: com.liferay.portal.kernel.util.OrderByComparator obc)
080: throws com.liferay.portal.SystemException,
081: com.liferay.portlet.shopping.NoSuchCartException;
082:
083: public com.liferay.portlet.shopping.model.ShoppingCart[] findByGroupId_PrevAndNext(
084: long cartId, long groupId,
085: com.liferay.portal.kernel.util.OrderByComparator obc)
086: throws com.liferay.portal.SystemException,
087: com.liferay.portlet.shopping.NoSuchCartException;
088:
089: public java.util.List findByUserId(long userId)
090: throws com.liferay.portal.SystemException;
091:
092: public java.util.List findByUserId(long userId, int begin, int end)
093: throws com.liferay.portal.SystemException;
094:
095: public java.util.List findByUserId(long userId, int begin, int end,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException;
098:
099: public com.liferay.portlet.shopping.model.ShoppingCart findByUserId_First(
100: long userId,
101: com.liferay.portal.kernel.util.OrderByComparator obc)
102: throws com.liferay.portal.SystemException,
103: com.liferay.portlet.shopping.NoSuchCartException;
104:
105: public com.liferay.portlet.shopping.model.ShoppingCart findByUserId_Last(
106: long userId,
107: com.liferay.portal.kernel.util.OrderByComparator obc)
108: throws com.liferay.portal.SystemException,
109: com.liferay.portlet.shopping.NoSuchCartException;
110:
111: public com.liferay.portlet.shopping.model.ShoppingCart[] findByUserId_PrevAndNext(
112: long cartId, long userId,
113: com.liferay.portal.kernel.util.OrderByComparator obc)
114: throws com.liferay.portal.SystemException,
115: com.liferay.portlet.shopping.NoSuchCartException;
116:
117: public com.liferay.portlet.shopping.model.ShoppingCart findByG_U(
118: long groupId, long userId)
119: throws com.liferay.portal.SystemException,
120: com.liferay.portlet.shopping.NoSuchCartException;
121:
122: public com.liferay.portlet.shopping.model.ShoppingCart fetchByG_U(
123: long groupId, long userId)
124: throws com.liferay.portal.SystemException;
125:
126: public java.util.List findWithDynamicQuery(
127: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
128: throws com.liferay.portal.SystemException;
129:
130: public java.util.List findWithDynamicQuery(
131: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
132: int begin, int end)
133: throws com.liferay.portal.SystemException;
134:
135: public java.util.List findAll()
136: throws com.liferay.portal.SystemException;
137:
138: public java.util.List findAll(int begin, int end)
139: throws com.liferay.portal.SystemException;
140:
141: public java.util.List findAll(int begin, int end,
142: com.liferay.portal.kernel.util.OrderByComparator obc)
143: throws com.liferay.portal.SystemException;
144:
145: public void removeByGroupId(long groupId)
146: throws com.liferay.portal.SystemException;
147:
148: public void removeByUserId(long userId)
149: throws com.liferay.portal.SystemException;
150:
151: public void removeByG_U(long groupId, long userId)
152: throws com.liferay.portal.SystemException,
153: com.liferay.portlet.shopping.NoSuchCartException;
154:
155: public void removeAll() throws com.liferay.portal.SystemException;
156:
157: public int countByGroupId(long groupId)
158: throws com.liferay.portal.SystemException;
159:
160: public int countByUserId(long userId)
161: throws com.liferay.portal.SystemException;
162:
163: public int countByG_U(long groupId, long userId)
164: throws com.liferay.portal.SystemException;
165:
166: public int countAll() throws com.liferay.portal.SystemException;
167: }
|