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="MBCategoryPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface MBCategoryPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.messageboards.model.MBCategory mbCategory);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.messageboards.model.MBCategory> mbCategories);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.messageboards.model.MBCategory create(
40          long categoryId);
41  
42      public com.liferay.portlet.messageboards.model.MBCategory remove(
43          long categoryId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.messageboards.NoSuchCategoryException;
46  
47      public com.liferay.portlet.messageboards.model.MBCategory remove(
48          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(MBCategory mbCategory, boolean merge)</code>.
53       */
54      public com.liferay.portlet.messageboards.model.MBCategory update(
55          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
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        mbCategory 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 mbCategory 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.MBCategory update(
72          com.liferay.portlet.messageboards.model.MBCategory mbCategory,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.messageboards.model.MBCategory updateImpl(
76          com.liferay.portlet.messageboards.model.MBCategory mbCategory,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.messageboards.model.MBCategory findByPrimaryKey(
80          long categoryId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.messageboards.NoSuchCategoryException;
83  
84      public com.liferay.portlet.messageboards.model.MBCategory fetchByPrimaryKey(
85          long categoryId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
91          java.lang.String uuid, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
95          java.lang.String uuid, 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.MBCategory findByUuid_First(
100         java.lang.String uuid,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.messageboards.NoSuchCategoryException;
104 
105     public com.liferay.portlet.messageboards.model.MBCategory findByUuid_Last(
106         java.lang.String uuid,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.messageboards.NoSuchCategoryException;
110 
111     public com.liferay.portlet.messageboards.model.MBCategory[] findByUuid_PrevAndNext(
112         long categoryId, java.lang.String uuid,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.messageboards.NoSuchCategoryException;
116 
117     public com.liferay.portlet.messageboards.model.MBCategory findByUUID_G(
118         java.lang.String uuid, long groupId)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.messageboards.NoSuchCategoryException;
121 
122     public com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
123         java.lang.String uuid, long groupId)
124         throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
127         java.lang.String uuid, long groupId, boolean retrieveFromCache)
128         throws com.liferay.portal.SystemException;
129 
130     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
131         long groupId) throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
134         long groupId, int start, int end)
135         throws com.liferay.portal.SystemException;
136 
137     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
138         long groupId, int start, int end,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException;
141 
142     public com.liferay.portlet.messageboards.model.MBCategory findByGroupId_First(
143         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.messageboards.NoSuchCategoryException;
146 
147     public com.liferay.portlet.messageboards.model.MBCategory findByGroupId_Last(
148         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.messageboards.NoSuchCategoryException;
151 
152     public com.liferay.portlet.messageboards.model.MBCategory[] findByGroupId_PrevAndNext(
153         long categoryId, long groupId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.messageboards.NoSuchCategoryException;
157 
158     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
159         long companyId) throws com.liferay.portal.SystemException;
160 
161     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
162         long companyId, int start, int end)
163         throws com.liferay.portal.SystemException;
164 
165     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
166         long companyId, int start, int end,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException;
169 
170     public com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_First(
171         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.messageboards.NoSuchCategoryException;
174 
175     public com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_Last(
176         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.messageboards.NoSuchCategoryException;
179 
180     public com.liferay.portlet.messageboards.model.MBCategory[] findByCompanyId_PrevAndNext(
181         long categoryId, long companyId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.messageboards.NoSuchCategoryException;
185 
186     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
187         long groupId, long parentCategoryId)
188         throws com.liferay.portal.SystemException;
189 
190     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
191         long groupId, long parentCategoryId, int start, int end)
192         throws com.liferay.portal.SystemException;
193 
194     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
195         long groupId, long parentCategoryId, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException;
198 
199     public com.liferay.portlet.messageboards.model.MBCategory findByG_P_First(
200         long groupId, long parentCategoryId,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.messageboards.NoSuchCategoryException;
204 
205     public com.liferay.portlet.messageboards.model.MBCategory findByG_P_Last(
206         long groupId, long parentCategoryId,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.messageboards.NoSuchCategoryException;
210 
211     public com.liferay.portlet.messageboards.model.MBCategory[] findByG_P_PrevAndNext(
212         long categoryId, long groupId, long parentCategoryId,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.messageboards.NoSuchCategoryException;
216 
217     public java.util.List<Object> findWithDynamicQuery(
218         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
219         throws com.liferay.portal.SystemException;
220 
221     public java.util.List<Object> findWithDynamicQuery(
222         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
223         int end) throws com.liferay.portal.SystemException;
224 
225     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll()
226         throws com.liferay.portal.SystemException;
227 
228     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
229         int start, int end) throws com.liferay.portal.SystemException;
230 
231     public java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
232         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException;
234 
235     public void removeByUuid(java.lang.String uuid)
236         throws com.liferay.portal.SystemException;
237 
238     public void removeByUUID_G(java.lang.String uuid, long groupId)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.messageboards.NoSuchCategoryException;
241 
242     public void removeByGroupId(long groupId)
243         throws com.liferay.portal.SystemException;
244 
245     public void removeByCompanyId(long companyId)
246         throws com.liferay.portal.SystemException;
247 
248     public void removeByG_P(long groupId, long parentCategoryId)
249         throws com.liferay.portal.SystemException;
250 
251     public void removeAll() throws com.liferay.portal.SystemException;
252 
253     public int countByUuid(java.lang.String uuid)
254         throws com.liferay.portal.SystemException;
255 
256     public int countByUUID_G(java.lang.String uuid, long groupId)
257         throws com.liferay.portal.SystemException;
258 
259     public int countByGroupId(long groupId)
260         throws com.liferay.portal.SystemException;
261 
262     public int countByCompanyId(long companyId)
263         throws com.liferay.portal.SystemException;
264 
265     public int countByG_P(long groupId, long parentCategoryId)
266         throws com.liferay.portal.SystemException;
267 
268     public int countAll() throws com.liferay.portal.SystemException;
269 }