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.portlet.announcements.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  import com.liferay.portal.service.persistence.BasePersistence;
27  
28  /**
29   * <a href="AnnouncementsEntryPersistence.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Brian Wing Shun Chan
32   *
33   */
34  @Transactional(rollbackFor =  {
35      PortalException.class, SystemException.class})
36  public interface AnnouncementsEntryPersistence extends BasePersistence {
37      public com.liferay.portlet.announcements.model.AnnouncementsEntry create(
38          long entryId);
39  
40      public com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
41          long entryId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.announcements.NoSuchEntryException;
44  
45      public com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
46          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(AnnouncementsEntry announcementsEntry, boolean merge)</code>.
51       */
52      public com.liferay.portlet.announcements.model.AnnouncementsEntry update(
53          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
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        announcementsEntry 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 announcementsEntry 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.portlet.announcements.model.AnnouncementsEntry update(
70          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
71          boolean merge) throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.announcements.model.AnnouncementsEntry updateImpl(
74          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
75          boolean merge) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.announcements.model.AnnouncementsEntry findByPrimaryKey(
79          long entryId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portlet.announcements.NoSuchEntryException;
82  
83      public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchByPrimaryKey(
84          long entryId) throws com.liferay.portal.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
92          java.lang.String uuid, int start, int end)
93          throws com.liferay.portal.SystemException;
94  
95      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96      public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
97          java.lang.String uuid, int start, int end,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException;
100 
101     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_First(
103         java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.announcements.NoSuchEntryException;
107 
108     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_Last(
110         java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.announcements.NoSuchEntryException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUuid_PrevAndNext(
117         long entryId, java.lang.String uuid,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.announcements.NoSuchEntryException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
124         long userId) throws com.liferay.portal.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
128         long userId, int start, int end)
129         throws com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
133         long userId, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_First(
139         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.announcements.NoSuchEntryException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_Last(
145         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.announcements.NoSuchEntryException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUserId_PrevAndNext(
151         long entryId, long userId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.announcements.NoSuchEntryException;
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
158         long classNameId, long classPK)
159         throws com.liferay.portal.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
163         long classNameId, long classPK, 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.portlet.announcements.model.AnnouncementsEntry> findByC_C(
168         long classNameId, long classPK, 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.portlet.announcements.model.AnnouncementsEntry findByC_C_First(
174         long classNameId, long classPK,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.announcements.NoSuchEntryException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_Last(
181         long classNameId, long classPK,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.announcements.NoSuchEntryException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_PrevAndNext(
188         long entryId, long classNameId, long classPK,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.announcements.NoSuchEntryException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
195         long classNameId, long classPK, boolean alert)
196         throws com.liferay.portal.SystemException;
197 
198     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
200         long classNameId, long classPK, boolean alert, int start, int end)
201         throws com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
205         long classNameId, long classPK, boolean alert, int start, int end,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_First(
211         long classNameId, long classPK, boolean alert,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.announcements.NoSuchEntryException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_Last(
218         long classNameId, long classPK, boolean alert,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.announcements.NoSuchEntryException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_A_PrevAndNext(
225         long entryId, long classNameId, long classPK, boolean alert,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.announcements.NoSuchEntryException;
229 
230     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231     public java.util.List<Object> findWithDynamicQuery(
232         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
233         throws com.liferay.portal.SystemException;
234 
235     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236     public java.util.List<Object> findWithDynamicQuery(
237         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
238         int end) throws com.liferay.portal.SystemException;
239 
240     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll()
242         throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
246         int start, int end) throws com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
250         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
251         throws com.liferay.portal.SystemException;
252 
253     public void removeByUuid(java.lang.String uuid)
254         throws com.liferay.portal.SystemException;
255 
256     public void removeByUserId(long userId)
257         throws com.liferay.portal.SystemException;
258 
259     public void removeByC_C(long classNameId, long classPK)
260         throws com.liferay.portal.SystemException;
261 
262     public void removeByC_C_A(long classNameId, long classPK, boolean alert)
263         throws com.liferay.portal.SystemException;
264 
265     public void removeAll() throws com.liferay.portal.SystemException;
266 
267     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268     public int countByUuid(java.lang.String uuid)
269         throws com.liferay.portal.SystemException;
270 
271     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272     public int countByUserId(long userId)
273         throws com.liferay.portal.SystemException;
274 
275     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276     public int countByC_C(long classNameId, long classPK)
277         throws com.liferay.portal.SystemException;
278 
279     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280     public int countByC_C_A(long classNameId, long classPK, boolean alert)
281         throws com.liferay.portal.SystemException;
282 
283     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284     public int countAll() throws com.liferay.portal.SystemException;
285 }