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