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