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 obc)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().findByGroupId(groupId, start, end, obc);
145     }
146 
147     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
148         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.journal.NoSuchArticleResourceException {
151         return getPersistence().findByGroupId_First(groupId, obc);
152     }
153 
154     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
155         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.journal.NoSuchArticleResourceException {
158         return getPersistence().findByGroupId_Last(groupId, obc);
159     }
160 
161     public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
162         long resourcePrimKey, long groupId,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.journal.NoSuchArticleResourceException {
166         return getPersistence()
167                    .findByGroupId_PrevAndNext(resourcePrimKey, groupId, obc);
168     }
169 
170     public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
171         long groupId, java.lang.String articleId)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.journal.NoSuchArticleResourceException {
174         return getPersistence().findByG_A(groupId, articleId);
175     }
176 
177     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
178         long groupId, java.lang.String articleId)
179         throws com.liferay.portal.SystemException {
180         return getPersistence().fetchByG_A(groupId, articleId);
181     }
182 
183     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
184         long groupId, java.lang.String articleId, boolean retrieveFromCache)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
187     }
188 
189     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
190         throws com.liferay.portal.SystemException {
191         return getPersistence().findAll();
192     }
193 
194     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
195         int start, int end) throws com.liferay.portal.SystemException {
196         return getPersistence().findAll(start, end);
197     }
198 
199     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
200         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findAll(start, end, obc);
203     }
204 
205     public static void removeByGroupId(long groupId)
206         throws com.liferay.portal.SystemException {
207         getPersistence().removeByGroupId(groupId);
208     }
209 
210     public static void removeByG_A(long groupId, java.lang.String articleId)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.journal.NoSuchArticleResourceException {
213         getPersistence().removeByG_A(groupId, articleId);
214     }
215 
216     public static void removeAll() throws com.liferay.portal.SystemException {
217         getPersistence().removeAll();
218     }
219 
220     public static int countByGroupId(long groupId)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().countByGroupId(groupId);
223     }
224 
225     public static int countByG_A(long groupId, java.lang.String articleId)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().countByG_A(groupId, articleId);
228     }
229 
230     public static int countAll() throws com.liferay.portal.SystemException {
231         return getPersistence().countAll();
232     }
233 
234     public static JournalArticleResourcePersistence getPersistence() {
235         if (_persistence == null) {
236             _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
237         }
238 
239         return _persistence;
240     }
241 
242     public void setPersistence(JournalArticleResourcePersistence persistence) {
243         _persistence = persistence;
244     }
245 
246     private static JournalArticleResourcePersistence _persistence;
247 }