1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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="MBDiscussionPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       MBDiscussionPersistenceImpl
37   * @see       MBDiscussionUtil
38   * @generated
39   */
40  public interface MBDiscussionPersistence extends BasePersistence {
41      public void cacheResult(
42          com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion);
43  
44      public void cacheResult(
45          java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> mbDiscussions);
46  
47      public void clearCache();
48  
49      public com.liferay.portlet.messageboards.model.MBDiscussion create(
50          long discussionId);
51  
52      public com.liferay.portlet.messageboards.model.MBDiscussion remove(
53          long discussionId)
54          throws com.liferay.portal.SystemException,
55              com.liferay.portlet.messageboards.NoSuchDiscussionException;
56  
57      public com.liferay.portlet.messageboards.model.MBDiscussion remove(
58          com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * @deprecated Use {@link #update(MBDiscussion, boolean merge)}.
63       */
64      public com.liferay.portlet.messageboards.model.MBDiscussion update(
65          com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion)
66          throws com.liferay.portal.SystemException;
67  
68      /**
69       * Add, update, or merge, the entity. This method also calls the model
70       * listeners to trigger the proper events associated with adding, deleting,
71       * or updating an entity.
72       *
73       * @param  mbDiscussion the entity to add, update, or merge
74       * @param  merge boolean value for whether to merge the entity. The default
75       *         value is false. Setting merge to true is more expensive and
76       *         should only be true when mbDiscussion is transient. See
77       *         LEP-5473 for a detailed discussion of this method.
78       * @return the entity that was added, updated, or merged
79       */
80      public com.liferay.portlet.messageboards.model.MBDiscussion update(
81          com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion,
82          boolean merge) throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portlet.messageboards.model.MBDiscussion updateImpl(
85          com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion,
86          boolean merge) throws com.liferay.portal.SystemException;
87  
88      public com.liferay.portlet.messageboards.model.MBDiscussion findByPrimaryKey(
89          long discussionId)
90          throws com.liferay.portal.SystemException,
91              com.liferay.portlet.messageboards.NoSuchDiscussionException;
92  
93      public com.liferay.portlet.messageboards.model.MBDiscussion fetchByPrimaryKey(
94          long discussionId) throws com.liferay.portal.SystemException;
95  
96      public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
97          long classNameId) throws com.liferay.portal.SystemException;
98  
99      public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
100         long classNameId, int start, int end)
101         throws com.liferay.portal.SystemException;
102 
103     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
104         long classNameId, int start, int end,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException;
107 
108     public com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_First(
109         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.messageboards.NoSuchDiscussionException;
112 
113     public com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_Last(
114         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.messageboards.NoSuchDiscussionException;
117 
118     public com.liferay.portlet.messageboards.model.MBDiscussion[] findByClassNameId_PrevAndNext(
119         long discussionId, long classNameId,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.messageboards.NoSuchDiscussionException;
123 
124     public com.liferay.portlet.messageboards.model.MBDiscussion findByThreadId(
125         long threadId)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.messageboards.NoSuchDiscussionException;
128 
129     public com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
130         long threadId) throws com.liferay.portal.SystemException;
131 
132     public com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
133         long threadId, boolean retrieveFromCache)
134         throws com.liferay.portal.SystemException;
135 
136     public com.liferay.portlet.messageboards.model.MBDiscussion findByC_C(
137         long classNameId, long classPK)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.messageboards.NoSuchDiscussionException;
140 
141     public com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
142         long classNameId, long classPK)
143         throws com.liferay.portal.SystemException;
144 
145     public com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
146         long classNameId, long classPK, boolean retrieveFromCache)
147         throws com.liferay.portal.SystemException;
148 
149     public java.util.List<Object> findWithDynamicQuery(
150         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151         throws com.liferay.portal.SystemException;
152 
153     public java.util.List<Object> findWithDynamicQuery(
154         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
155         int end) throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll()
158         throws com.liferay.portal.SystemException;
159 
160     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
161         int start, int end) throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
164         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException;
166 
167     public void removeByClassNameId(long classNameId)
168         throws com.liferay.portal.SystemException;
169 
170     public void removeByThreadId(long threadId)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.messageboards.NoSuchDiscussionException;
173 
174     public void removeByC_C(long classNameId, long classPK)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.messageboards.NoSuchDiscussionException;
177 
178     public void removeAll() throws com.liferay.portal.SystemException;
179 
180     public int countByClassNameId(long classNameId)
181         throws com.liferay.portal.SystemException;
182 
183     public int countByThreadId(long threadId)
184         throws com.liferay.portal.SystemException;
185 
186     public int countByC_C(long classNameId, long classPK)
187         throws com.liferay.portal.SystemException;
188 
189     public int countAll() throws com.liferay.portal.SystemException;
190 }