1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  /**
26   * <a href="JournalArticleResourceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class JournalArticleResourceUtil {
32      public static com.liferay.portlet.journal.model.JournalArticleResource create(
33          long resourcePrimKey) {
34          return getPersistence().create(resourcePrimKey);
35      }
36  
37      public static com.liferay.portlet.journal.model.JournalArticleResource remove(
38          long resourcePrimKey)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.journal.NoSuchArticleResourceException {
41          return getPersistence().remove(resourcePrimKey);
42      }
43  
44      public static com.liferay.portlet.journal.model.JournalArticleResource remove(
45          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(journalArticleResource);
48      }
49  
50      public static com.liferay.portlet.journal.model.JournalArticleResource update(
51          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(journalArticleResource);
54      }
55  
56      public static com.liferay.portlet.journal.model.JournalArticleResource update(
57          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(journalArticleResource, merge);
60      }
61  
62      public static com.liferay.portlet.journal.model.JournalArticleResource updateImpl(
63          com.liferay.portlet.journal.model.JournalArticleResource journalArticleResource,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(journalArticleResource, merge);
66      }
67  
68      public static com.liferay.portlet.journal.model.JournalArticleResource findByPrimaryKey(
69          long resourcePrimKey)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.journal.NoSuchArticleResourceException {
72          return getPersistence().findByPrimaryKey(resourcePrimKey);
73      }
74  
75      public static com.liferay.portlet.journal.model.JournalArticleResource fetchByPrimaryKey(
76          long resourcePrimKey) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(resourcePrimKey);
78      }
79  
80      public static java.util.List findByGroupId(long groupId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByGroupId(groupId);
83      }
84  
85      public static java.util.List findByGroupId(long groupId, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByGroupId(groupId, begin, end);
88      }
89  
90      public static java.util.List findByGroupId(long groupId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByGroupId(groupId, begin, end, obc);
94      }
95  
96      public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_First(
97          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portlet.journal.NoSuchArticleResourceException {
100         return getPersistence().findByGroupId_First(groupId, obc);
101     }
102 
103     public static com.liferay.portlet.journal.model.JournalArticleResource findByGroupId_Last(
104         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portlet.journal.NoSuchArticleResourceException {
107         return getPersistence().findByGroupId_Last(groupId, obc);
108     }
109 
110     public static com.liferay.portlet.journal.model.JournalArticleResource[] findByGroupId_PrevAndNext(
111         long resourcePrimKey, long groupId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portlet.journal.NoSuchArticleResourceException {
115         return getPersistence().findByGroupId_PrevAndNext(resourcePrimKey,
116             groupId, obc);
117     }
118 
119     public static com.liferay.portlet.journal.model.JournalArticleResource findByG_A(
120         long groupId, java.lang.String articleId)
121         throws com.liferay.portal.SystemException, 
122             com.liferay.portlet.journal.NoSuchArticleResourceException {
123         return getPersistence().findByG_A(groupId, articleId);
124     }
125 
126     public static com.liferay.portlet.journal.model.JournalArticleResource fetchByG_A(
127         long groupId, java.lang.String articleId)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().fetchByG_A(groupId, articleId);
130     }
131 
132     public static java.util.List findWithDynamicQuery(
133         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findWithDynamicQuery(queryInitializer);
136     }
137 
138     public static java.util.List findWithDynamicQuery(
139         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
140         int begin, int end) throws com.liferay.portal.SystemException {
141         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
142             end);
143     }
144 
145     public static java.util.List findAll()
146         throws com.liferay.portal.SystemException {
147         return getPersistence().findAll();
148     }
149 
150     public static java.util.List findAll(int begin, int end)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findAll(begin, end);
153     }
154 
155     public static java.util.List findAll(int begin, int end,
156         com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().findAll(begin, end, obc);
159     }
160 
161     public static void removeByGroupId(long groupId)
162         throws com.liferay.portal.SystemException {
163         getPersistence().removeByGroupId(groupId);
164     }
165 
166     public static void removeByG_A(long groupId, java.lang.String articleId)
167         throws com.liferay.portal.SystemException, 
168             com.liferay.portlet.journal.NoSuchArticleResourceException {
169         getPersistence().removeByG_A(groupId, articleId);
170     }
171 
172     public static void removeAll() throws com.liferay.portal.SystemException {
173         getPersistence().removeAll();
174     }
175 
176     public static int countByGroupId(long groupId)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().countByGroupId(groupId);
179     }
180 
181     public static int countByG_A(long groupId, java.lang.String articleId)
182         throws com.liferay.portal.SystemException {
183         return getPersistence().countByG_A(groupId, articleId);
184     }
185 
186     public static int countAll() throws com.liferay.portal.SystemException {
187         return getPersistence().countAll();
188     }
189 
190     public static JournalArticleResourcePersistence getPersistence() {
191         return _getUtil()._persistence;
192     }
193 
194     public void setPersistence(JournalArticleResourcePersistence persistence) {
195         _persistence = persistence;
196     }
197 
198     private static JournalArticleResourceUtil _getUtil() {
199         if (_util == null) {
200             _util = (JournalArticleResourceUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
201         }
202 
203         return _util;
204     }
205 
206     private static final String _UTIL = JournalArticleResourceUtil.class.getName();
207     private static JournalArticleResourceUtil _util;
208     private JournalArticleResourcePersistence _persistence;
209 }