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  
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.SystemException,
98              com.liferay.portlet.journal.NoSuchArticleResourceException {
99          return getPersistence().remove(resourcePrimKey);
100     }
101 
102     /**
103      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
104      */
105     public static com.liferay.portlet.journal.model.JournalArticleResource update(
106         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().update(journalArticleResource);
109     }
110 
111     public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
112         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
113         boolean merge) throws com.liferay.portal.SystemException {
114         return getPersistence().updateImpl(journalArticleResource, merge);
115     }
116 
117     public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
118         long resourcePrimKey)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.journal.NoSuchArticleResourceException {
121         return getPersistence().findByPrimaryKey(resourcePrimKey);
122     }
123 
124     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
125         long resourcePrimKey) throws com.liferay.portal.SystemException {
126         return getPersistence().fetchByPrimaryKey(resourcePrimKey);
127     }
128 
129     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
130         long groupId) throws com.liferay.portal.SystemException {
131         return getPersistence().findByGroupId(groupId);
132     }
133 
134     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
135         long groupId, int start, int end)
136         throws com.liferay.portal.SystemException {
137         return getPersistence().findByGroupId(groupId, start, end);
138     }
139 
140     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
141         long groupId, int start, int end,
142         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143         throws com.liferay.portal.SystemException {
144         return getPersistence()
145                    .findByGroupId(groupId, start, end, orderByComparator);
146     }
147 
148     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
149         long groupId,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.journal.NoSuchArticleResourceException {
153         return getPersistence().findByGroupId_First(groupId, orderByComparator);
154     }
155 
156     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
157         long groupId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.SystemException,
160             com.liferay.portlet.journal.NoSuchArticleResourceException {
161         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
165         long resourcePrimKey, 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()
170                    .findByGroupId_PrevAndNext(resourcePrimKey, groupId,
171             orderByComparator);
172     }
173 
174     public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
175         long groupId, java.lang.String articleId)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.journal.NoSuchArticleResourceException {
178         return getPersistence().findByG_A(groupId, articleId);
179     }
180 
181     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
182         long groupId, java.lang.String articleId)
183         throws com.liferay.portal.SystemException {
184         return getPersistence().fetchByG_A(groupId, articleId);
185     }
186 
187     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
188         long groupId, java.lang.String articleId, boolean retrieveFromCache)
189         throws com.liferay.portal.SystemException {
190         return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
191     }
192 
193     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findAll();
196     }
197 
198     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
199         int start, int end) throws com.liferay.portal.SystemException {
200         return getPersistence().findAll(start, end);
201     }
202 
203     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
204         int start, int end,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findAll(start, end, orderByComparator);
208     }
209 
210     public static void removeByGroupId(long groupId)
211         throws com.liferay.portal.SystemException {
212         getPersistence().removeByGroupId(groupId);
213     }
214 
215     public static void removeByG_A(long groupId, java.lang.String articleId)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.journal.NoSuchArticleResourceException {
218         getPersistence().removeByG_A(groupId, articleId);
219     }
220 
221     public static void removeAll() throws com.liferay.portal.SystemException {
222         getPersistence().removeAll();
223     }
224 
225     public static int countByGroupId(long groupId)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().countByGroupId(groupId);
228     }
229 
230     public static int countByG_A(long groupId, java.lang.String articleId)
231         throws com.liferay.portal.SystemException {
232         return getPersistence().countByG_A(groupId, articleId);
233     }
234 
235     public static int countAll() throws com.liferay.portal.SystemException {
236         return getPersistence().countAll();
237     }
238 
239     public static JournalArticleResourcePersistence getPersistence() {
240         if (_persistence == null) {
241             _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
242         }
243 
244         return _persistence;
245     }
246 
247     public void setPersistence(JournalArticleResourcePersistence persistence) {
248         _persistence = persistence;
249     }
250 
251     private static JournalArticleResourcePersistence _persistence;
252 }