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