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