1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.journal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.journal.model.JournalArticleResource;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="JournalArticleResourceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       JournalArticleResourcePersistence
35   * @see       JournalArticleResourcePersistenceImpl
36   * @generated
37   */
38  public class JournalArticleResourceUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58          int start, int end) throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static JournalArticleResource remove(
66          JournalArticleResource journalArticleResource)
67          throws SystemException {
68          return getPersistence().remove(journalArticleResource);
69      }
70  
71      /**
72       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
73       */
74      public static JournalArticleResource update(
75          JournalArticleResource journalArticleResource, boolean merge)
76          throws SystemException {
77          return getPersistence().update(journalArticleResource, merge);
78      }
79  
80      public static void cacheResult(
81          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
82          getPersistence().cacheResult(journalArticleResource);
83      }
84  
85      public static void cacheResult(
86          java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources) {
87          getPersistence().cacheResult(journalArticleResources);
88      }
89  
90      public static com.liferay.portlet.journal.model.JournalArticleResource create(
91          long resourcePrimKey) {
92          return getPersistence().create(resourcePrimKey);
93      }
94  
95      public static com.liferay.portlet.journal.model.JournalArticleResource remove(
96          long resourcePrimKey)
97          throws com.liferay.portal.kernel.exception.SystemException,
98              com.liferay.portlet.journal.NoSuchArticleResourceException {
99          return getPersistence().remove(resourcePrimKey);
100     }
101 
102     public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
103         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
104         boolean merge)
105         throws com.liferay.portal.kernel.exception.SystemException {
106         return getPersistence().updateImpl(journalArticleResource, merge);
107     }
108 
109     public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
110         long resourcePrimKey)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.journal.NoSuchArticleResourceException {
113         return getPersistence().findByPrimaryKey(resourcePrimKey);
114     }
115 
116     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
117         long resourcePrimKey)
118         throws com.liferay.portal.kernel.exception.SystemException {
119         return getPersistence().fetchByPrimaryKey(resourcePrimKey);
120     }
121 
122     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
123         long groupId)
124         throws com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByGroupId(groupId);
126     }
127 
128     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
129         long groupId, int start, int end)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().findByGroupId(groupId, start, end);
132     }
133 
134     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
135         long groupId, int start, int end,
136         com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.kernel.exception.SystemException {
138         return getPersistence().findByGroupId(groupId, start, end, obc);
139     }
140 
141     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
142         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.kernel.exception.SystemException,
144             com.liferay.portlet.journal.NoSuchArticleResourceException {
145         return getPersistence().findByGroupId_First(groupId, obc);
146     }
147 
148     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
149         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.kernel.exception.SystemException,
151             com.liferay.portlet.journal.NoSuchArticleResourceException {
152         return getPersistence().findByGroupId_Last(groupId, obc);
153     }
154 
155     public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
156         long resourcePrimKey, long groupId,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.kernel.exception.SystemException,
159             com.liferay.portlet.journal.NoSuchArticleResourceException {
160         return getPersistence()
161                    .findByGroupId_PrevAndNext(resourcePrimKey, groupId, obc);
162     }
163 
164     public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
165         long groupId, java.lang.String articleId)
166         throws com.liferay.portal.kernel.exception.SystemException,
167             com.liferay.portlet.journal.NoSuchArticleResourceException {
168         return getPersistence().findByG_A(groupId, articleId);
169     }
170 
171     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
172         long groupId, java.lang.String articleId)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence().fetchByG_A(groupId, articleId);
175     }
176 
177     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
178         long groupId, java.lang.String articleId, boolean retrieveFromCache)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
181     }
182 
183     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findAll();
186     }
187 
188     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
189         int start, int end)
190         throws com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence().findAll(start, end);
192     }
193 
194     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
195         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.kernel.exception.SystemException {
197         return getPersistence().findAll(start, end, obc);
198     }
199 
200     public static void removeByGroupId(long groupId)
201         throws com.liferay.portal.kernel.exception.SystemException {
202         getPersistence().removeByGroupId(groupId);
203     }
204 
205     public static void removeByG_A(long groupId, java.lang.String articleId)
206         throws com.liferay.portal.kernel.exception.SystemException,
207             com.liferay.portlet.journal.NoSuchArticleResourceException {
208         getPersistence().removeByG_A(groupId, articleId);
209     }
210 
211     public static void removeAll()
212         throws com.liferay.portal.kernel.exception.SystemException {
213         getPersistence().removeAll();
214     }
215 
216     public static int countByGroupId(long groupId)
217         throws com.liferay.portal.kernel.exception.SystemException {
218         return getPersistence().countByGroupId(groupId);
219     }
220 
221     public static int countByG_A(long groupId, java.lang.String articleId)
222         throws com.liferay.portal.kernel.exception.SystemException {
223         return getPersistence().countByG_A(groupId, articleId);
224     }
225 
226     public static int countAll()
227         throws com.liferay.portal.kernel.exception.SystemException {
228         return getPersistence().countAll();
229     }
230 
231     public static JournalArticleResourcePersistence getPersistence() {
232         if (_persistence == null) {
233             _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
234         }
235 
236         return _persistence;
237     }
238 
239     public void setPersistence(JournalArticleResourcePersistence persistence) {
240         _persistence = persistence;
241     }
242 
243     private static JournalArticleResourcePersistence _persistence;
244 }