1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  
26  /**
27   * <a href="SubscriptionPersistence.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       SubscriptionPersistenceImpl
36   * @see       SubscriptionUtil
37   * @generated
38   */
39  public interface SubscriptionPersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.Subscription subscription);
41  
42      public void cacheResult(
43          java.util.List<com.liferay.portal.model.Subscription> subscriptions);
44  
45      public void clearCache();
46  
47      public com.liferay.portal.model.Subscription create(long subscriptionId);
48  
49      public com.liferay.portal.model.Subscription remove(long subscriptionId)
50          throws com.liferay.portal.NoSuchSubscriptionException,
51              com.liferay.portal.SystemException;
52  
53      public com.liferay.portal.model.Subscription remove(
54          com.liferay.portal.model.Subscription subscription)
55          throws com.liferay.portal.SystemException;
56  
57      /**
58       * @deprecated Use {@link #update(Subscription, boolean merge)}.
59       */
60      public com.liferay.portal.model.Subscription update(
61          com.liferay.portal.model.Subscription subscription)
62          throws com.liferay.portal.SystemException;
63  
64      /**
65       * Add, update, or merge, the entity. This method also calls the model
66       * listeners to trigger the proper events associated with adding, deleting,
67       * or updating an entity.
68       *
69       * @param  subscription the entity to add, update, or merge
70       * @param  merge boolean value for whether to merge the entity. The default
71       *         value is false. Setting merge to true is more expensive and
72       *         should only be true when subscription is transient. See
73       *         LEP-5473 for a detailed discussion of this method.
74       * @return the entity that was added, updated, or merged
75       */
76      public com.liferay.portal.model.Subscription update(
77          com.liferay.portal.model.Subscription subscription, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.Subscription updateImpl(
81          com.liferay.portal.model.Subscription subscription, boolean merge)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Subscription findByPrimaryKey(
85          long subscriptionId)
86          throws com.liferay.portal.NoSuchSubscriptionException,
87              com.liferay.portal.SystemException;
88  
89      public com.liferay.portal.model.Subscription fetchByPrimaryKey(
90          long subscriptionId) throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
93          long userId) throws com.liferay.portal.SystemException;
94  
95      public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
96          long userId, int start, int end)
97          throws com.liferay.portal.SystemException;
98  
99      public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
100         long userId, int start, int end,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException;
103 
104     public com.liferay.portal.model.Subscription findByUserId_First(
105         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.NoSuchSubscriptionException,
107             com.liferay.portal.SystemException;
108 
109     public com.liferay.portal.model.Subscription findByUserId_Last(
110         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.NoSuchSubscriptionException,
112             com.liferay.portal.SystemException;
113 
114     public com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
115         long subscriptionId, long userId,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.NoSuchSubscriptionException,
118             com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
121         long userId, long classNameId)
122         throws com.liferay.portal.SystemException;
123 
124     public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
125         long userId, long classNameId, int start, int end)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
129         long userId, long classNameId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException;
132 
133     public com.liferay.portal.model.Subscription findByU_C_First(long userId,
134         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.NoSuchSubscriptionException,
136             com.liferay.portal.SystemException;
137 
138     public com.liferay.portal.model.Subscription findByU_C_Last(long userId,
139         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.NoSuchSubscriptionException,
141             com.liferay.portal.SystemException;
142 
143     public com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
144         long subscriptionId, long userId, long classNameId,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.NoSuchSubscriptionException,
147             com.liferay.portal.SystemException;
148 
149     public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
150         long companyId, long classNameId, long classPK)
151         throws com.liferay.portal.SystemException;
152 
153     public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
154         long companyId, long classNameId, long classPK, int start, int end)
155         throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
158         long companyId, long classNameId, long classPK, int start, int end,
159         com.liferay.portal.kernel.util.OrderByComparator obc)
160         throws com.liferay.portal.SystemException;
161 
162     public com.liferay.portal.model.Subscription findByC_C_C_First(
163         long companyId, long classNameId, long classPK,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.NoSuchSubscriptionException,
166             com.liferay.portal.SystemException;
167 
168     public com.liferay.portal.model.Subscription findByC_C_C_Last(
169         long companyId, long classNameId, long classPK,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.NoSuchSubscriptionException,
172             com.liferay.portal.SystemException;
173 
174     public com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
175         long subscriptionId, long companyId, long classNameId, long classPK,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.NoSuchSubscriptionException,
178             com.liferay.portal.SystemException;
179 
180     public com.liferay.portal.model.Subscription findByC_U_C_C(long companyId,
181         long userId, long classNameId, long classPK)
182         throws com.liferay.portal.NoSuchSubscriptionException,
183             com.liferay.portal.SystemException;
184 
185     public com.liferay.portal.model.Subscription fetchByC_U_C_C(
186         long companyId, long userId, long classNameId, long classPK)
187         throws com.liferay.portal.SystemException;
188 
189     public com.liferay.portal.model.Subscription fetchByC_U_C_C(
190         long companyId, long userId, long classNameId, long classPK,
191         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
192 
193     public java.util.List<Object> findWithDynamicQuery(
194         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
195         throws com.liferay.portal.SystemException;
196 
197     public java.util.List<Object> findWithDynamicQuery(
198         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
199         int end) throws com.liferay.portal.SystemException;
200 
201     public java.util.List<com.liferay.portal.model.Subscription> findAll()
202         throws com.liferay.portal.SystemException;
203 
204     public java.util.List<com.liferay.portal.model.Subscription> findAll(
205         int start, int end) throws com.liferay.portal.SystemException;
206 
207     public java.util.List<com.liferay.portal.model.Subscription> findAll(
208         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException;
210 
211     public void removeByUserId(long userId)
212         throws com.liferay.portal.SystemException;
213 
214     public void removeByU_C(long userId, long classNameId)
215         throws com.liferay.portal.SystemException;
216 
217     public void removeByC_C_C(long companyId, long classNameId, long classPK)
218         throws com.liferay.portal.SystemException;
219 
220     public void removeByC_U_C_C(long companyId, long userId, long classNameId,
221         long classPK)
222         throws com.liferay.portal.NoSuchSubscriptionException,
223             com.liferay.portal.SystemException;
224 
225     public void removeAll() throws com.liferay.portal.SystemException;
226 
227     public int countByUserId(long userId)
228         throws com.liferay.portal.SystemException;
229 
230     public int countByU_C(long userId, long classNameId)
231         throws com.liferay.portal.SystemException;
232 
233     public int countByC_C_C(long companyId, long classNameId, long classPK)
234         throws com.liferay.portal.SystemException;
235 
236     public int countByC_U_C_C(long companyId, long userId, long classNameId,
237         long classPK) throws com.liferay.portal.SystemException;
238 
239     public int countAll() throws com.liferay.portal.SystemException;
240 }