1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.journal.service.persistence;
21  
22  /**
23   * <a href="JournalArticleImageUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class JournalArticleImageUtil {
29      public static com.liferay.portlet.journal.model.JournalArticleImage create(
30          long articleImageId) {
31          return getPersistence().create(articleImageId);
32      }
33  
34      public static com.liferay.portlet.journal.model.JournalArticleImage remove(
35          long articleImageId)
36          throws com.liferay.portal.SystemException,
37              com.liferay.portlet.journal.NoSuchArticleImageException {
38          return getPersistence().remove(articleImageId);
39      }
40  
41      public static com.liferay.portlet.journal.model.JournalArticleImage remove(
42          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(journalArticleImage);
45      }
46  
47      /**
48       * @deprecated Use <code>update(JournalArticleImage journalArticleImage, boolean merge)</code>.
49       */
50      public static com.liferay.portlet.journal.model.JournalArticleImage update(
51          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(journalArticleImage);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        journalArticleImage the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when journalArticleImage is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portlet.journal.model.JournalArticleImage update(
70          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
71          boolean merge) throws com.liferay.portal.SystemException {
72          return getPersistence().update(journalArticleImage, merge);
73      }
74  
75      public static com.liferay.portlet.journal.model.JournalArticleImage updateImpl(
76          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
77          boolean merge) throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(journalArticleImage, merge);
79      }
80  
81      public static com.liferay.portlet.journal.model.JournalArticleImage findByPrimaryKey(
82          long articleImageId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.journal.NoSuchArticleImageException {
85          return getPersistence().findByPrimaryKey(articleImageId);
86      }
87  
88      public static com.liferay.portlet.journal.model.JournalArticleImage fetchByPrimaryKey(
89          long articleImageId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(articleImageId);
91      }
92  
93      public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
94          long groupId) throws com.liferay.portal.SystemException {
95          return getPersistence().findByGroupId(groupId);
96      }
97  
98      public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
99          long groupId, int start, int end)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().findByGroupId(groupId, start, end);
102     }
103 
104     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
105         long groupId, int start, int end,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().findByGroupId(groupId, start, end, obc);
109     }
110 
111     public static com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_First(
112         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.journal.NoSuchArticleImageException {
115         return getPersistence().findByGroupId_First(groupId, obc);
116     }
117 
118     public static com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_Last(
119         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.journal.NoSuchArticleImageException {
122         return getPersistence().findByGroupId_Last(groupId, obc);
123     }
124 
125     public static com.liferay.portlet.journal.model.JournalArticleImage[] findByGroupId_PrevAndNext(
126         long articleImageId, long groupId,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.journal.NoSuchArticleImageException {
130         return getPersistence()
131                    .findByGroupId_PrevAndNext(articleImageId, groupId, obc);
132     }
133 
134     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
135         boolean tempImage) throws com.liferay.portal.SystemException {
136         return getPersistence().findByTempImage(tempImage);
137     }
138 
139     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
140         boolean tempImage, int start, int end)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByTempImage(tempImage, start, end);
143     }
144 
145     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
146         boolean tempImage, int start, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException {
149         return getPersistence().findByTempImage(tempImage, start, end, obc);
150     }
151 
152     public static com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_First(
153         boolean tempImage, com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.journal.NoSuchArticleImageException {
156         return getPersistence().findByTempImage_First(tempImage, obc);
157     }
158 
159     public static com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_Last(
160         boolean tempImage, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException,
162             com.liferay.portlet.journal.NoSuchArticleImageException {
163         return getPersistence().findByTempImage_Last(tempImage, obc);
164     }
165 
166     public static com.liferay.portlet.journal.model.JournalArticleImage[] findByTempImage_PrevAndNext(
167         long articleImageId, boolean tempImage,
168         com.liferay.portal.kernel.util.OrderByComparator obc)
169         throws com.liferay.portal.SystemException,
170             com.liferay.portlet.journal.NoSuchArticleImageException {
171         return getPersistence()
172                    .findByTempImage_PrevAndNext(articleImageId, tempImage, obc);
173     }
174 
175     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
176         long groupId, java.lang.String articleId, double version)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().findByG_A_V(groupId, articleId, version);
179     }
180 
181     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
182         long groupId, java.lang.String articleId, double version, int start,
183         int end) throws com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByG_A_V(groupId, articleId, version, start, end);
186     }
187 
188     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
189         long groupId, java.lang.String articleId, double version, int start,
190         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException {
192         return getPersistence()
193                    .findByG_A_V(groupId, articleId, version, start, end, obc);
194     }
195 
196     public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_First(
197         long groupId, java.lang.String articleId, double version,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.SystemException,
200             com.liferay.portlet.journal.NoSuchArticleImageException {
201         return getPersistence()
202                    .findByG_A_V_First(groupId, articleId, version, obc);
203     }
204 
205     public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_Last(
206         long groupId, java.lang.String articleId, double version,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.journal.NoSuchArticleImageException {
210         return getPersistence()
211                    .findByG_A_V_Last(groupId, articleId, version, obc);
212     }
213 
214     public static com.liferay.portlet.journal.model.JournalArticleImage[] findByG_A_V_PrevAndNext(
215         long articleImageId, long groupId, java.lang.String articleId,
216         double version, com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException,
218             com.liferay.portlet.journal.NoSuchArticleImageException {
219         return getPersistence()
220                    .findByG_A_V_PrevAndNext(articleImageId, groupId, articleId,
221             version, obc);
222     }
223 
224     public static com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_E_L(
225         long groupId, java.lang.String articleId, double version,
226         java.lang.String elName, java.lang.String languageId)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.journal.NoSuchArticleImageException {
229         return getPersistence()
230                    .findByG_A_V_E_L(groupId, articleId, version, elName,
231             languageId);
232     }
233 
234     public static com.liferay.portlet.journal.model.JournalArticleImage fetchByG_A_V_E_L(
235         long groupId, java.lang.String articleId, double version,
236         java.lang.String elName, java.lang.String languageId)
237         throws com.liferay.portal.SystemException {
238         return getPersistence()
239                    .fetchByG_A_V_E_L(groupId, articleId, version, elName,
240             languageId);
241     }
242 
243     public static java.util.List<Object> findWithDynamicQuery(
244         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findWithDynamicQuery(dynamicQuery);
247     }
248 
249     public static java.util.List<Object> findWithDynamicQuery(
250         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
251         int end) throws com.liferay.portal.SystemException {
252         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
253     }
254 
255     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll()
256         throws com.liferay.portal.SystemException {
257         return getPersistence().findAll();
258     }
259 
260     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
261         int start, int end) throws com.liferay.portal.SystemException {
262         return getPersistence().findAll(start, end);
263     }
264 
265     public static java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
266         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().findAll(start, end, obc);
269     }
270 
271     public static void removeByGroupId(long groupId)
272         throws com.liferay.portal.SystemException {
273         getPersistence().removeByGroupId(groupId);
274     }
275 
276     public static void removeByTempImage(boolean tempImage)
277         throws com.liferay.portal.SystemException {
278         getPersistence().removeByTempImage(tempImage);
279     }
280 
281     public static void removeByG_A_V(long groupId, java.lang.String articleId,
282         double version) throws com.liferay.portal.SystemException {
283         getPersistence().removeByG_A_V(groupId, articleId, version);
284     }
285 
286     public static void removeByG_A_V_E_L(long groupId,
287         java.lang.String articleId, double version, java.lang.String elName,
288         java.lang.String languageId)
289         throws com.liferay.portal.SystemException,
290             com.liferay.portlet.journal.NoSuchArticleImageException {
291         getPersistence()
292             .removeByG_A_V_E_L(groupId, articleId, version, elName, languageId);
293     }
294 
295     public static void removeAll() throws com.liferay.portal.SystemException {
296         getPersistence().removeAll();
297     }
298 
299     public static int countByGroupId(long groupId)
300         throws com.liferay.portal.SystemException {
301         return getPersistence().countByGroupId(groupId);
302     }
303 
304     public static int countByTempImage(boolean tempImage)
305         throws com.liferay.portal.SystemException {
306         return getPersistence().countByTempImage(tempImage);
307     }
308 
309     public static int countByG_A_V(long groupId, java.lang.String articleId,
310         double version) throws com.liferay.portal.SystemException {
311         return getPersistence().countByG_A_V(groupId, articleId, version);
312     }
313 
314     public static int countByG_A_V_E_L(long groupId,
315         java.lang.String articleId, double version, java.lang.String elName,
316         java.lang.String languageId) throws com.liferay.portal.SystemException {
317         return getPersistence()
318                    .countByG_A_V_E_L(groupId, articleId, version, elName,
319             languageId);
320     }
321 
322     public static int countAll() throws com.liferay.portal.SystemException {
323         return getPersistence().countAll();
324     }
325 
326     public static JournalArticleImagePersistence getPersistence() {
327         return _persistence;
328     }
329 
330     public void setPersistence(JournalArticleImagePersistence persistence) {
331         _persistence = persistence;
332     }
333 
334     private static JournalArticleImagePersistence _persistence;
335 }