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="JournalTemplatePersistence.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 JournalTemplatePersistence {
39      public com.liferay.portlet.journal.model.JournalTemplate create(long id);
40  
41      public com.liferay.portlet.journal.model.JournalTemplate remove(long id)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.journal.NoSuchTemplateException;
44  
45      public com.liferay.portlet.journal.model.JournalTemplate remove(
46          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(JournalTemplate journalTemplate, boolean merge)</code>.
51       */
52      public com.liferay.portlet.journal.model.JournalTemplate update(
53          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
54          throws com.liferay.portal.SystemException;
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        journalTemplate 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 journalTemplate 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 com.liferay.portlet.journal.model.JournalTemplate update(
70          com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.journal.model.JournalTemplate updateImpl(
74          com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.journal.model.JournalTemplate findByPrimaryKey(
79          long id)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portlet.journal.NoSuchTemplateException;
82  
83      public com.liferay.portlet.journal.model.JournalTemplate fetchByPrimaryKey(
84          long id) throws com.liferay.portal.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
92          java.lang.String uuid, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
97          java.lang.String uuid, int start, int end,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102     public com.liferay.portlet.journal.model.JournalTemplate findByUuid_First(
103         java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.journal.NoSuchTemplateException;
107 
108     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109     public com.liferay.portlet.journal.model.JournalTemplate findByUuid_Last(
110         java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.journal.NoSuchTemplateException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public com.liferay.portlet.journal.model.JournalTemplate[] findByUuid_PrevAndNext(
117         long id, java.lang.String uuid,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.journal.NoSuchTemplateException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public com.liferay.portlet.journal.model.JournalTemplate findByUUID_G(
124         java.lang.String uuid, long groupId)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.journal.NoSuchTemplateException;
127 
128     public com.liferay.portlet.journal.model.JournalTemplate fetchByUUID_G(
129         java.lang.String uuid, long groupId)
130         throws com.liferay.portal.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
134         long groupId) throws com.liferay.portal.SystemException;
135 
136     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
138         long groupId, int start, int end)
139         throws com.liferay.portal.SystemException;
140 
141     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
143         long groupId, int start, int end,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public com.liferay.portlet.journal.model.JournalTemplate findByGroupId_First(
149         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.journal.NoSuchTemplateException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public com.liferay.portlet.journal.model.JournalTemplate findByGroupId_Last(
155         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.journal.NoSuchTemplateException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public com.liferay.portlet.journal.model.JournalTemplate[] findByGroupId_PrevAndNext(
161         long id, long groupId,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.journal.NoSuchTemplateException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
168         java.lang.String templateId) throws com.liferay.portal.SystemException;
169 
170     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
172         java.lang.String templateId, int start, int end)
173         throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
177         java.lang.String templateId, int start, int end,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_First(
183         java.lang.String templateId,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException,
186             com.liferay.portlet.journal.NoSuchTemplateException;
187 
188     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189     public com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_Last(
190         java.lang.String templateId,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.journal.NoSuchTemplateException;
194 
195     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196     public com.liferay.portlet.journal.model.JournalTemplate[] findByTemplateId_PrevAndNext(
197         long id, java.lang.String templateId,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.SystemException,
200             com.liferay.portlet.journal.NoSuchTemplateException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public com.liferay.portlet.journal.model.JournalTemplate findBySmallImageId(
204         long smallImageId)
205         throws com.liferay.portal.SystemException,
206             com.liferay.portlet.journal.NoSuchTemplateException;
207 
208     public com.liferay.portlet.journal.model.JournalTemplate fetchBySmallImageId(
209         long smallImageId) throws com.liferay.portal.SystemException;
210 
211     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212     public com.liferay.portlet.journal.model.JournalTemplate findByG_T(
213         long groupId, java.lang.String templateId)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.journal.NoSuchTemplateException;
216 
217     public com.liferay.portlet.journal.model.JournalTemplate fetchByG_T(
218         long groupId, java.lang.String templateId)
219         throws com.liferay.portal.SystemException;
220 
221     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
223         long groupId, java.lang.String structureId)
224         throws com.liferay.portal.SystemException;
225 
226     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
228         long groupId, java.lang.String structureId, int start, int end)
229         throws com.liferay.portal.SystemException;
230 
231     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
233         long groupId, java.lang.String structureId, int start, int end,
234         com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public com.liferay.portlet.journal.model.JournalTemplate findByG_S_First(
239         long groupId, java.lang.String structureId,
240         com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException,
242             com.liferay.portlet.journal.NoSuchTemplateException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public com.liferay.portlet.journal.model.JournalTemplate findByG_S_Last(
246         long groupId, java.lang.String structureId,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException,
249             com.liferay.portlet.journal.NoSuchTemplateException;
250 
251     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252     public com.liferay.portlet.journal.model.JournalTemplate[] findByG_S_PrevAndNext(
253         long id, long groupId, java.lang.String structureId,
254         com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.SystemException,
256             com.liferay.portlet.journal.NoSuchTemplateException;
257 
258     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259     public java.util.List<Object> findWithDynamicQuery(
260         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
261         throws com.liferay.portal.SystemException;
262 
263     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264     public java.util.List<Object> findWithDynamicQuery(
265         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
266         int end) throws com.liferay.portal.SystemException;
267 
268     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll()
270         throws com.liferay.portal.SystemException;
271 
272     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
274         int start, int end) throws com.liferay.portal.SystemException;
275 
276     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
278         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.SystemException;
280 
281     public void removeByUuid(java.lang.String uuid)
282         throws com.liferay.portal.SystemException;
283 
284     public void removeByUUID_G(java.lang.String uuid, long groupId)
285         throws com.liferay.portal.SystemException,
286             com.liferay.portlet.journal.NoSuchTemplateException;
287 
288     public void removeByGroupId(long groupId)
289         throws com.liferay.portal.SystemException;
290 
291     public void removeByTemplateId(java.lang.String templateId)
292         throws com.liferay.portal.SystemException;
293 
294     public void removeBySmallImageId(long smallImageId)
295         throws com.liferay.portal.SystemException,
296             com.liferay.portlet.journal.NoSuchTemplateException;
297 
298     public void removeByG_T(long groupId, java.lang.String templateId)
299         throws com.liferay.portal.SystemException,
300             com.liferay.portlet.journal.NoSuchTemplateException;
301 
302     public void removeByG_S(long groupId, java.lang.String structureId)
303         throws com.liferay.portal.SystemException;
304 
305     public void removeAll() throws com.liferay.portal.SystemException;
306 
307     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308     public int countByUuid(java.lang.String uuid)
309         throws com.liferay.portal.SystemException;
310 
311     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312     public int countByUUID_G(java.lang.String uuid, long groupId)
313         throws com.liferay.portal.SystemException;
314 
315     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316     public int countByGroupId(long groupId)
317         throws com.liferay.portal.SystemException;
318 
319     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320     public int countByTemplateId(java.lang.String templateId)
321         throws com.liferay.portal.SystemException;
322 
323     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324     public int countBySmallImageId(long smallImageId)
325         throws com.liferay.portal.SystemException;
326 
327     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328     public int countByG_T(long groupId, java.lang.String templateId)
329         throws com.liferay.portal.SystemException;
330 
331     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332     public int countByG_S(long groupId, java.lang.String structureId)
333         throws com.liferay.portal.SystemException;
334 
335     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336     public int countAll() throws com.liferay.portal.SystemException;
337 
338     public void registerListener(
339         com.liferay.portal.model.ModelListener listener);
340 
341     public void unregisterListener(
342         com.liferay.portal.model.ModelListener listener);
343 }