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