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.portlet.messageboards.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  import com.liferay.portal.service.persistence.BasePersistence;
27  
28  /**
29   * <a href="MBBanPersistence.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Brian Wing Shun Chan
32   *
33   */
34  @Transactional(rollbackFor =  {
35      PortalException.class, SystemException.class})
36  public interface MBBanPersistence extends BasePersistence {
37      public com.liferay.portlet.messageboards.model.MBBan create(long banId);
38  
39      public com.liferay.portlet.messageboards.model.MBBan remove(long banId)
40          throws com.liferay.portal.SystemException,
41              com.liferay.portlet.messageboards.NoSuchBanException;
42  
43      public com.liferay.portlet.messageboards.model.MBBan remove(
44          com.liferay.portlet.messageboards.model.MBBan mbBan)
45          throws com.liferay.portal.SystemException;
46  
47      /**
48       * @deprecated Use <code>update(MBBan mbBan, boolean merge)</code>.
49       */
50      public com.liferay.portlet.messageboards.model.MBBan update(
51          com.liferay.portlet.messageboards.model.MBBan mbBan)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * Add, update, or merge, the entity. This method also calls the model
56       * listeners to trigger the proper events associated with adding, deleting,
57       * or updating an entity.
58       *
59       * @param        mbBan the entity to add, update, or merge
60       * @param        merge boolean value for whether to merge the entity. The
61       *                default value is false. Setting merge to true is more
62       *                expensive and should only be true when mbBan is
63       *                transient. See LEP-5473 for a detailed discussion of this
64       *                method.
65       * @return        true if the portlet can be displayed via Ajax
66       */
67      public com.liferay.portlet.messageboards.model.MBBan update(
68          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
69          throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portlet.messageboards.model.MBBan updateImpl(
72          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
73          throws com.liferay.portal.SystemException;
74  
75      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
76      public com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
77          long banId)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portlet.messageboards.NoSuchBanException;
80  
81      public com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
82          long banId) throws com.liferay.portal.SystemException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
86          long groupId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
90          long groupId, int start, int end)
91          throws com.liferay.portal.SystemException;
92  
93      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
94      public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
95          long groupId, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100     public com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
101         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.messageboards.NoSuchBanException;
104 
105     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106     public com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
107         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.messageboards.NoSuchBanException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
113         long banId, long groupId,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.messageboards.NoSuchBanException;
117 
118     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
120         long userId) throws com.liferay.portal.SystemException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
124         long userId, int start, int end)
125         throws com.liferay.portal.SystemException;
126 
127     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
129         long userId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
135         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException,
137             com.liferay.portlet.messageboards.NoSuchBanException;
138 
139     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140     public com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
141         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.messageboards.NoSuchBanException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
147         long banId, long userId,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.messageboards.NoSuchBanException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
154         long banUserId) throws com.liferay.portal.SystemException;
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
158         long banUserId, int start, int end)
159         throws com.liferay.portal.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
163         long banUserId, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException;
166 
167     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168     public com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
169         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.messageboards.NoSuchBanException;
172 
173     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174     public com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
175         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.messageboards.NoSuchBanException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
181         long banId, long banUserId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.messageboards.NoSuchBanException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public com.liferay.portlet.messageboards.model.MBBan findByG_B(
188         long groupId, long banUserId)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.messageboards.NoSuchBanException;
191 
192     public com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
193         long groupId, long banUserId) throws com.liferay.portal.SystemException;
194 
195     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196     public java.util.List<Object> findWithDynamicQuery(
197         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
198         throws com.liferay.portal.SystemException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public java.util.List<Object> findWithDynamicQuery(
202         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
203         int end) throws com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
207         throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
211         int start, int end) throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
215         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException;
217 
218     public void removeByGroupId(long groupId)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeByUserId(long userId)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeByBanUserId(long banUserId)
225         throws com.liferay.portal.SystemException;
226 
227     public void removeByG_B(long groupId, long banUserId)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.messageboards.NoSuchBanException;
230 
231     public void removeAll() throws com.liferay.portal.SystemException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public int countByGroupId(long groupId)
235         throws com.liferay.portal.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public int countByUserId(long userId)
239         throws com.liferay.portal.SystemException;
240 
241     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242     public int countByBanUserId(long banUserId)
243         throws com.liferay.portal.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public int countByG_B(long groupId, long banUserId)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public int countAll() throws com.liferay.portal.SystemException;
251 }