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