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