1   /**
2    * Copyright (c) 2000-2007 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 findByPrimaryKey(
51          long subscriptionId)
52          throws com.liferay.portal.SystemException, 
53              com.liferay.portal.NoSuchSubscriptionException;
54  
55      public com.liferay.portal.model.Subscription fetchByPrimaryKey(
56          long subscriptionId) throws com.liferay.portal.SystemException;
57  
58      public java.util.List findByUserId(long userId)
59          throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByUserId(long userId, int begin, int end)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByUserId(long userId, int begin, int end,
65          com.liferay.portal.kernel.util.OrderByComparator obc)
66          throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portal.model.Subscription findByUserId_First(
69          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchSubscriptionException;
72  
73      public com.liferay.portal.model.Subscription findByUserId_Last(
74          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
75          throws com.liferay.portal.SystemException, 
76              com.liferay.portal.NoSuchSubscriptionException;
77  
78      public com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
79          long subscriptionId, long userId,
80          com.liferay.portal.kernel.util.OrderByComparator obc)
81          throws com.liferay.portal.SystemException, 
82              com.liferay.portal.NoSuchSubscriptionException;
83  
84      public java.util.List findByC_C_C(long companyId, long classNameId,
85          long classPK) throws com.liferay.portal.SystemException;
86  
87      public java.util.List findByC_C_C(long companyId, long classNameId,
88          long classPK, int begin, int end)
89          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          com.liferay.portal.kernel.util.OrderByComparator obc)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portal.model.Subscription findByC_C_C_First(
97          long companyId, long classNameId, long classPK,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException, 
100             com.liferay.portal.NoSuchSubscriptionException;
101 
102     public com.liferay.portal.model.Subscription findByC_C_C_Last(
103         long companyId, long classNameId, long classPK,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchSubscriptionException;
107 
108     public com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
109         long subscriptionId, long companyId, long classNameId, long classPK,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portal.NoSuchSubscriptionException;
113 
114     public com.liferay.portal.model.Subscription findByC_U_C_C(long companyId,
115         long userId, long classNameId, long classPK)
116         throws com.liferay.portal.SystemException, 
117             com.liferay.portal.NoSuchSubscriptionException;
118 
119     public com.liferay.portal.model.Subscription fetchByC_U_C_C(
120         long companyId, long userId, long classNameId, long classPK)
121         throws com.liferay.portal.SystemException;
122 
123     public java.util.List findWithDynamicQuery(
124         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
125         throws com.liferay.portal.SystemException;
126 
127     public java.util.List findWithDynamicQuery(
128         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
129         int begin, int end) throws com.liferay.portal.SystemException;
130 
131     public java.util.List findAll() throws com.liferay.portal.SystemException;
132 
133     public java.util.List findAll(int begin, int end)
134         throws com.liferay.portal.SystemException;
135 
136     public java.util.List findAll(int begin, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException;
139 
140     public void removeByUserId(long userId)
141         throws com.liferay.portal.SystemException;
142 
143     public void removeByC_C_C(long companyId, long classNameId, long classPK)
144         throws com.liferay.portal.SystemException;
145 
146     public void removeByC_U_C_C(long companyId, long userId, long classNameId,
147         long classPK)
148         throws com.liferay.portal.SystemException, 
149             com.liferay.portal.NoSuchSubscriptionException;
150 
151     public void removeAll() throws com.liferay.portal.SystemException;
152 
153     public int countByUserId(long userId)
154         throws com.liferay.portal.SystemException;
155 
156     public int countByC_C_C(long companyId, long classNameId, long classPK)
157         throws com.liferay.portal.SystemException;
158 
159     public int countByC_U_C_C(long companyId, long userId, long classNameId,
160         long classPK) throws com.liferay.portal.SystemException;
161 
162     public int countAll() throws com.liferay.portal.SystemException;
163 }