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.journal.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.journal.model.JournalArticleResource;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="JournalArticleResourceUtil.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       JournalArticleResourcePersistence
36   * @see       JournalArticleResourcePersistenceImpl
37   * @generated
38   */
39  public class JournalArticleResourceUtil {
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(JournalArticleResource)
49       */
50      public static void clearCache(JournalArticleResource journalArticleResource) {
51          getPersistence().clearCache(journalArticleResource);
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 JournalArticleResource remove(
82          JournalArticleResource journalArticleResource)
83          throws SystemException {
84          return getPersistence().remove(journalArticleResource);
85      }
86  
87      /**
88       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
89       */
90      public static JournalArticleResource update(
91          JournalArticleResource journalArticleResource, boolean merge)
92          throws SystemException {
93          return getPersistence().update(journalArticleResource, merge);
94      }
95  
96      public static void cacheResult(
97          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
98          getPersistence().cacheResult(journalArticleResource);
99      }
100 
101     public static void cacheResult(
102         java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources) {
103         getPersistence().cacheResult(journalArticleResources);
104     }
105 
106     public static com.liferay.portlet.journal.model.JournalArticleResource create(
107         long resourcePrimKey) {
108         return getPersistence().create(resourcePrimKey);
109     }
110 
111     public static com.liferay.portlet.journal.model.JournalArticleResource remove(
112         long resourcePrimKey)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.journal.NoSuchArticleResourceException {
115         return getPersistence().remove(resourcePrimKey);
116     }
117 
118     /**
119      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
120      */
121     public static com.liferay.portlet.journal.model.JournalArticleResource update(
122         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().update(journalArticleResource);
125     }
126 
127     public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
128         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
129         boolean merge) throws com.liferay.portal.SystemException {
130         return getPersistence().updateImpl(journalArticleResource, merge);
131     }
132 
133     public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
134         long resourcePrimKey)
135         throws com.liferay.portal.SystemException,
136             com.liferay.portlet.journal.NoSuchArticleResourceException {
137         return getPersistence().findByPrimaryKey(resourcePrimKey);
138     }
139 
140     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
141         long resourcePrimKey) throws com.liferay.portal.SystemException {
142         return getPersistence().fetchByPrimaryKey(resourcePrimKey);
143     }
144 
145     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
146         long groupId) throws com.liferay.portal.SystemException {
147         return getPersistence().findByGroupId(groupId);
148     }
149 
150     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
151         long groupId, int start, int end)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().findByGroupId(groupId, start, end);
154     }
155 
156     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
157         long groupId, int start, int end,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.SystemException {
160         return getPersistence()
161                    .findByGroupId(groupId, start, end, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
165         long groupId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.SystemException,
168             com.liferay.portlet.journal.NoSuchArticleResourceException {
169         return getPersistence().findByGroupId_First(groupId, orderByComparator);
170     }
171 
172     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
173         long groupId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.journal.NoSuchArticleResourceException {
177         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
178     }
179 
180     public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
181         long resourcePrimKey, long groupId,
182         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.journal.NoSuchArticleResourceException {
185         return getPersistence()
186                    .findByGroupId_PrevAndNext(resourcePrimKey, groupId,
187             orderByComparator);
188     }
189 
190     public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
191         long groupId, java.lang.String articleId)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.journal.NoSuchArticleResourceException {
194         return getPersistence().findByG_A(groupId, articleId);
195     }
196 
197     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
198         long groupId, java.lang.String articleId)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().fetchByG_A(groupId, articleId);
201     }
202 
203     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
204         long groupId, java.lang.String articleId, boolean retrieveFromCache)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
207     }
208 
209     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
210         throws com.liferay.portal.SystemException {
211         return getPersistence().findAll();
212     }
213 
214     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
215         int start, int end) throws com.liferay.portal.SystemException {
216         return getPersistence().findAll(start, end);
217     }
218 
219     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
220         int start, int end,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.SystemException {
223         return getPersistence().findAll(start, end, orderByComparator);
224     }
225 
226     public static void removeByGroupId(long groupId)
227         throws com.liferay.portal.SystemException {
228         getPersistence().removeByGroupId(groupId);
229     }
230 
231     public static void removeByG_A(long groupId, java.lang.String articleId)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.journal.NoSuchArticleResourceException {
234         getPersistence().removeByG_A(groupId, articleId);
235     }
236 
237     public static void removeAll() throws com.liferay.portal.SystemException {
238         getPersistence().removeAll();
239     }
240 
241     public static int countByGroupId(long groupId)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().countByGroupId(groupId);
244     }
245 
246     public static int countByG_A(long groupId, java.lang.String articleId)
247         throws com.liferay.portal.SystemException {
248         return getPersistence().countByG_A(groupId, articleId);
249     }
250 
251     public static int countAll() throws com.liferay.portal.SystemException {
252         return getPersistence().countAll();
253     }
254 
255     public static JournalArticleResourcePersistence getPersistence() {
256         if (_persistence == null) {
257             _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
258 
259             ReferenceRegistry.registerReference(JournalArticleResourceUtil.class,
260                 "_persistence");
261         }
262 
263         return _persistence;
264     }
265 
266     public void setPersistence(JournalArticleResourcePersistence persistence) {
267         _persistence = persistence;
268 
269         ReferenceRegistry.registerReference(JournalArticleResourceUtil.class,
270             "_persistence");
271     }
272 
273     private static JournalArticleResourcePersistence _persistence;
274 }