1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  
29  import com.liferay.portlet.journal.model.JournalArticleResource;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="JournalArticleResourceUtil.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * @author    Brian Wing Shun Chan
42   * @see       JournalArticleResourcePersistence
43   * @see       JournalArticleResourcePersistenceImpl
44   * @generated
45   */
46  public class JournalArticleResourceUtil {
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
49       */
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66          int start, int end) throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
72       */
73      public static JournalArticleResource remove(
74          JournalArticleResource journalArticleResource)
75          throws SystemException {
76          return getPersistence().remove(journalArticleResource);
77      }
78  
79      /**
80       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
81       */
82      public static JournalArticleResource update(
83          JournalArticleResource journalArticleResource, boolean merge)
84          throws SystemException {
85          return getPersistence().update(journalArticleResource, merge);
86      }
87  
88      public static void cacheResult(
89          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource) {
90          getPersistence().cacheResult(journalArticleResource);
91      }
92  
93      public static void cacheResult(
94          java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> journalArticleResources) {
95          getPersistence().cacheResult(journalArticleResources);
96      }
97  
98      public static com.liferay.portlet.journal.model.JournalArticleResource create(
99          long resourcePrimKey) {
100         return getPersistence().create(resourcePrimKey);
101     }
102 
103     public static com.liferay.portlet.journal.model.JournalArticleResource remove(
104         long resourcePrimKey)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.journal.NoSuchArticleResourceException {
107         return getPersistence().remove(resourcePrimKey);
108     }
109 
110     /**
111      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
112      */
113     public static com.liferay.portlet.journal.model.JournalArticleResource update(
114         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
115         throws com.liferay.portal.SystemException {
116         return getPersistence().update(journalArticleResource);
117     }
118 
119     public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
120         com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
121         boolean merge) throws com.liferay.portal.SystemException {
122         return getPersistence().updateImpl(journalArticleResource, merge);
123     }
124 
125     public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
126         long resourcePrimKey)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.journal.NoSuchArticleResourceException {
129         return getPersistence().findByPrimaryKey(resourcePrimKey);
130     }
131 
132     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
133         long resourcePrimKey) throws com.liferay.portal.SystemException {
134         return getPersistence().fetchByPrimaryKey(resourcePrimKey);
135     }
136 
137     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
138         long groupId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByGroupId(groupId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
143         long groupId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByGroupId(groupId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findByGroupId(
149         long groupId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByGroupId(groupId, start, end, obc);
153     }
154 
155     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
156         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.journal.NoSuchArticleResourceException {
159         return getPersistence().findByGroupId_First(groupId, obc);
160     }
161 
162     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
163         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.journal.NoSuchArticleResourceException {
166         return getPersistence().findByGroupId_Last(groupId, obc);
167     }
168 
169     public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
170         long resourcePrimKey, long groupId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.journal.NoSuchArticleResourceException {
174         return getPersistence()
175                    .findByGroupId_PrevAndNext(resourcePrimKey, groupId, obc);
176     }
177 
178     public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
179         long groupId, java.lang.String articleId)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.journal.NoSuchArticleResourceException {
182         return getPersistence().findByG_A(groupId, articleId);
183     }
184 
185     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
186         long groupId, java.lang.String articleId)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().fetchByG_A(groupId, articleId);
189     }
190 
191     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
192         long groupId, java.lang.String articleId, boolean retrieveFromCache)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().fetchByG_A(groupId, articleId, retrieveFromCache);
195     }
196 
197     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll()
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findAll();
200     }
201 
202     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
203         int start, int end) throws com.liferay.portal.SystemException {
204         return getPersistence().findAll(start, end);
205     }
206 
207     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleResource> findAll(
208         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException {
210         return getPersistence().findAll(start, end, obc);
211     }
212 
213     public static void removeByGroupId(long groupId)
214         throws com.liferay.portal.SystemException {
215         getPersistence().removeByGroupId(groupId);
216     }
217 
218     public static void removeByG_A(long groupId, java.lang.String articleId)
219         throws com.liferay.portal.SystemException,
220             com.liferay.portlet.journal.NoSuchArticleResourceException {
221         getPersistence().removeByG_A(groupId, articleId);
222     }
223 
224     public static void removeAll() throws com.liferay.portal.SystemException {
225         getPersistence().removeAll();
226     }
227 
228     public static int countByGroupId(long groupId)
229         throws com.liferay.portal.SystemException {
230         return getPersistence().countByGroupId(groupId);
231     }
232 
233     public static int countByG_A(long groupId, java.lang.String articleId)
234         throws com.liferay.portal.SystemException {
235         return getPersistence().countByG_A(groupId, articleId);
236     }
237 
238     public static int countAll() throws com.liferay.portal.SystemException {
239         return getPersistence().countAll();
240     }
241 
242     public static JournalArticleResourcePersistence getPersistence() {
243         if (_persistence == null) {
244             _persistence = (JournalArticleResourcePersistence)PortalBeanLocatorUtil.locate(JournalArticleResourcePersistence.class.getName());
245         }
246 
247         return _persistence;
248     }
249 
250     public void setPersistence(JournalArticleResourcePersistence persistence) {
251         _persistence = persistence;
252     }
253 
254     private static JournalArticleResourcePersistence _persistence;
255 }