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  /**
23   * <a href="PortletPreferencesPersistence.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public interface PortletPreferencesPersistence extends BasePersistence {
29      public void cacheResult(
30          com.liferay.portal.model.PortletPreferences portletPreferences);
31  
32      public void cacheResult(
33          java.util.List<com.liferay.portal.model.PortletPreferences> portletPreferenceses);
34  
35      public void clearCache();
36  
37      public com.liferay.portal.model.PortletPreferences create(
38          long portletPreferencesId);
39  
40      public com.liferay.portal.model.PortletPreferences remove(
41          long portletPreferencesId)
42          throws com.liferay.portal.NoSuchPortletPreferencesException,
43              com.liferay.portal.SystemException;
44  
45      public com.liferay.portal.model.PortletPreferences remove(
46          com.liferay.portal.model.PortletPreferences portletPreferences)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(PortletPreferences portletPreferences, boolean merge)</code>.
51       */
52      public com.liferay.portal.model.PortletPreferences update(
53          com.liferay.portal.model.PortletPreferences portletPreferences)
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        portletPreferences 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 portletPreferences 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.PortletPreferences update(
70          com.liferay.portal.model.PortletPreferences portletPreferences,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portal.model.PortletPreferences updateImpl(
74          com.liferay.portal.model.PortletPreferences portletPreferences,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
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      public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
86          long plid) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
89          long plid, int start, int end)
90          throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portal.model.PortletPreferences> findByPlid(
93          long plid, int start, int end,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portal.model.PortletPreferences findByPlid_First(
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_Last(
103         long plid, com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.NoSuchPortletPreferencesException,
105             com.liferay.portal.SystemException;
106 
107     public com.liferay.portal.model.PortletPreferences[] findByPlid_PrevAndNext(
108         long portletPreferencesId, long plid,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.NoSuchPortletPreferencesException,
111             com.liferay.portal.SystemException;
112 
113     public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
114         long plid, java.lang.String portletId)
115         throws com.liferay.portal.SystemException;
116 
117     public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
118         long plid, java.lang.String portletId, int start, int end)
119         throws com.liferay.portal.SystemException;
120 
121     public java.util.List<com.liferay.portal.model.PortletPreferences> findByP_P(
122         long plid, java.lang.String portletId, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portal.model.PortletPreferences findByP_P_First(
127         long plid, java.lang.String portletId,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.NoSuchPortletPreferencesException,
130             com.liferay.portal.SystemException;
131 
132     public com.liferay.portal.model.PortletPreferences findByP_P_Last(
133         long plid, java.lang.String portletId,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.NoSuchPortletPreferencesException,
136             com.liferay.portal.SystemException;
137 
138     public com.liferay.portal.model.PortletPreferences[] findByP_P_PrevAndNext(
139         long portletPreferencesId, long plid, java.lang.String portletId,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.NoSuchPortletPreferencesException,
142             com.liferay.portal.SystemException;
143 
144     public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
145         long ownerId, int ownerType, long plid)
146         throws com.liferay.portal.SystemException;
147 
148     public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
149         long ownerId, int ownerType, long plid, int start, int end)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portal.model.PortletPreferences> findByO_O_P(
153         long ownerId, int ownerType, long plid, int start, int end,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException;
156 
157     public com.liferay.portal.model.PortletPreferences findByO_O_P_First(
158         long ownerId, int ownerType, long plid,
159         com.liferay.portal.kernel.util.OrderByComparator obc)
160         throws com.liferay.portal.NoSuchPortletPreferencesException,
161             com.liferay.portal.SystemException;
162 
163     public com.liferay.portal.model.PortletPreferences findByO_O_P_Last(
164         long ownerId, int ownerType, long plid,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.NoSuchPortletPreferencesException,
167             com.liferay.portal.SystemException;
168 
169     public com.liferay.portal.model.PortletPreferences[] findByO_O_P_PrevAndNext(
170         long portletPreferencesId, long ownerId, int ownerType, long plid,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.NoSuchPortletPreferencesException,
173             com.liferay.portal.SystemException;
174 
175     public com.liferay.portal.model.PortletPreferences findByO_O_P_P(
176         long ownerId, int ownerType, long plid, java.lang.String portletId)
177         throws com.liferay.portal.NoSuchPortletPreferencesException,
178             com.liferay.portal.SystemException;
179 
180     public com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
181         long ownerId, int ownerType, long plid, java.lang.String portletId)
182         throws com.liferay.portal.SystemException;
183 
184     public com.liferay.portal.model.PortletPreferences fetchByO_O_P_P(
185         long ownerId, int ownerType, long plid, java.lang.String portletId,
186         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
187 
188     public java.util.List<Object> findWithDynamicQuery(
189         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
190         throws com.liferay.portal.SystemException;
191 
192     public java.util.List<Object> findWithDynamicQuery(
193         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
194         int end) throws com.liferay.portal.SystemException;
195 
196     public java.util.List<com.liferay.portal.model.PortletPreferences> findAll()
197         throws com.liferay.portal.SystemException;
198 
199     public java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
200         int start, int end) throws com.liferay.portal.SystemException;
201 
202     public java.util.List<com.liferay.portal.model.PortletPreferences> findAll(
203         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException;
205 
206     public void removeByPlid(long plid)
207         throws com.liferay.portal.SystemException;
208 
209     public void removeByP_P(long plid, java.lang.String portletId)
210         throws com.liferay.portal.SystemException;
211 
212     public void removeByO_O_P(long ownerId, int ownerType, long plid)
213         throws com.liferay.portal.SystemException;
214 
215     public void removeByO_O_P_P(long ownerId, int ownerType, long plid,
216         java.lang.String portletId)
217         throws com.liferay.portal.NoSuchPortletPreferencesException,
218             com.liferay.portal.SystemException;
219 
220     public void removeAll() throws com.liferay.portal.SystemException;
221 
222     public int countByPlid(long plid) throws com.liferay.portal.SystemException;
223 
224     public int countByP_P(long plid, java.lang.String portletId)
225         throws com.liferay.portal.SystemException;
226 
227     public int countByO_O_P(long ownerId, int ownerType, long plid)
228         throws com.liferay.portal.SystemException;
229 
230     public int countByO_O_P_P(long ownerId, int ownerType, long plid,
231         java.lang.String portletId) throws com.liferay.portal.SystemException;
232 
233     public int countAll() throws com.liferay.portal.SystemException;
234 }