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  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  import com.liferay.portal.service.persistence.BasePersistence;
27  
28  /**
29   * <a href="JournalTemplatePersistence.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Brian Wing Shun Chan
32   *
33   */
34  @Transactional(rollbackFor =  {
35      PortalException.class, SystemException.class})
36  public interface JournalTemplatePersistence extends BasePersistence {
37      public com.liferay.portlet.journal.model.JournalTemplate create(long id);
38  
39      public com.liferay.portlet.journal.model.JournalTemplate remove(long id)
40          throws com.liferay.portal.SystemException,
41              com.liferay.portlet.journal.NoSuchTemplateException;
42  
43      public com.liferay.portlet.journal.model.JournalTemplate remove(
44          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
45          throws com.liferay.portal.SystemException;
46  
47      /**
48       * @deprecated Use <code>update(JournalTemplate journalTemplate, boolean merge)</code>.
49       */
50      public com.liferay.portlet.journal.model.JournalTemplate update(
51          com.liferay.portlet.journal.model.JournalTemplate journalTemplate)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * Add, update, or merge, the entity. This method also calls the model
56       * listeners to trigger the proper events associated with adding, deleting,
57       * or updating an entity.
58       *
59       * @param        journalTemplate the entity to add, update, or merge
60       * @param        merge boolean value for whether to merge the entity. The
61       *                default value is false. Setting merge to true is more
62       *                expensive and should only be true when journalTemplate is
63       *                transient. See LEP-5473 for a detailed discussion of this
64       *                method.
65       * @return        true if the portlet can be displayed via Ajax
66       */
67      public com.liferay.portlet.journal.model.JournalTemplate update(
68          com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
69          boolean merge) throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portlet.journal.model.JournalTemplate updateImpl(
72          com.liferay.portlet.journal.model.JournalTemplate journalTemplate,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
76      public com.liferay.portlet.journal.model.JournalTemplate findByPrimaryKey(
77          long id)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portlet.journal.NoSuchTemplateException;
80  
81      public com.liferay.portlet.journal.model.JournalTemplate fetchByPrimaryKey(
82          long id) throws com.liferay.portal.SystemException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
86          java.lang.String uuid) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
90          java.lang.String uuid, int start, int end)
91          throws com.liferay.portal.SystemException;
92  
93      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
94      public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByUuid(
95          java.lang.String uuid, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100     public com.liferay.portlet.journal.model.JournalTemplate findByUuid_First(
101         java.lang.String uuid,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.journal.NoSuchTemplateException;
105 
106     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107     public com.liferay.portlet.journal.model.JournalTemplate findByUuid_Last(
108         java.lang.String uuid,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.journal.NoSuchTemplateException;
112 
113     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114     public com.liferay.portlet.journal.model.JournalTemplate[] findByUuid_PrevAndNext(
115         long id, java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.journal.NoSuchTemplateException;
119 
120     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121     public com.liferay.portlet.journal.model.JournalTemplate findByUUID_G(
122         java.lang.String uuid, long groupId)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.journal.NoSuchTemplateException;
125 
126     public com.liferay.portlet.journal.model.JournalTemplate fetchByUUID_G(
127         java.lang.String uuid, long groupId)
128         throws com.liferay.portal.SystemException;
129 
130     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
132         long groupId) throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
136         long groupId, int start, int end)
137         throws com.liferay.portal.SystemException;
138 
139     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByGroupId(
141         long groupId, int start, int end,
142         com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.SystemException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public com.liferay.portlet.journal.model.JournalTemplate findByGroupId_First(
147         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.journal.NoSuchTemplateException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public com.liferay.portlet.journal.model.JournalTemplate findByGroupId_Last(
153         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.journal.NoSuchTemplateException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public com.liferay.portlet.journal.model.JournalTemplate[] findByGroupId_PrevAndNext(
159         long id, long groupId,
160         com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException,
162             com.liferay.portlet.journal.NoSuchTemplateException;
163 
164     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
166         java.lang.String templateId) throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
170         java.lang.String templateId, int start, int end)
171         throws com.liferay.portal.SystemException;
172 
173     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByTemplateId(
175         java.lang.String templateId, int start, int end,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_First(
181         java.lang.String templateId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.journal.NoSuchTemplateException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public com.liferay.portlet.journal.model.JournalTemplate findByTemplateId_Last(
188         java.lang.String templateId,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.journal.NoSuchTemplateException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public com.liferay.portlet.journal.model.JournalTemplate[] findByTemplateId_PrevAndNext(
195         long id, java.lang.String templateId,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.journal.NoSuchTemplateException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public com.liferay.portlet.journal.model.JournalTemplate findBySmallImageId(
202         long smallImageId)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.journal.NoSuchTemplateException;
205 
206     public com.liferay.portlet.journal.model.JournalTemplate fetchBySmallImageId(
207         long smallImageId) throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public com.liferay.portlet.journal.model.JournalTemplate findByG_T(
211         long groupId, java.lang.String templateId)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.journal.NoSuchTemplateException;
214 
215     public com.liferay.portlet.journal.model.JournalTemplate fetchByG_T(
216         long groupId, java.lang.String templateId)
217         throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
221         long groupId, java.lang.String structureId)
222         throws com.liferay.portal.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
226         long groupId, java.lang.String structureId, int start, int end)
227         throws com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByG_S(
231         long groupId, java.lang.String structureId, int start, int end,
232         com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException;
234 
235     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236     public com.liferay.portlet.journal.model.JournalTemplate findByG_S_First(
237         long groupId, java.lang.String structureId,
238         com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.journal.NoSuchTemplateException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public com.liferay.portlet.journal.model.JournalTemplate findByG_S_Last(
244         long groupId, java.lang.String structureId,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.journal.NoSuchTemplateException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public com.liferay.portlet.journal.model.JournalTemplate[] findByG_S_PrevAndNext(
251         long id, long groupId, java.lang.String structureId,
252         com.liferay.portal.kernel.util.OrderByComparator obc)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.journal.NoSuchTemplateException;
255 
256     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257     public java.util.List<Object> findWithDynamicQuery(
258         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
259         throws com.liferay.portal.SystemException;
260 
261     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262     public java.util.List<Object> findWithDynamicQuery(
263         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
264         int end) throws com.liferay.portal.SystemException;
265 
266     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll()
268         throws com.liferay.portal.SystemException;
269 
270     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
272         int start, int end) throws com.liferay.portal.SystemException;
273 
274     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275     public java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findAll(
276         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.SystemException;
278 
279     public void removeByUuid(java.lang.String uuid)
280         throws com.liferay.portal.SystemException;
281 
282     public void removeByUUID_G(java.lang.String uuid, long groupId)
283         throws com.liferay.portal.SystemException,
284             com.liferay.portlet.journal.NoSuchTemplateException;
285 
286     public void removeByGroupId(long groupId)
287         throws com.liferay.portal.SystemException;
288 
289     public void removeByTemplateId(java.lang.String templateId)
290         throws com.liferay.portal.SystemException;
291 
292     public void removeBySmallImageId(long smallImageId)
293         throws com.liferay.portal.SystemException,
294             com.liferay.portlet.journal.NoSuchTemplateException;
295 
296     public void removeByG_T(long groupId, java.lang.String templateId)
297         throws com.liferay.portal.SystemException,
298             com.liferay.portlet.journal.NoSuchTemplateException;
299 
300     public void removeByG_S(long groupId, java.lang.String structureId)
301         throws com.liferay.portal.SystemException;
302 
303     public void removeAll() throws com.liferay.portal.SystemException;
304 
305     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306     public int countByUuid(java.lang.String uuid)
307         throws com.liferay.portal.SystemException;
308 
309     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310     public int countByUUID_G(java.lang.String uuid, long groupId)
311         throws com.liferay.portal.SystemException;
312 
313     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314     public int countByGroupId(long groupId)
315         throws com.liferay.portal.SystemException;
316 
317     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318     public int countByTemplateId(java.lang.String templateId)
319         throws com.liferay.portal.SystemException;
320 
321     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322     public int countBySmallImageId(long smallImageId)
323         throws com.liferay.portal.SystemException;
324 
325     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326     public int countByG_T(long groupId, java.lang.String templateId)
327         throws com.liferay.portal.SystemException;
328 
329     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330     public int countByG_S(long groupId, java.lang.String structureId)
331         throws com.liferay.portal.SystemException;
332 
333     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334     public int countAll() throws com.liferay.portal.SystemException;
335 }