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="MBMessageFlagPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface MBMessageFlagPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> mbMessageFlags);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.messageboards.model.MBMessageFlag create(
40          long messageFlagId);
41  
42      public com.liferay.portlet.messageboards.model.MBMessageFlag remove(
43          long messageFlagId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.messageboards.NoSuchMessageFlagException;
46  
47      public com.liferay.portlet.messageboards.model.MBMessageFlag remove(
48          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(MBMessageFlag mbMessageFlag, boolean merge)</code>.
53       */
54      public com.liferay.portlet.messageboards.model.MBMessageFlag update(
55          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        mbMessageFlag the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when mbMessageFlag is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portlet.messageboards.model.MBMessageFlag update(
72          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.messageboards.model.MBMessageFlag updateImpl(
76          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.messageboards.model.MBMessageFlag findByPrimaryKey(
80          long messageFlagId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.messageboards.NoSuchMessageFlagException;
83  
84      public com.liferay.portlet.messageboards.model.MBMessageFlag fetchByPrimaryKey(
85          long messageFlagId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
88          long userId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
91          long userId, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
95          long userId, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.messageboards.model.MBMessageFlag findByUserId_First(
100         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException,
102             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
103 
104     public com.liferay.portlet.messageboards.model.MBMessageFlag findByUserId_Last(
105         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
108 
109     public com.liferay.portlet.messageboards.model.MBMessageFlag[] findByUserId_PrevAndNext(
110         long messageFlagId, long userId,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
114 
115     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
116         long threadId) throws com.liferay.portal.SystemException;
117 
118     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
119         long threadId, int start, int end)
120         throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
123         long threadId, int start, int end,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.messageboards.model.MBMessageFlag findByThreadId_First(
128         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException,
130             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
131 
132     public com.liferay.portlet.messageboards.model.MBMessageFlag findByThreadId_Last(
133         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
136 
137     public com.liferay.portlet.messageboards.model.MBMessageFlag[] findByThreadId_PrevAndNext(
138         long messageFlagId, long threadId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
142 
143     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
144         long messageId) throws com.liferay.portal.SystemException;
145 
146     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
147         long messageId, int start, int end)
148         throws com.liferay.portal.SystemException;
149 
150     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
151         long messageId, int start, int end,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException;
154 
155     public com.liferay.portlet.messageboards.model.MBMessageFlag findByMessageId_First(
156         long messageId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
159 
160     public com.liferay.portlet.messageboards.model.MBMessageFlag findByMessageId_Last(
161         long messageId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
164 
165     public com.liferay.portlet.messageboards.model.MBMessageFlag[] findByMessageId_PrevAndNext(
166         long messageFlagId, long messageId,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException,
169             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
170 
171     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
172         long threadId, int flag) throws com.liferay.portal.SystemException;
173 
174     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
175         long threadId, int flag, int start, int end)
176         throws com.liferay.portal.SystemException;
177 
178     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
179         long threadId, int flag, int start, int end,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException;
182 
183     public com.liferay.portlet.messageboards.model.MBMessageFlag findByT_F_First(
184         long threadId, int flag,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
188 
189     public com.liferay.portlet.messageboards.model.MBMessageFlag findByT_F_Last(
190         long threadId, int flag,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
194 
195     public com.liferay.portlet.messageboards.model.MBMessageFlag[] findByT_F_PrevAndNext(
196         long messageFlagId, long threadId, int flag,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
200 
201     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
202         long messageId, int flag) throws com.liferay.portal.SystemException;
203 
204     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
205         long messageId, int flag, int start, int end)
206         throws com.liferay.portal.SystemException;
207 
208     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
209         long messageId, int flag, int start, int end,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException;
212 
213     public com.liferay.portlet.messageboards.model.MBMessageFlag findByM_F_First(
214         long messageId, int flag,
215         com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
218 
219     public com.liferay.portlet.messageboards.model.MBMessageFlag findByM_F_Last(
220         long messageId, int flag,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException,
223             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
224 
225     public com.liferay.portlet.messageboards.model.MBMessageFlag[] findByM_F_PrevAndNext(
226         long messageFlagId, long messageId, int flag,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
230 
231     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
232         long userId, long threadId, int flag)
233         throws com.liferay.portal.SystemException;
234 
235     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
236         long userId, long threadId, int flag, int start, int end)
237         throws com.liferay.portal.SystemException;
238 
239     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
240         long userId, long threadId, int flag, int start, int end,
241         com.liferay.portal.kernel.util.OrderByComparator obc)
242         throws com.liferay.portal.SystemException;
243 
244     public com.liferay.portlet.messageboards.model.MBMessageFlag findByU_T_F_First(
245         long userId, long threadId, int flag,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.SystemException,
248             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
249 
250     public com.liferay.portlet.messageboards.model.MBMessageFlag findByU_T_F_Last(
251         long userId, long threadId, int flag,
252         com.liferay.portal.kernel.util.OrderByComparator obc)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
255 
256     public com.liferay.portlet.messageboards.model.MBMessageFlag[] findByU_T_F_PrevAndNext(
257         long messageFlagId, long userId, long threadId, int flag,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException,
260             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
261 
262     public com.liferay.portlet.messageboards.model.MBMessageFlag findByU_M_F(
263         long userId, long messageId, int flag)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
266 
267     public com.liferay.portlet.messageboards.model.MBMessageFlag fetchByU_M_F(
268         long userId, long messageId, int flag)
269         throws com.liferay.portal.SystemException;
270 
271     public com.liferay.portlet.messageboards.model.MBMessageFlag fetchByU_M_F(
272         long userId, long messageId, int flag, boolean retrieveFromCache)
273         throws com.liferay.portal.SystemException;
274 
275     public java.util.List<Object> findWithDynamicQuery(
276         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
277         throws com.liferay.portal.SystemException;
278 
279     public java.util.List<Object> findWithDynamicQuery(
280         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
281         int end) throws com.liferay.portal.SystemException;
282 
283     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll()
284         throws com.liferay.portal.SystemException;
285 
286     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll(
287         int start, int end) throws com.liferay.portal.SystemException;
288 
289     public java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll(
290         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
291         throws com.liferay.portal.SystemException;
292 
293     public void removeByUserId(long userId)
294         throws com.liferay.portal.SystemException;
295 
296     public void removeByThreadId(long threadId)
297         throws com.liferay.portal.SystemException;
298 
299     public void removeByMessageId(long messageId)
300         throws com.liferay.portal.SystemException;
301 
302     public void removeByT_F(long threadId, int flag)
303         throws com.liferay.portal.SystemException;
304 
305     public void removeByM_F(long messageId, int flag)
306         throws com.liferay.portal.SystemException;
307 
308     public void removeByU_T_F(long userId, long threadId, int flag)
309         throws com.liferay.portal.SystemException;
310 
311     public void removeByU_M_F(long userId, long messageId, int flag)
312         throws com.liferay.portal.SystemException,
313             com.liferay.portlet.messageboards.NoSuchMessageFlagException;
314 
315     public void removeAll() throws com.liferay.portal.SystemException;
316 
317     public int countByUserId(long userId)
318         throws com.liferay.portal.SystemException;
319 
320     public int countByThreadId(long threadId)
321         throws com.liferay.portal.SystemException;
322 
323     public int countByMessageId(long messageId)
324         throws com.liferay.portal.SystemException;
325 
326     public int countByT_F(long threadId, int flag)
327         throws com.liferay.portal.SystemException;
328 
329     public int countByM_F(long messageId, int flag)
330         throws com.liferay.portal.SystemException;
331 
332     public int countByU_T_F(long userId, long threadId, int flag)
333         throws com.liferay.portal.SystemException;
334 
335     public int countByU_M_F(long userId, long messageId, int flag)
336         throws com.liferay.portal.SystemException;
337 
338     public int countAll() throws com.liferay.portal.SystemException;
339 }