1
22
23 package com.liferay.portlet.shopping.service.persistence;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.annotation.Propagation;
28 import com.liferay.portal.kernel.annotation.Transactional;
29
30
36 @Transactional(rollbackFor = {
37 PortalException.class, SystemException.class})
38 public interface ShoppingCouponPersistence {
39 public com.liferay.portlet.shopping.model.ShoppingCoupon create(
40 long couponId);
41
42 public com.liferay.portlet.shopping.model.ShoppingCoupon remove(
43 long couponId)
44 throws com.liferay.portal.SystemException,
45 com.liferay.portlet.shopping.NoSuchCouponException;
46
47 public com.liferay.portlet.shopping.model.ShoppingCoupon remove(
48 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
49 throws com.liferay.portal.SystemException;
50
51
54 public com.liferay.portlet.shopping.model.ShoppingCoupon update(
55 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon)
56 throws com.liferay.portal.SystemException;
57
58
71 public com.liferay.portlet.shopping.model.ShoppingCoupon update(
72 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
73 boolean merge) throws com.liferay.portal.SystemException;
74
75 public com.liferay.portlet.shopping.model.ShoppingCoupon updateImpl(
76 com.liferay.portlet.shopping.model.ShoppingCoupon shoppingCoupon,
77 boolean merge) throws com.liferay.portal.SystemException;
78
79 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80 public com.liferay.portlet.shopping.model.ShoppingCoupon findByPrimaryKey(
81 long couponId)
82 throws com.liferay.portal.SystemException,
83 com.liferay.portlet.shopping.NoSuchCouponException;
84
85 public com.liferay.portlet.shopping.model.ShoppingCoupon fetchByPrimaryKey(
86 long couponId) throws com.liferay.portal.SystemException;
87
88 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89 public java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
90 long groupId) throws com.liferay.portal.SystemException;
91
92 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93 public java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
94 long groupId, int start, int end)
95 throws com.liferay.portal.SystemException;
96
97 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98 public java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findByGroupId(
99 long groupId, int start, int end,
100 com.liferay.portal.kernel.util.OrderByComparator obc)
101 throws com.liferay.portal.SystemException;
102
103 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104 public com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_First(
105 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
106 throws com.liferay.portal.SystemException,
107 com.liferay.portlet.shopping.NoSuchCouponException;
108
109 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110 public com.liferay.portlet.shopping.model.ShoppingCoupon findByGroupId_Last(
111 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
112 throws com.liferay.portal.SystemException,
113 com.liferay.portlet.shopping.NoSuchCouponException;
114
115 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116 public com.liferay.portlet.shopping.model.ShoppingCoupon[] findByGroupId_PrevAndNext(
117 long couponId, long groupId,
118 com.liferay.portal.kernel.util.OrderByComparator obc)
119 throws com.liferay.portal.SystemException,
120 com.liferay.portlet.shopping.NoSuchCouponException;
121
122 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123 public com.liferay.portlet.shopping.model.ShoppingCoupon findByCode(
124 java.lang.String code)
125 throws com.liferay.portal.SystemException,
126 com.liferay.portlet.shopping.NoSuchCouponException;
127
128 public com.liferay.portlet.shopping.model.ShoppingCoupon fetchByCode(
129 java.lang.String code) throws com.liferay.portal.SystemException;
130
131 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132 public java.util.List<Object> findWithDynamicQuery(
133 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
134 throws com.liferay.portal.SystemException;
135
136 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137 public java.util.List<Object> findWithDynamicQuery(
138 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139 int end) throws com.liferay.portal.SystemException;
140
141 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142 public java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll()
143 throws com.liferay.portal.SystemException;
144
145 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146 public java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
147 int start, int end) throws com.liferay.portal.SystemException;
148
149 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150 public java.util.List<com.liferay.portlet.shopping.model.ShoppingCoupon> findAll(
151 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
152 throws com.liferay.portal.SystemException;
153
154 public void removeByGroupId(long groupId)
155 throws com.liferay.portal.SystemException;
156
157 public void removeByCode(java.lang.String code)
158 throws com.liferay.portal.SystemException,
159 com.liferay.portlet.shopping.NoSuchCouponException;
160
161 public void removeAll() throws com.liferay.portal.SystemException;
162
163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164 public int countByGroupId(long groupId)
165 throws com.liferay.portal.SystemException;
166
167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168 public int countByCode(java.lang.String code)
169 throws com.liferay.portal.SystemException;
170
171 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172 public int countAll() throws com.liferay.portal.SystemException;
173
174 public void registerListener(
175 com.liferay.portal.model.ModelListener listener);
176
177 public void unregisterListener(
178 com.liferay.portal.model.ModelListener listener);
179 }