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.portal.service.persistence;
24  
25  /**
26   * <a href="LayoutPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface LayoutPersistence {
32      public com.liferay.portal.model.Layout create(long plid);
33  
34      public com.liferay.portal.model.Layout remove(long plid)
35          throws com.liferay.portal.SystemException,
36              com.liferay.portal.NoSuchLayoutException;
37  
38      public com.liferay.portal.model.Layout remove(
39          com.liferay.portal.model.Layout layout)
40          throws com.liferay.portal.SystemException;
41  
42      /**
43       * @deprecated Use <code>update(Layout layout, boolean merge)</code>.
44       */
45      public com.liferay.portal.model.Layout update(
46          com.liferay.portal.model.Layout layout)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * Add, update, or merge, the entity. This method also calls the model
51       * listeners to trigger the proper events associated with adding, deleting,
52       * or updating an entity.
53       *
54       * @param        layout the entity to add, update, or merge
55       * @param        merge boolean value for whether to merge the entity. The
56       *                default value is false. Setting merge to true is more
57       *                expensive and should only be true when layout is
58       *                transient. See LEP-5473 for a detailed discussion of this
59       *                method.
60       * @return        true if the portlet can be displayed via Ajax
61       */
62      public com.liferay.portal.model.Layout update(
63          com.liferay.portal.model.Layout layout, boolean merge)
64          throws com.liferay.portal.SystemException;
65  
66      public com.liferay.portal.model.Layout updateImpl(
67          com.liferay.portal.model.Layout layout, boolean merge)
68          throws com.liferay.portal.SystemException;
69  
70      public com.liferay.portal.model.Layout findByPrimaryKey(long plid)
71          throws com.liferay.portal.SystemException,
72              com.liferay.portal.NoSuchLayoutException;
73  
74      public com.liferay.portal.model.Layout fetchByPrimaryKey(long plid)
75          throws com.liferay.portal.SystemException;
76  
77      public java.util.List<com.liferay.portal.model.Layout> findByGroupId(
78          long groupId) throws com.liferay.portal.SystemException;
79  
80      public java.util.List<com.liferay.portal.model.Layout> findByGroupId(
81          long groupId, int begin, int end)
82          throws com.liferay.portal.SystemException;
83  
84      public java.util.List<com.liferay.portal.model.Layout> findByGroupId(
85          long groupId, int begin, int end,
86          com.liferay.portal.kernel.util.OrderByComparator obc)
87          throws com.liferay.portal.SystemException;
88  
89      public com.liferay.portal.model.Layout findByGroupId_First(long groupId,
90          com.liferay.portal.kernel.util.OrderByComparator obc)
91          throws com.liferay.portal.SystemException,
92              com.liferay.portal.NoSuchLayoutException;
93  
94      public com.liferay.portal.model.Layout findByGroupId_Last(long groupId,
95          com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException,
97              com.liferay.portal.NoSuchLayoutException;
98  
99      public com.liferay.portal.model.Layout[] findByGroupId_PrevAndNext(
100         long plid, long groupId,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portal.NoSuchLayoutException;
104 
105     public java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
106         long companyId) throws com.liferay.portal.SystemException;
107 
108     public java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
109         long companyId, int begin, int end)
110         throws com.liferay.portal.SystemException;
111 
112     public java.util.List<com.liferay.portal.model.Layout> findByCompanyId(
113         long companyId, int begin, int end,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException;
116 
117     public com.liferay.portal.model.Layout findByCompanyId_First(
118         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portal.NoSuchLayoutException;
121 
122     public com.liferay.portal.model.Layout findByCompanyId_Last(
123         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException,
125             com.liferay.portal.NoSuchLayoutException;
126 
127     public com.liferay.portal.model.Layout[] findByCompanyId_PrevAndNext(
128         long plid, long companyId,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portal.NoSuchLayoutException;
132 
133     public com.liferay.portal.model.Layout findByDLFolderId(long dlFolderId)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portal.NoSuchLayoutException;
136 
137     public com.liferay.portal.model.Layout fetchByDLFolderId(long dlFolderId)
138         throws com.liferay.portal.SystemException;
139 
140     public com.liferay.portal.model.Layout findByIconImageId(long iconImageId)
141         throws com.liferay.portal.SystemException,
142             com.liferay.portal.NoSuchLayoutException;
143 
144     public com.liferay.portal.model.Layout fetchByIconImageId(long iconImageId)
145         throws com.liferay.portal.SystemException;
146 
147     public java.util.List<com.liferay.portal.model.Layout> findByG_P(
148         long groupId, boolean privateLayout)
149         throws com.liferay.portal.SystemException;
150 
151     public java.util.List<com.liferay.portal.model.Layout> findByG_P(
152         long groupId, boolean privateLayout, int begin, int end)
153         throws com.liferay.portal.SystemException;
154 
155     public java.util.List<com.liferay.portal.model.Layout> findByG_P(
156         long groupId, boolean privateLayout, int begin, int end,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException;
159 
160     public com.liferay.portal.model.Layout findByG_P_First(long groupId,
161         boolean privateLayout,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portal.NoSuchLayoutException;
165 
166     public com.liferay.portal.model.Layout findByG_P_Last(long groupId,
167         boolean privateLayout,
168         com.liferay.portal.kernel.util.OrderByComparator obc)
169         throws com.liferay.portal.SystemException,
170             com.liferay.portal.NoSuchLayoutException;
171 
172     public com.liferay.portal.model.Layout[] findByG_P_PrevAndNext(long plid,
173         long groupId, boolean privateLayout,
174         com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portal.NoSuchLayoutException;
177 
178     public com.liferay.portal.model.Layout findByG_P_L(long groupId,
179         boolean privateLayout, long layoutId)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portal.NoSuchLayoutException;
182 
183     public com.liferay.portal.model.Layout fetchByG_P_L(long groupId,
184         boolean privateLayout, long layoutId)
185         throws com.liferay.portal.SystemException;
186 
187     public java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
188         long groupId, boolean privateLayout, long parentLayoutId)
189         throws com.liferay.portal.SystemException;
190 
191     public java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
192         long groupId, boolean privateLayout, long parentLayoutId, int begin,
193         int end) throws com.liferay.portal.SystemException;
194 
195     public java.util.List<com.liferay.portal.model.Layout> findByG_P_P(
196         long groupId, boolean privateLayout, long parentLayoutId, int begin,
197         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException;
199 
200     public com.liferay.portal.model.Layout findByG_P_P_First(long groupId,
201         boolean privateLayout, long parentLayoutId,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portal.NoSuchLayoutException;
205 
206     public com.liferay.portal.model.Layout findByG_P_P_Last(long groupId,
207         boolean privateLayout, long parentLayoutId,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portal.NoSuchLayoutException;
211 
212     public com.liferay.portal.model.Layout[] findByG_P_P_PrevAndNext(
213         long plid, long groupId, boolean privateLayout, long parentLayoutId,
214         com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.SystemException,
216             com.liferay.portal.NoSuchLayoutException;
217 
218     public com.liferay.portal.model.Layout findByG_P_F(long groupId,
219         boolean privateLayout, java.lang.String friendlyURL)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portal.NoSuchLayoutException;
222 
223     public com.liferay.portal.model.Layout fetchByG_P_F(long groupId,
224         boolean privateLayout, java.lang.String friendlyURL)
225         throws com.liferay.portal.SystemException;
226 
227     public java.util.List<com.liferay.portal.model.Layout> findWithDynamicQuery(
228         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
229         throws com.liferay.portal.SystemException;
230 
231     public java.util.List<com.liferay.portal.model.Layout> findWithDynamicQuery(
232         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
233         int begin, int end) throws com.liferay.portal.SystemException;
234 
235     public java.util.List<com.liferay.portal.model.Layout> findAll()
236         throws com.liferay.portal.SystemException;
237 
238     public java.util.List<com.liferay.portal.model.Layout> findAll(int begin,
239         int end) throws com.liferay.portal.SystemException;
240 
241     public java.util.List<com.liferay.portal.model.Layout> findAll(int begin,
242         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.SystemException;
244 
245     public void removeByGroupId(long groupId)
246         throws com.liferay.portal.SystemException;
247 
248     public void removeByCompanyId(long companyId)
249         throws com.liferay.portal.SystemException;
250 
251     public void removeByDLFolderId(long dlFolderId)
252         throws com.liferay.portal.SystemException,
253             com.liferay.portal.NoSuchLayoutException;
254 
255     public void removeByIconImageId(long iconImageId)
256         throws com.liferay.portal.SystemException,
257             com.liferay.portal.NoSuchLayoutException;
258 
259     public void removeByG_P(long groupId, boolean privateLayout)
260         throws com.liferay.portal.SystemException;
261 
262     public void removeByG_P_L(long groupId, boolean privateLayout, long layoutId)
263         throws com.liferay.portal.SystemException,
264             com.liferay.portal.NoSuchLayoutException;
265 
266     public void removeByG_P_P(long groupId, boolean privateLayout,
267         long parentLayoutId) throws com.liferay.portal.SystemException;
268 
269     public void removeByG_P_F(long groupId, boolean privateLayout,
270         java.lang.String friendlyURL)
271         throws com.liferay.portal.SystemException,
272             com.liferay.portal.NoSuchLayoutException;
273 
274     public void removeAll() throws com.liferay.portal.SystemException;
275 
276     public int countByGroupId(long groupId)
277         throws com.liferay.portal.SystemException;
278 
279     public int countByCompanyId(long companyId)
280         throws com.liferay.portal.SystemException;
281 
282     public int countByDLFolderId(long dlFolderId)
283         throws com.liferay.portal.SystemException;
284 
285     public int countByIconImageId(long iconImageId)
286         throws com.liferay.portal.SystemException;
287 
288     public int countByG_P(long groupId, boolean privateLayout)
289         throws com.liferay.portal.SystemException;
290 
291     public int countByG_P_L(long groupId, boolean privateLayout, long layoutId)
292         throws com.liferay.portal.SystemException;
293 
294     public int countByG_P_P(long groupId, boolean privateLayout,
295         long parentLayoutId) throws com.liferay.portal.SystemException;
296 
297     public int countByG_P_F(long groupId, boolean privateLayout,
298         java.lang.String friendlyURL) throws com.liferay.portal.SystemException;
299 
300     public int countAll() throws com.liferay.portal.SystemException;
301 }