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  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="JournalArticleImagePersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface JournalArticleImagePersistence {
39      public com.liferay.portlet.journal.model.JournalArticleImage create(
40          long articleImageId);
41  
42      public com.liferay.portlet.journal.model.JournalArticleImage remove(
43          long articleImageId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.journal.NoSuchArticleImageException;
46  
47      public com.liferay.portlet.journal.model.JournalArticleImage remove(
48          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(JournalArticleImage journalArticleImage, boolean merge)</code>.
53       */
54      public com.liferay.portlet.journal.model.JournalArticleImage update(
55          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        journalArticleImage the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when journalArticleImage is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portlet.journal.model.JournalArticleImage update(
72          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.journal.model.JournalArticleImage updateImpl(
76          com.liferay.portlet.journal.model.JournalArticleImage journalArticleImage,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portlet.journal.model.JournalArticleImage findByPrimaryKey(
81          long articleImageId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.journal.NoSuchArticleImageException;
84  
85      public com.liferay.portlet.journal.model.JournalArticleImage fetchByPrimaryKey(
86          long articleImageId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
90          long groupId) throws com.liferay.portal.SystemException;
91  
92      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93      public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
94          long groupId, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98      public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByGroupId(
99          long groupId, int start, int end,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException;
102 
103     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104     public com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_First(
105         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.journal.NoSuchArticleImageException;
108 
109     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
110     public com.liferay.portlet.journal.model.JournalArticleImage findByGroupId_Last(
111         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.journal.NoSuchArticleImageException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public com.liferay.portlet.journal.model.JournalArticleImage[] findByGroupId_PrevAndNext(
117         long articleImageId, long groupId,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.journal.NoSuchArticleImageException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
124         boolean tempImage) throws com.liferay.portal.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
128         boolean tempImage, int start, int end)
129         throws com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByTempImage(
133         boolean tempImage, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_First(
139         boolean tempImage, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.journal.NoSuchArticleImageException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public com.liferay.portlet.journal.model.JournalArticleImage findByTempImage_Last(
145         boolean tempImage, com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.journal.NoSuchArticleImageException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public com.liferay.portlet.journal.model.JournalArticleImage[] findByTempImage_PrevAndNext(
151         long articleImageId, boolean tempImage,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.journal.NoSuchArticleImageException;
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
158         long groupId, java.lang.String articleId, double version)
159         throws com.liferay.portal.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
163         long groupId, java.lang.String articleId, double version, int start,
164         int end) throws com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findByG_A_V(
168         long groupId, java.lang.String articleId, double version, int start,
169         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_First(
174         long groupId, java.lang.String articleId, double version,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.journal.NoSuchArticleImageException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_Last(
181         long groupId, java.lang.String articleId, double version,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.journal.NoSuchArticleImageException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public com.liferay.portlet.journal.model.JournalArticleImage[] findByG_A_V_PrevAndNext(
188         long articleImageId, long groupId, java.lang.String articleId,
189         double version, com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.journal.NoSuchArticleImageException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public com.liferay.portlet.journal.model.JournalArticleImage findByG_A_V_E_L(
195         long groupId, java.lang.String articleId, double version,
196         java.lang.String elName, java.lang.String languageId)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.journal.NoSuchArticleImageException;
199 
200     public com.liferay.portlet.journal.model.JournalArticleImage fetchByG_A_V_E_L(
201         long groupId, java.lang.String articleId, double version,
202         java.lang.String elName, java.lang.String languageId)
203         throws com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public java.util.List<Object> findWithDynamicQuery(
207         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
208         throws com.liferay.portal.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public java.util.List<Object> findWithDynamicQuery(
212         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
213         int end) throws com.liferay.portal.SystemException;
214 
215     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll()
217         throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
221         int start, int end) throws com.liferay.portal.SystemException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public java.util.List<com.liferay.portlet.journal.model.JournalArticleImage> findAll(
225         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException;
227 
228     public void removeByGroupId(long groupId)
229         throws com.liferay.portal.SystemException;
230 
231     public void removeByTempImage(boolean tempImage)
232         throws com.liferay.portal.SystemException;
233 
234     public void removeByG_A_V(long groupId, java.lang.String articleId,
235         double version) throws com.liferay.portal.SystemException;
236 
237     public void removeByG_A_V_E_L(long groupId, java.lang.String articleId,
238         double version, java.lang.String elName, java.lang.String languageId)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.journal.NoSuchArticleImageException;
241 
242     public void removeAll() throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public int countByGroupId(long groupId)
246         throws com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public int countByTempImage(boolean tempImage)
250         throws com.liferay.portal.SystemException;
251 
252     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253     public int countByG_A_V(long groupId, java.lang.String articleId,
254         double version) throws com.liferay.portal.SystemException;
255 
256     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257     public int countByG_A_V_E_L(long groupId, java.lang.String articleId,
258         double version, java.lang.String elName, java.lang.String languageId)
259         throws com.liferay.portal.SystemException;
260 
261     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262     public int countAll() throws com.liferay.portal.SystemException;
263 
264     public void registerListener(
265         com.liferay.portal.model.ModelListener listener);
266 
267     public void unregisterListener(
268         com.liferay.portal.model.ModelListener listener);
269 }