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="PortletPreferencesPersistence.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 PortletPreferencesPersistence extends BasePersistence {
36      public com.liferay.portal.model.PortletPreferences create(
37          long portletPreferencesId);
38  
39      public com.liferay.portal.model.PortletPreferences remove(
40          long portletPreferencesId)
41          throws com.liferay.portal.NoSuchPortletPreferencesException,
42              com.liferay.portal.SystemException;
43  
44      public com.liferay.portal.model.PortletPreferences remove(
45          com.liferay.portal.model.PortletPreferences portletPreferences)
46          throws com.liferay.portal.SystemException;
47  
48      /**
49       * @deprecated Use <code>update(PortletPreferences portletPreferences, boolean merge)</code>.
50       */
51      public com.liferay.portal.model.PortletPreferences update(
52          com.liferay.portal.model.PortletPreferences portletPreferences)
53          throws com.liferay.portal.SystemException;
54  
55      /**
56       * Add, update, or merge, the entity. This method also calls the model
57       * listeners to trigger the proper events associated with adding, deleting,
58       * or updating an entity.
59       *
60       * @param        portletPreferences the entity to add, update, or merge
61       * @param        merge boolean value for whether to merge the entity. The
62       *                default value is false. Setting merge to true is more
63       *                expensive and should only be true when portletPreferences is
64       *                transient. See LEP-5473 for a detailed discussion of this
65       *                method.
66       * @return        true if the portlet can be displayed via Ajax
67       */
68      public com.liferay.portal.model.PortletPreferences update(
69          com.liferay.portal.model.PortletPreferences portletPreferences,
70          boolean merge) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.PortletPreferences updateImpl(
73          com.liferay.portal.model.PortletPreferences portletPreferences,
74          boolean merge) throws com.liferay.portal.SystemException;
75  
76      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77      public com.liferay.portal.model.PortletPreferences findByPrimaryKey(
78          long portletPreferencesId)
79          throws com.liferay.portal.NoSuchPortletPreferencesException,
80              com.liferay.portal.SystemException;
81  
82      public com.liferay.portal.model.PortletPreferences fetchByPrimaryKey(
83          long portletPreferencesId) throws com.liferay.portal.SystemException;
84  
85      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86      public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
87          long plid) throws com.liferay.portal.SystemException;
88  
89      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90      public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
91          long plid, 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.PortletPreferences> findByPlid(
96          long plid, 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.PortletPreferences findByPlid_First(
102         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.NoSuchPortletPreferencesException,
104             com.liferay.portal.SystemException;
105 
106     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107     public com.liferay.portal.model.PortletPreferences findByPlid_Last(
108         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.NoSuchPortletPreferencesException,
110             com.liferay.portal.SystemException;
111 
112     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113     public com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
114         long portletPreferencesId, long plid,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchPortletPreferencesException,
117             com.liferay.portal.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
121         long plid, java.lang.String portletId)
122         throws com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
126         long plid, java.lang.String portletId, int start, int end)
127         throws com.liferay.portal.SystemException;
128 
129     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130     public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
131         long plid, java.lang.String portletId, int start, int end,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public com.liferay.portal.model.PortletPreferences findByP_P_First(
137         long plid, java.lang.String portletId,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.NoSuchPortletPreferencesException,
140             com.liferay.portal.SystemException;
141 
142     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143     public com.liferay.portal.model.PortletPreferences findByP_P_Last(
144         long plid, java.lang.String portletId,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.NoSuchPortletPreferencesException,
147             com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
151         long portletPreferencesId, long plid, java.lang.String portletId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.NoSuchPortletPreferencesException,
154             com.liferay.portal.SystemException;
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
158         long ownerId, int ownerType, long plid)
159         throws com.liferay.portal.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
163         long ownerId, int ownerType, long plid, int start, int end)
164         throws com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
168         long ownerId, int ownerType, long plid, int start, int end,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public com.liferay.portal.model.PortletPreferences findByO_O_P_First(
174         long ownerId, int ownerType, long plid,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.NoSuchPortletPreferencesException,
177             com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
181         long ownerId, int ownerType, long plid,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.NoSuchPortletPreferencesException,
184             com.liferay.portal.SystemException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
188         long portletPreferencesId, long ownerId, int ownerType, long plid,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.NoSuchPortletPreferencesException,
191             com.liferay.portal.SystemException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public com.liferay.portal.model.PortletPreferences findByO_O_P_P(
195         long ownerId, int ownerType, long plid, java.lang.String portletId)
196         throws com.liferay.portal.NoSuchPortletPreferencesException,
197             com.liferay.portal.SystemException;
198 
199     public com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
200         long ownerId, int ownerType, long plid, java.lang.String portletId)
201         throws com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public java.util.List<Object> findWithDynamicQuery(
205         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
206         throws com.liferay.portal.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public java.util.List<Object> findWithDynamicQuery(
210         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
211         int end) throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
215         throws com.liferay.portal.SystemException;
216 
217     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218     public java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
219         int start, int end) throws com.liferay.portal.SystemException;
220 
221     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222     public java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
223         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException;
225 
226     public void removeByPlid(long plid)
227         throws com.liferay.portal.SystemException;
228 
229     public void removeByP_P(long plid, java.lang.String portletId)
230         throws com.liferay.portal.SystemException;
231 
232     public void removeByO_O_P(long ownerId, int ownerType, long plid)
233         throws com.liferay.portal.SystemException;
234 
235     public void removeByO_O_P_P(long ownerId, int ownerType, long plid,
236         java.lang.String portletId)
237         throws com.liferay.portal.NoSuchPortletPreferencesException,
238             com.liferay.portal.SystemException;
239 
240     public void removeAll() throws com.liferay.portal.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public int countByPlid(long plid) throws com.liferay.portal.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public int countByP_P(long plid, java.lang.String portletId)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public int countByO_O_P(long ownerId, int ownerType, long plid)
251         throws com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public int countByO_O_P_P(long ownerId, int ownerType, long plid,
255         java.lang.String portletId) throws com.liferay.portal.SystemException;
256 
257     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258     public int countAll() throws com.liferay.portal.SystemException;
259 }