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="WikiPageResourceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class WikiPageResourceUtil {
32      public static com.liferay.portlet.wiki.model.WikiPageResource create(
33          long resourcePrimKey) {
34          return getPersistence().create(resourcePrimKey);
35      }
36  
37      public static com.liferay.portlet.wiki.model.WikiPageResource remove(
38          long resourcePrimKey)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.wiki.NoSuchPageResourceException {
41          return getPersistence().remove(resourcePrimKey);
42      }
43  
44      public static com.liferay.portlet.wiki.model.WikiPageResource remove(
45          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(wikiPageResource);
48      }
49  
50      public static com.liferay.portlet.wiki.model.WikiPageResource update(
51          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(wikiPageResource);
54      }
55  
56      public static com.liferay.portlet.wiki.model.WikiPageResource update(
57          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(wikiPageResource, merge);
60      }
61  
62      public static com.liferay.portlet.wiki.model.WikiPageResource updateImpl(
63          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(wikiPageResource, merge);
66      }
67  
68      public static com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey(
69          long resourcePrimKey)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.wiki.NoSuchPageResourceException {
72          return getPersistence().findByPrimaryKey(resourcePrimKey);
73      }
74  
75      public static com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey(
76          long resourcePrimKey) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(resourcePrimKey);
78      }
79  
80      public static com.liferay.portlet.wiki.model.WikiPageResource findByN_T(
81          long nodeId, java.lang.String title)
82          throws com.liferay.portal.SystemException, 
83              com.liferay.portlet.wiki.NoSuchPageResourceException {
84          return getPersistence().findByN_T(nodeId, title);
85      }
86  
87      public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
88          long nodeId, java.lang.String title)
89          throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByN_T(nodeId, title);
91      }
92  
93      public static java.util.List findWithDynamicQuery(
94          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().findWithDynamicQuery(queryInitializer);
97      }
98  
99      public static java.util.List findWithDynamicQuery(
100         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
101         int begin, int end) throws com.liferay.portal.SystemException {
102         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
103             end);
104     }
105 
106     public static java.util.List findAll()
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findAll();
109     }
110 
111     public static java.util.List findAll(int begin, int end)
112         throws com.liferay.portal.SystemException {
113         return getPersistence().findAll(begin, end);
114     }
115 
116     public static java.util.List findAll(int begin, int end,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().findAll(begin, end, obc);
120     }
121 
122     public static void removeByN_T(long nodeId, java.lang.String title)
123         throws com.liferay.portal.SystemException, 
124             com.liferay.portlet.wiki.NoSuchPageResourceException {
125         getPersistence().removeByN_T(nodeId, title);
126     }
127 
128     public static void removeAll() throws com.liferay.portal.SystemException {
129         getPersistence().removeAll();
130     }
131 
132     public static int countByN_T(long nodeId, java.lang.String title)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().countByN_T(nodeId, title);
135     }
136 
137     public static int countAll() throws com.liferay.portal.SystemException {
138         return getPersistence().countAll();
139     }
140 
141     public static WikiPageResourcePersistence getPersistence() {
142         return _getUtil()._persistence;
143     }
144 
145     public void setPersistence(WikiPageResourcePersistence persistence) {
146         _persistence = persistence;
147     }
148 
149     private static WikiPageResourceUtil _getUtil() {
150         if (_util == null) {
151             _util = (WikiPageResourceUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
152         }
153 
154         return _util;
155     }
156 
157     private static final String _UTIL = WikiPageResourceUtil.class.getName();
158     private static WikiPageResourceUtil _util;
159     private WikiPageResourcePersistence _persistence;
160 }