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