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