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.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="MBBanPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface MBBanPersistence extends BasePersistence {
31      public void cacheResult(com.liferay.portlet.messageboards.model.MBBan mbBan);
32  
33      public void cacheResult(
34          java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans);
35  
36      public void clearCache();
37  
38      public com.liferay.portlet.messageboards.model.MBBan create(long banId);
39  
40      public com.liferay.portlet.messageboards.model.MBBan remove(long banId)
41          throws com.liferay.portal.SystemException,
42              com.liferay.portlet.messageboards.NoSuchBanException;
43  
44      public com.liferay.portlet.messageboards.model.MBBan remove(
45          com.liferay.portlet.messageboards.model.MBBan mbBan)
46          throws com.liferay.portal.SystemException;
47  
48      /**
49       * @deprecated Use <code>update(MBBan mbBan, boolean merge)</code>.
50       */
51      public com.liferay.portlet.messageboards.model.MBBan update(
52          com.liferay.portlet.messageboards.model.MBBan mbBan)
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        mbBan 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 mbBan 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.portlet.messageboards.model.MBBan update(
69          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
70          throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.messageboards.model.MBBan updateImpl(
73          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
74          throws com.liferay.portal.SystemException;
75  
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      public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
85          long groupId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
88          long groupId, int start, int end)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
92          long groupId, int start, int end,
93          com.liferay.portal.kernel.util.OrderByComparator obc)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
97          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException,
99              com.liferay.portlet.messageboards.NoSuchBanException;
100 
101     public com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
102         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.messageboards.NoSuchBanException;
105 
106     public com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
107         long banId, long groupId,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException,
110             com.liferay.portlet.messageboards.NoSuchBanException;
111 
112     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
113         long userId) throws com.liferay.portal.SystemException;
114 
115     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
116         long userId, int start, int end)
117         throws com.liferay.portal.SystemException;
118 
119     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
120         long userId, int start, int end,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
125         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.messageboards.NoSuchBanException;
128 
129     public com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
130         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.messageboards.NoSuchBanException;
133 
134     public com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
135         long banId, long userId,
136         com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.messageboards.NoSuchBanException;
139 
140     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
141         long banUserId) throws com.liferay.portal.SystemException;
142 
143     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
144         long banUserId, int start, int end)
145         throws com.liferay.portal.SystemException;
146 
147     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
148         long banUserId, int start, int end,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException;
151 
152     public com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
153         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.messageboards.NoSuchBanException;
156 
157     public com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
158         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.messageboards.NoSuchBanException;
161 
162     public com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
163         long banId, long banUserId,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException,
166             com.liferay.portlet.messageboards.NoSuchBanException;
167 
168     public com.liferay.portlet.messageboards.model.MBBan findByG_B(
169         long groupId, long banUserId)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.messageboards.NoSuchBanException;
172 
173     public com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
174         long groupId, long banUserId) throws com.liferay.portal.SystemException;
175 
176     public com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
177         long groupId, long banUserId, boolean retrieveFromCache)
178         throws com.liferay.portal.SystemException;
179 
180     public java.util.List<Object> findWithDynamicQuery(
181         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
182         throws com.liferay.portal.SystemException;
183 
184     public java.util.List<Object> findWithDynamicQuery(
185         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
186         int end) throws com.liferay.portal.SystemException;
187 
188     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
189         throws com.liferay.portal.SystemException;
190 
191     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
192         int start, int end) throws com.liferay.portal.SystemException;
193 
194     public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
195         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException;
197 
198     public void removeByGroupId(long groupId)
199         throws com.liferay.portal.SystemException;
200 
201     public void removeByUserId(long userId)
202         throws com.liferay.portal.SystemException;
203 
204     public void removeByBanUserId(long banUserId)
205         throws com.liferay.portal.SystemException;
206 
207     public void removeByG_B(long groupId, long banUserId)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.messageboards.NoSuchBanException;
210 
211     public void removeAll() throws com.liferay.portal.SystemException;
212 
213     public int countByGroupId(long groupId)
214         throws com.liferay.portal.SystemException;
215 
216     public int countByUserId(long userId)
217         throws com.liferay.portal.SystemException;
218 
219     public int countByBanUserId(long banUserId)
220         throws com.liferay.portal.SystemException;
221 
222     public int countByG_B(long groupId, long banUserId)
223         throws com.liferay.portal.SystemException;
224 
225     public int countAll() throws com.liferay.portal.SystemException;
226 }