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  /**
23   * <a href="WikiNodeUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class WikiNodeUtil {
29      public static void cacheResult(
30          com.liferay.portlet.wiki.model.WikiNode wikiNode) {
31          getPersistence().cacheResult(wikiNode);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.wiki.model.WikiNode> wikiNodes) {
36          getPersistence().cacheResult(wikiNodes);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.wiki.model.WikiNode create(long nodeId) {
44          return getPersistence().create(nodeId);
45      }
46  
47      public static com.liferay.portlet.wiki.model.WikiNode remove(long nodeId)
48          throws com.liferay.portal.SystemException,
49              com.liferay.portlet.wiki.NoSuchNodeException {
50          return getPersistence().remove(nodeId);
51      }
52  
53      public static com.liferay.portlet.wiki.model.WikiNode remove(
54          com.liferay.portlet.wiki.model.WikiNode wikiNode)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().remove(wikiNode);
57      }
58  
59      /**
60       * @deprecated Use <code>update(WikiNode wikiNode, boolean merge)</code>.
61       */
62      public static com.liferay.portlet.wiki.model.WikiNode update(
63          com.liferay.portlet.wiki.model.WikiNode wikiNode)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().update(wikiNode);
66      }
67  
68      /**
69       * Add, update, or merge, the entity. This method also calls the model
70       * listeners to trigger the proper events associated with adding, deleting,
71       * or updating an entity.
72       *
73       * @param        wikiNode the entity to add, update, or merge
74       * @param        merge boolean value for whether to merge the entity. The
75       *                default value is false. Setting merge to true is more
76       *                expensive and should only be true when wikiNode is
77       *                transient. See LEP-5473 for a detailed discussion of this
78       *                method.
79       * @return        true if the portlet can be displayed via Ajax
80       */
81      public static com.liferay.portlet.wiki.model.WikiNode update(
82          com.liferay.portlet.wiki.model.WikiNode wikiNode, boolean merge)
83          throws com.liferay.portal.SystemException {
84          return getPersistence().update(wikiNode, merge);
85      }
86  
87      public static com.liferay.portlet.wiki.model.WikiNode updateImpl(
88          com.liferay.portlet.wiki.model.WikiNode wikiNode, boolean merge)
89          throws com.liferay.portal.SystemException {
90          return getPersistence().updateImpl(wikiNode, merge);
91      }
92  
93      public static com.liferay.portlet.wiki.model.WikiNode findByPrimaryKey(
94          long nodeId)
95          throws com.liferay.portal.SystemException,
96              com.liferay.portlet.wiki.NoSuchNodeException {
97          return getPersistence().findByPrimaryKey(nodeId);
98      }
99  
100     public static com.liferay.portlet.wiki.model.WikiNode fetchByPrimaryKey(
101         long nodeId) throws com.liferay.portal.SystemException {
102         return getPersistence().fetchByPrimaryKey(nodeId);
103     }
104 
105     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByUuid(
106         java.lang.String uuid) throws com.liferay.portal.SystemException {
107         return getPersistence().findByUuid(uuid);
108     }
109 
110     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByUuid(
111         java.lang.String uuid, int start, int end)
112         throws com.liferay.portal.SystemException {
113         return getPersistence().findByUuid(uuid, start, end);
114     }
115 
116     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByUuid(
117         java.lang.String uuid, int start, int end,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException {
120         return getPersistence().findByUuid(uuid, start, end, obc);
121     }
122 
123     public static com.liferay.portlet.wiki.model.WikiNode findByUuid_First(
124         java.lang.String uuid,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException,
127             com.liferay.portlet.wiki.NoSuchNodeException {
128         return getPersistence().findByUuid_First(uuid, obc);
129     }
130 
131     public static com.liferay.portlet.wiki.model.WikiNode findByUuid_Last(
132         java.lang.String uuid,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.wiki.NoSuchNodeException {
136         return getPersistence().findByUuid_Last(uuid, obc);
137     }
138 
139     public static com.liferay.portlet.wiki.model.WikiNode[] findByUuid_PrevAndNext(
140         long nodeId, java.lang.String uuid,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.wiki.NoSuchNodeException {
144         return getPersistence().findByUuid_PrevAndNext(nodeId, uuid, obc);
145     }
146 
147     public static com.liferay.portlet.wiki.model.WikiNode findByUUID_G(
148         java.lang.String uuid, long groupId)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.wiki.NoSuchNodeException {
151         return getPersistence().findByUUID_G(uuid, groupId);
152     }
153 
154     public static com.liferay.portlet.wiki.model.WikiNode fetchByUUID_G(
155         java.lang.String uuid, long groupId)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().fetchByUUID_G(uuid, groupId);
158     }
159 
160     public static com.liferay.portlet.wiki.model.WikiNode fetchByUUID_G(
161         java.lang.String uuid, long groupId, boolean retrieveFromCache)
162         throws com.liferay.portal.SystemException {
163         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
164     }
165 
166     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByGroupId(
167         long groupId) throws com.liferay.portal.SystemException {
168         return getPersistence().findByGroupId(groupId);
169     }
170 
171     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByGroupId(
172         long groupId, int start, int end)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByGroupId(groupId, start, end);
175     }
176 
177     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByGroupId(
178         long groupId, int start, int end,
179         com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findByGroupId(groupId, start, end, obc);
182     }
183 
184     public static com.liferay.portlet.wiki.model.WikiNode findByGroupId_First(
185         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.wiki.NoSuchNodeException {
188         return getPersistence().findByGroupId_First(groupId, obc);
189     }
190 
191     public static com.liferay.portlet.wiki.model.WikiNode findByGroupId_Last(
192         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException,
194             com.liferay.portlet.wiki.NoSuchNodeException {
195         return getPersistence().findByGroupId_Last(groupId, obc);
196     }
197 
198     public static com.liferay.portlet.wiki.model.WikiNode[] findByGroupId_PrevAndNext(
199         long nodeId, long groupId,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.wiki.NoSuchNodeException {
203         return getPersistence().findByGroupId_PrevAndNext(nodeId, groupId, obc);
204     }
205 
206     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByCompanyId(
207         long companyId) throws com.liferay.portal.SystemException {
208         return getPersistence().findByCompanyId(companyId);
209     }
210 
211     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByCompanyId(
212         long companyId, int start, int end)
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findByCompanyId(companyId, start, end);
215     }
216 
217     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findByCompanyId(
218         long companyId, int start, int end,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().findByCompanyId(companyId, start, end, obc);
222     }
223 
224     public static com.liferay.portlet.wiki.model.WikiNode findByCompanyId_First(
225         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException,
227             com.liferay.portlet.wiki.NoSuchNodeException {
228         return getPersistence().findByCompanyId_First(companyId, obc);
229     }
230 
231     public static com.liferay.portlet.wiki.model.WikiNode findByCompanyId_Last(
232         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException,
234             com.liferay.portlet.wiki.NoSuchNodeException {
235         return getPersistence().findByCompanyId_Last(companyId, obc);
236     }
237 
238     public static com.liferay.portlet.wiki.model.WikiNode[] findByCompanyId_PrevAndNext(
239         long nodeId, long companyId,
240         com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException,
242             com.liferay.portlet.wiki.NoSuchNodeException {
243         return getPersistence()
244                    .findByCompanyId_PrevAndNext(nodeId, companyId, obc);
245     }
246 
247     public static com.liferay.portlet.wiki.model.WikiNode findByG_N(
248         long groupId, java.lang.String name)
249         throws com.liferay.portal.SystemException,
250             com.liferay.portlet.wiki.NoSuchNodeException {
251         return getPersistence().findByG_N(groupId, name);
252     }
253 
254     public static com.liferay.portlet.wiki.model.WikiNode fetchByG_N(
255         long groupId, java.lang.String name)
256         throws com.liferay.portal.SystemException {
257         return getPersistence().fetchByG_N(groupId, name);
258     }
259 
260     public static com.liferay.portlet.wiki.model.WikiNode fetchByG_N(
261         long groupId, java.lang.String name, boolean retrieveFromCache)
262         throws com.liferay.portal.SystemException {
263         return getPersistence().fetchByG_N(groupId, name, retrieveFromCache);
264     }
265 
266     public static java.util.List<Object> findWithDynamicQuery(
267         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findWithDynamicQuery(dynamicQuery);
270     }
271 
272     public static java.util.List<Object> findWithDynamicQuery(
273         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
274         int end) throws com.liferay.portal.SystemException {
275         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
276     }
277 
278     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findAll()
279         throws com.liferay.portal.SystemException {
280         return getPersistence().findAll();
281     }
282 
283     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findAll(
284         int start, int end) throws com.liferay.portal.SystemException {
285         return getPersistence().findAll(start, end);
286     }
287 
288     public static java.util.List<com.liferay.portlet.wiki.model.WikiNode> findAll(
289         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().findAll(start, end, obc);
292     }
293 
294     public static void removeByUuid(java.lang.String uuid)
295         throws com.liferay.portal.SystemException {
296         getPersistence().removeByUuid(uuid);
297     }
298 
299     public static void removeByUUID_G(java.lang.String uuid, long groupId)
300         throws com.liferay.portal.SystemException,
301             com.liferay.portlet.wiki.NoSuchNodeException {
302         getPersistence().removeByUUID_G(uuid, groupId);
303     }
304 
305     public static void removeByGroupId(long groupId)
306         throws com.liferay.portal.SystemException {
307         getPersistence().removeByGroupId(groupId);
308     }
309 
310     public static void removeByCompanyId(long companyId)
311         throws com.liferay.portal.SystemException {
312         getPersistence().removeByCompanyId(companyId);
313     }
314 
315     public static void removeByG_N(long groupId, java.lang.String name)
316         throws com.liferay.portal.SystemException,
317             com.liferay.portlet.wiki.NoSuchNodeException {
318         getPersistence().removeByG_N(groupId, name);
319     }
320 
321     public static void removeAll() throws com.liferay.portal.SystemException {
322         getPersistence().removeAll();
323     }
324 
325     public static int countByUuid(java.lang.String uuid)
326         throws com.liferay.portal.SystemException {
327         return getPersistence().countByUuid(uuid);
328     }
329 
330     public static int countByUUID_G(java.lang.String uuid, long groupId)
331         throws com.liferay.portal.SystemException {
332         return getPersistence().countByUUID_G(uuid, groupId);
333     }
334 
335     public static int countByGroupId(long groupId)
336         throws com.liferay.portal.SystemException {
337         return getPersistence().countByGroupId(groupId);
338     }
339 
340     public static int countByCompanyId(long companyId)
341         throws com.liferay.portal.SystemException {
342         return getPersistence().countByCompanyId(companyId);
343     }
344 
345     public static int countByG_N(long groupId, java.lang.String name)
346         throws com.liferay.portal.SystemException {
347         return getPersistence().countByG_N(groupId, name);
348     }
349 
350     public static int countAll() throws com.liferay.portal.SystemException {
351         return getPersistence().countAll();
352     }
353 
354     public static WikiNodePersistence getPersistence() {
355         return _persistence;
356     }
357 
358     public void setPersistence(WikiNodePersistence persistence) {
359         _persistence = persistence;
360     }
361 
362     private static WikiNodePersistence _persistence;
363 }