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