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