1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portlet.wiki.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  
22  import com.liferay.portlet.wiki.model.WikiPageResource;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="WikiPageResourceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       WikiPageResourcePersistence
36   * @see       WikiPageResourcePersistenceImpl
37   * @generated
38   */
39  public class WikiPageResourceUtil {
40      /**
41       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
42       */
43      public static void clearCache() {
44          getPersistence().clearCache();
45      }
46  
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(WikiPageResource)
49       */
50      public static void clearCache(WikiPageResource wikiPageResource) {
51          getPersistence().clearCache(wikiPageResource);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
56       */
57      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().countWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66          throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
72       */
73      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74          int start, int end) throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static WikiPageResource remove(WikiPageResource wikiPageResource)
82          throws SystemException {
83          return getPersistence().remove(wikiPageResource);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static WikiPageResource update(WikiPageResource wikiPageResource,
90          boolean merge) throws SystemException {
91          return getPersistence().update(wikiPageResource, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) {
96          getPersistence().cacheResult(wikiPageResource);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources) {
101         getPersistence().cacheResult(wikiPageResources);
102     }
103 
104     public static com.liferay.portlet.wiki.model.WikiPageResource create(
105         long resourcePrimKey) {
106         return getPersistence().create(resourcePrimKey);
107     }
108 
109     public static com.liferay.portlet.wiki.model.WikiPageResource remove(
110         long resourcePrimKey)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.wiki.NoSuchPageResourceException {
113         return getPersistence().remove(resourcePrimKey);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portlet.wiki.model.WikiPageResource update(
120         com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(wikiPageResource);
123     }
124 
125     public static com.liferay.portlet.wiki.model.WikiPageResource updateImpl(
126         com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(wikiPageResource, merge);
129     }
130 
131     public static com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey(
132         long resourcePrimKey)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.wiki.NoSuchPageResourceException {
135         return getPersistence().findByPrimaryKey(resourcePrimKey);
136     }
137 
138     public static com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey(
139         long resourcePrimKey) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(resourcePrimKey);
141     }
142 
143     public static com.liferay.portlet.wiki.model.WikiPageResource findByN_T(
144         long nodeId, java.lang.String title)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.wiki.NoSuchPageResourceException {
147         return getPersistence().findByN_T(nodeId, title);
148     }
149 
150     public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
151         long nodeId, java.lang.String title)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().fetchByN_T(nodeId, title);
154     }
155 
156     public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
157         long nodeId, java.lang.String title, boolean retrieveFromCache)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().fetchByN_T(nodeId, title, retrieveFromCache);
160     }
161 
162     public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll()
163         throws com.liferay.portal.SystemException {
164         return getPersistence().findAll();
165     }
166 
167     public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
168         int start, int end) throws com.liferay.portal.SystemException {
169         return getPersistence().findAll(start, end);
170     }
171 
172     public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
173         int start, int end,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.SystemException {
176         return getPersistence().findAll(start, end, orderByComparator);
177     }
178 
179     public static void removeByN_T(long nodeId, java.lang.String title)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.wiki.NoSuchPageResourceException {
182         getPersistence().removeByN_T(nodeId, title);
183     }
184 
185     public static void removeAll() throws com.liferay.portal.SystemException {
186         getPersistence().removeAll();
187     }
188 
189     public static int countByN_T(long nodeId, java.lang.String title)
190         throws com.liferay.portal.SystemException {
191         return getPersistence().countByN_T(nodeId, title);
192     }
193 
194     public static int countAll() throws com.liferay.portal.SystemException {
195         return getPersistence().countAll();
196     }
197 
198     public static WikiPageResourcePersistence getPersistence() {
199         if (_persistence == null) {
200             _persistence = (WikiPageResourcePersistence)PortalBeanLocatorUtil.locate(WikiPageResourcePersistence.class.getName());
201 
202             ReferenceRegistry.registerReference(WikiPageResourceUtil.class,
203                 "_persistence");
204         }
205 
206         return _persistence;
207     }
208 
209     public void setPersistence(WikiPageResourcePersistence persistence) {
210         _persistence = persistence;
211 
212         ReferenceRegistry.registerReference(WikiPageResourceUtil.class,
213             "_persistence");
214     }
215 
216     private static WikiPageResourcePersistence _persistence;
217 }