1   /**
2    * Copyright (c) 2000-2009 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.portal.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="LayoutPersistence.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 LayoutPersistence extends BasePersistence {
39      public com.liferay.portal.model.Layout create(long plid);
40  
41      public com.liferay.portal.model.Layout remove(long plid)
42          throws com.liferay.portal.NoSuchLayoutException,
43              com.liferay.portal.SystemException;
44  
45      public com.liferay.portal.model.Layout remove(
46          com.liferay.portal.model.Layout layout)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(Layout layout, boolean merge)</code>.
51       */
52      public com.liferay.portal.model.Layout update(
53          com.liferay.portal.model.Layout layout)
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        layout 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 layout 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.portal.model.Layout update(
70          com.liferay.portal.model.Layout layout, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portal.model.Layout updateImpl(
74          com.liferay.portal.model.Layout layout, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portal.model.Layout findByPrimaryKey(long plid)
79          throws com.liferay.portal.NoSuchLayoutException,
80              com.liferay.portal.SystemException;
81  
82      public com.liferay.portal.model.Layout fetchByPrimaryKey(long plid)
83          throws com.liferay.portal.SystemException;
84  
85      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86      public java.util.List<com.liferay.portal.model.Layout> findByGroupId(
87          long groupId) throws com.liferay.portal.SystemException;
88  
89      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90      public java.util.List<com.liferay.portal.model.Layout> findByGroupId(
91          long groupId, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
95      public java.util.List<com.liferay.portal.model.Layout> findByGroupId(
96          long groupId, int start, int end,
97          com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException;
99  
100     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
101     public com.liferay.portal.model.Layout findByGroupId_First(long groupId,
102         com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.NoSuchLayoutException,
104             com.liferay.portal.SystemException;
105 
106     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107     public com.liferay.portal.model.Layout findByGroupId_Last(long groupId,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.NoSuchLayoutException,
110             com.liferay.portal.SystemException;
111 
112     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113     public com.liferay.portal.model.Layout[] findByGroupId_PrevAndNext(
114         long plid, long groupId,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchLayoutException,
117             com.liferay.portal.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
121         long companyId) throws com.liferay.portal.SystemException;
122 
123     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124     public java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
125         long companyId, int start, int end)
126         throws com.liferay.portal.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
130         long companyId, int start, int end,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public com.liferay.portal.model.Layout findByCompanyId_First(
136         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchLayoutException,
138             com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public com.liferay.portal.model.Layout findByCompanyId_Last(
142         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.NoSuchLayoutException,
144             com.liferay.portal.SystemException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public com.liferay.portal.model.Layout[] findByCompanyId_PrevAndNext(
148         long plid, long companyId,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.NoSuchLayoutException,
151             com.liferay.portal.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public com.liferay.portal.model.Layout findByDLFolderId(long dlFolderId)
155         throws com.liferay.portal.NoSuchLayoutException,
156             com.liferay.portal.SystemException;
157 
158     public com.liferay.portal.model.Layout fetchByDLFolderId(long dlFolderId)
159         throws com.liferay.portal.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public com.liferay.portal.model.Layout findByIconImageId(long iconImageId)
163         throws com.liferay.portal.NoSuchLayoutException,
164             com.liferay.portal.SystemException;
165 
166     public com.liferay.portal.model.Layout fetchByIconImageId(long iconImageId)
167         throws com.liferay.portal.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public java.util.List<com.liferay.portal.model.Layout> findByG_P(
171         long groupId, boolean privateLayout)
172         throws com.liferay.portal.SystemException;
173 
174     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175     public java.util.List<com.liferay.portal.model.Layout> findByG_P(
176         long groupId, boolean privateLayout, int start, int end)
177         throws com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public java.util.List<com.liferay.portal.model.Layout> findByG_P(
181         long groupId, boolean privateLayout, int start, int end,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public com.liferay.portal.model.Layout findByG_P_First(long groupId,
187         boolean privateLayout,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.NoSuchLayoutException,
190             com.liferay.portal.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public com.liferay.portal.model.Layout findByG_P_Last(long groupId,
194         boolean privateLayout,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.NoSuchLayoutException,
197             com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public com.liferay.portal.model.Layout[] findByG_P_PrevAndNext(long plid,
201         long groupId, boolean privateLayout,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.NoSuchLayoutException,
204             com.liferay.portal.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public com.liferay.portal.model.Layout findByG_P_L(long groupId,
208         boolean privateLayout, long layoutId)
209         throws com.liferay.portal.NoSuchLayoutException,
210             com.liferay.portal.SystemException;
211 
212     public com.liferay.portal.model.Layout fetchByG_P_L(long groupId,
213         boolean privateLayout, long layoutId)
214         throws com.liferay.portal.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
218         long groupId, boolean privateLayout, long parentLayoutId)
219         throws com.liferay.portal.SystemException;
220 
221     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222     public java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
223         long groupId, boolean privateLayout, long parentLayoutId, int start,
224         int end) throws com.liferay.portal.SystemException;
225 
226     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227     public java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
228         long groupId, boolean privateLayout, long parentLayoutId, int start,
229         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
230         throws com.liferay.portal.SystemException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public com.liferay.portal.model.Layout findByG_P_P_First(long groupId,
234         boolean privateLayout, long parentLayoutId,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.NoSuchLayoutException,
237             com.liferay.portal.SystemException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public com.liferay.portal.model.Layout findByG_P_P_Last(long groupId,
241         boolean privateLayout, long parentLayoutId,
242         com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.NoSuchLayoutException,
244             com.liferay.portal.SystemException;
245 
246     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247     public com.liferay.portal.model.Layout[] findByG_P_P_PrevAndNext(
248         long plid, long groupId, boolean privateLayout, long parentLayoutId,
249         com.liferay.portal.kernel.util.OrderByComparator obc)
250         throws com.liferay.portal.NoSuchLayoutException,
251             com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public com.liferay.portal.model.Layout findByG_P_F(long groupId,
255         boolean privateLayout, java.lang.String friendlyURL)
256         throws com.liferay.portal.NoSuchLayoutException,
257             com.liferay.portal.SystemException;
258 
259     public com.liferay.portal.model.Layout fetchByG_P_F(long groupId,
260         boolean privateLayout, java.lang.String friendlyURL)
261         throws com.liferay.portal.SystemException;
262 
263     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264     public java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
265         long groupId, boolean privateLayout, java.lang.String type)
266         throws com.liferay.portal.SystemException;
267 
268     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269     public java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
270         long groupId, boolean privateLayout, java.lang.String type, int start,
271         int end) throws com.liferay.portal.SystemException;
272 
273     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274     public java.util.List<com.liferay.portal.model.Layout> findByG_P_T(
275         long groupId, boolean privateLayout, java.lang.String type, int start,
276         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.SystemException;
278 
279     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280     public com.liferay.portal.model.Layout findByG_P_T_First(long groupId,
281         boolean privateLayout, java.lang.String type,
282         com.liferay.portal.kernel.util.OrderByComparator obc)
283         throws com.liferay.portal.NoSuchLayoutException,
284             com.liferay.portal.SystemException;
285 
286     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287     public com.liferay.portal.model.Layout findByG_P_T_Last(long groupId,
288         boolean privateLayout, java.lang.String type,
289         com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.NoSuchLayoutException,
291             com.liferay.portal.SystemException;
292 
293     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294     public com.liferay.portal.model.Layout[] findByG_P_T_PrevAndNext(
295         long plid, long groupId, boolean privateLayout, java.lang.String type,
296         com.liferay.portal.kernel.util.OrderByComparator obc)
297         throws com.liferay.portal.NoSuchLayoutException,
298             com.liferay.portal.SystemException;
299 
300     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301     public java.util.List<Object> findWithDynamicQuery(
302         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
303         throws com.liferay.portal.SystemException;
304 
305     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306     public java.util.List<Object> findWithDynamicQuery(
307         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
308         int end) throws com.liferay.portal.SystemException;
309 
310     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311     public java.util.List<com.liferay.portal.model.Layout> findAll()
312         throws com.liferay.portal.SystemException;
313 
314     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315     public java.util.List<com.liferay.portal.model.Layout> findAll(int start,
316         int end) throws com.liferay.portal.SystemException;
317 
318     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319     public java.util.List<com.liferay.portal.model.Layout> findAll(int start,
320         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
321         throws com.liferay.portal.SystemException;
322 
323     public void removeByGroupId(long groupId)
324         throws com.liferay.portal.SystemException;
325 
326     public void removeByCompanyId(long companyId)
327         throws com.liferay.portal.SystemException;
328 
329     public void removeByDLFolderId(long dlFolderId)
330         throws com.liferay.portal.NoSuchLayoutException,
331             com.liferay.portal.SystemException;
332 
333     public void removeByIconImageId(long iconImageId)
334         throws com.liferay.portal.NoSuchLayoutException,
335             com.liferay.portal.SystemException;
336 
337     public void removeByG_P(long groupId, boolean privateLayout)
338         throws com.liferay.portal.SystemException;
339 
340     public void removeByG_P_L(long groupId, boolean privateLayout, long layoutId)
341         throws com.liferay.portal.NoSuchLayoutException,
342             com.liferay.portal.SystemException;
343 
344     public void removeByG_P_P(long groupId, boolean privateLayout,
345         long parentLayoutId) throws com.liferay.portal.SystemException;
346 
347     public void removeByG_P_F(long groupId, boolean privateLayout,
348         java.lang.String friendlyURL)
349         throws com.liferay.portal.NoSuchLayoutException,
350             com.liferay.portal.SystemException;
351 
352     public void removeByG_P_T(long groupId, boolean privateLayout,
353         java.lang.String type) throws com.liferay.portal.SystemException;
354 
355     public void removeAll() throws com.liferay.portal.SystemException;
356 
357     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358     public int countByGroupId(long groupId)
359         throws com.liferay.portal.SystemException;
360 
361     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362     public int countByCompanyId(long companyId)
363         throws com.liferay.portal.SystemException;
364 
365     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366     public int countByDLFolderId(long dlFolderId)
367         throws com.liferay.portal.SystemException;
368 
369     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370     public int countByIconImageId(long iconImageId)
371         throws com.liferay.portal.SystemException;
372 
373     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374     public int countByG_P(long groupId, boolean privateLayout)
375         throws com.liferay.portal.SystemException;
376 
377     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
378     public int countByG_P_L(long groupId, boolean privateLayout, long layoutId)
379         throws com.liferay.portal.SystemException;
380 
381     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
382     public int countByG_P_P(long groupId, boolean privateLayout,
383         long parentLayoutId) throws com.liferay.portal.SystemException;
384 
385     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
386     public int countByG_P_F(long groupId, boolean privateLayout,
387         java.lang.String friendlyURL) throws com.liferay.portal.SystemException;
388 
389     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390     public int countByG_P_T(long groupId, boolean privateLayout,
391         java.lang.String type) throws com.liferay.portal.SystemException;
392 
393     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
394     public int countAll() throws com.liferay.portal.SystemException;
395 }