1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="SubscriptionPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface SubscriptionPersistence {
32      public com.liferay.portal.model.Subscription create(long subscriptionId);
33  
34      public com.liferay.portal.model.Subscription remove(long subscriptionId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portal.NoSuchSubscriptionException;
37  
38      public com.liferay.portal.model.Subscription remove(
39          com.liferay.portal.model.Subscription subscription)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portal.model.Subscription update(
43          com.liferay.portal.model.Subscription subscription)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portal.model.Subscription update(
47          com.liferay.portal.model.Subscription subscription, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portal.model.Subscription updateImpl(
51          com.liferay.portal.model.Subscription subscription, boolean merge)
52          throws com.liferay.portal.SystemException;
53  
54      public com.liferay.portal.model.Subscription findByPrimaryKey(
55          long subscriptionId)
56          throws com.liferay.portal.SystemException, 
57              com.liferay.portal.NoSuchSubscriptionException;
58  
59      public com.liferay.portal.model.Subscription fetchByPrimaryKey(
60          long subscriptionId) throws com.liferay.portal.SystemException;
61  
62      public java.util.List findByUserId(long userId)
63          throws com.liferay.portal.SystemException;
64  
65      public java.util.List findByUserId(long userId, int begin, int end)
66          throws com.liferay.portal.SystemException;
67  
68      public java.util.List findByUserId(long userId, int begin, int end,
69          com.liferay.portal.kernel.util.OrderByComparator obc)
70          throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.Subscription findByUserId_First(
73          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
74          throws com.liferay.portal.SystemException, 
75              com.liferay.portal.NoSuchSubscriptionException;
76  
77      public com.liferay.portal.model.Subscription findByUserId_Last(
78          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
79          throws com.liferay.portal.SystemException, 
80              com.liferay.portal.NoSuchSubscriptionException;
81  
82      public com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
83          long subscriptionId, long userId,
84          com.liferay.portal.kernel.util.OrderByComparator obc)
85          throws com.liferay.portal.SystemException, 
86              com.liferay.portal.NoSuchSubscriptionException;
87  
88      public java.util.List findByC_C_C(long companyId, long classNameId,
89          long classPK) throws com.liferay.portal.SystemException;
90  
91      public java.util.List findByC_C_C(long companyId, long classNameId,
92          long classPK, int begin, int end)
93          throws com.liferay.portal.SystemException;
94  
95      public java.util.List findByC_C_C(long companyId, long classNameId,
96          long classPK, int begin, int end,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException;
99  
100     public com.liferay.portal.model.Subscription findByC_C_C_First(
101         long companyId, long classNameId, long classPK,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException, 
104             com.liferay.portal.NoSuchSubscriptionException;
105 
106     public com.liferay.portal.model.Subscription findByC_C_C_Last(
107         long companyId, long classNameId, long classPK,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException, 
110             com.liferay.portal.NoSuchSubscriptionException;
111 
112     public com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
113         long subscriptionId, long companyId, long classNameId, long classPK,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException, 
116             com.liferay.portal.NoSuchSubscriptionException;
117 
118     public com.liferay.portal.model.Subscription findByC_U_C_C(long companyId,
119         long userId, long classNameId, long classPK)
120         throws com.liferay.portal.SystemException, 
121             com.liferay.portal.NoSuchSubscriptionException;
122 
123     public com.liferay.portal.model.Subscription fetchByC_U_C_C(
124         long companyId, long userId, long classNameId, long classPK)
125         throws com.liferay.portal.SystemException;
126 
127     public java.util.List findWithDynamicQuery(
128         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
129         throws com.liferay.portal.SystemException;
130 
131     public java.util.List findWithDynamicQuery(
132         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
133         int begin, int end) throws com.liferay.portal.SystemException;
134 
135     public java.util.List findAll() throws com.liferay.portal.SystemException;
136 
137     public java.util.List findAll(int begin, int end)
138         throws com.liferay.portal.SystemException;
139 
140     public java.util.List findAll(int begin, int end,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException;
143 
144     public void removeByUserId(long userId)
145         throws com.liferay.portal.SystemException;
146 
147     public void removeByC_C_C(long companyId, long classNameId, long classPK)
148         throws com.liferay.portal.SystemException;
149 
150     public void removeByC_U_C_C(long companyId, long userId, long classNameId,
151         long classPK)
152         throws com.liferay.portal.SystemException, 
153             com.liferay.portal.NoSuchSubscriptionException;
154 
155     public void removeAll() throws com.liferay.portal.SystemException;
156 
157     public int countByUserId(long userId)
158         throws com.liferay.portal.SystemException;
159 
160     public int countByC_C_C(long companyId, long classNameId, long classPK)
161         throws com.liferay.portal.SystemException;
162 
163     public int countByC_U_C_C(long companyId, long userId, long classNameId,
164         long classPK) throws com.liferay.portal.SystemException;
165 
166     public int countAll() throws com.liferay.portal.SystemException;
167 }