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="MBCategoryPersistence.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 MBCategoryPersistence extends BasePersistence {
37      public com.liferay.portlet.messageboards.model.MBCategory create(
38          long categoryId);
39  
40      public com.liferay.portlet.messageboards.model.MBCategory remove(
41          long categoryId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.messageboards.NoSuchCategoryException;
44  
45      public com.liferay.portlet.messageboards.model.MBCategory remove(
46          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(MBCategory mbCategory, boolean merge)</code>.
51       */
52      public com.liferay.portlet.messageboards.model.MBCategory update(
53          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        mbCategory the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when mbCategory is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portlet.messageboards.model.MBCategory update(
70          com.liferay.portlet.messageboards.model.MBCategory mbCategory,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.messageboards.model.MBCategory updateImpl(
74          com.liferay.portlet.messageboards.model.MBCategory mbCategory,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.messageboards.model.MBCategory findByPrimaryKey(
79          long categoryId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portlet.messageboards.NoSuchCategoryException;
82  
83      public com.liferay.portlet.messageboards.model.MBCategory fetchByPrimaryKey(
84          long categoryId) throws com.liferay.portal.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
92          java.lang.String uuid, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96      public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
97          java.lang.String uuid, int start, int end,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102     public com.liferay.portlet.messageboards.model.MBCategory findByUuid_First(
103         java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.messageboards.NoSuchCategoryException;
107 
108     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109     public com.liferay.portlet.messageboards.model.MBCategory findByUuid_Last(
110         java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.messageboards.NoSuchCategoryException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public com.liferay.portlet.messageboards.model.MBCategory[] findByUuid_PrevAndNext(
117         long categoryId, java.lang.String uuid,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.messageboards.NoSuchCategoryException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public com.liferay.portlet.messageboards.model.MBCategory findByUUID_G(
124         java.lang.String uuid, long groupId)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.messageboards.NoSuchCategoryException;
127 
128     public com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
129         java.lang.String uuid, long groupId)
130         throws com.liferay.portal.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
134         long groupId) throws com.liferay.portal.SystemException;
135 
136     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
138         long groupId, int start, int end)
139         throws com.liferay.portal.SystemException;
140 
141     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
143         long groupId, int start, int end,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public com.liferay.portlet.messageboards.model.MBCategory findByGroupId_First(
149         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.messageboards.NoSuchCategoryException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public com.liferay.portlet.messageboards.model.MBCategory findByGroupId_Last(
155         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.messageboards.NoSuchCategoryException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public com.liferay.portlet.messageboards.model.MBCategory[] findByGroupId_PrevAndNext(
161         long categoryId, long groupId,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.messageboards.NoSuchCategoryException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
168         long companyId) throws com.liferay.portal.SystemException;
169 
170     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
172         long companyId, int start, int end)
173         throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
177         long companyId, int start, int end,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_First(
183         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.messageboards.NoSuchCategoryException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_Last(
189         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.messageboards.NoSuchCategoryException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public com.liferay.portlet.messageboards.model.MBCategory[] findByCompanyId_PrevAndNext(
195         long categoryId, long companyId,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.messageboards.NoSuchCategoryException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
202         long groupId, long parentCategoryId)
203         throws com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
207         long groupId, long parentCategoryId, int start, int end)
208         throws com.liferay.portal.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
212         long groupId, long parentCategoryId, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public com.liferay.portlet.messageboards.model.MBCategory findByG_P_First(
218         long groupId, long parentCategoryId,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.messageboards.NoSuchCategoryException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public com.liferay.portlet.messageboards.model.MBCategory findByG_P_Last(
225         long groupId, long parentCategoryId,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.messageboards.NoSuchCategoryException;
229 
230     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231     public com.liferay.portlet.messageboards.model.MBCategory[] findByG_P_PrevAndNext(
232         long categoryId, long groupId, long parentCategoryId,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException,
235             com.liferay.portlet.messageboards.NoSuchCategoryException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public java.util.List<Object> findWithDynamicQuery(
239         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
240         throws com.liferay.portal.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public java.util.List<Object> findWithDynamicQuery(
244         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
245         int end) throws com.liferay.portal.SystemException;
246 
247     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll()
249         throws com.liferay.portal.SystemException;
250 
251     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
253         int start, int end) throws com.liferay.portal.SystemException;
254 
255     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
257         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
258         throws com.liferay.portal.SystemException;
259 
260     public void removeByUuid(java.lang.String uuid)
261         throws com.liferay.portal.SystemException;
262 
263     public void removeByUUID_G(java.lang.String uuid, long groupId)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.messageboards.NoSuchCategoryException;
266 
267     public void removeByGroupId(long groupId)
268         throws com.liferay.portal.SystemException;
269 
270     public void removeByCompanyId(long companyId)
271         throws com.liferay.portal.SystemException;
272 
273     public void removeByG_P(long groupId, long parentCategoryId)
274         throws com.liferay.portal.SystemException;
275 
276     public void removeAll() throws com.liferay.portal.SystemException;
277 
278     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279     public int countByUuid(java.lang.String uuid)
280         throws com.liferay.portal.SystemException;
281 
282     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283     public int countByUUID_G(java.lang.String uuid, long groupId)
284         throws com.liferay.portal.SystemException;
285 
286     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287     public int countByGroupId(long groupId)
288         throws com.liferay.portal.SystemException;
289 
290     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291     public int countByCompanyId(long companyId)
292         throws com.liferay.portal.SystemException;
293 
294     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295     public int countByG_P(long groupId, long parentCategoryId)
296         throws com.liferay.portal.SystemException;
297 
298     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299     public int countAll() throws com.liferay.portal.SystemException;
300 }