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.portlet.announcements.service.persistence;
24  
25  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="AnnouncementsEntryPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface AnnouncementsEntryPersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> announcementsEntries);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.announcements.model.AnnouncementsEntry create(
43          long entryId);
44  
45      public com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
46          long entryId)
47          throws com.liferay.portal.SystemException,
48              com.liferay.portlet.announcements.NoSuchEntryException;
49  
50      public com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
51          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * @deprecated Use <code>update(AnnouncementsEntry announcementsEntry, boolean merge)</code>.
56       */
57      public com.liferay.portlet.announcements.model.AnnouncementsEntry update(
58          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * Add, update, or merge, the entity. This method also calls the model
63       * listeners to trigger the proper events associated with adding, deleting,
64       * or updating an entity.
65       *
66       * @param        announcementsEntry the entity to add, update, or merge
67       * @param        merge boolean value for whether to merge the entity. The
68       *                default value is false. Setting merge to true is more
69       *                expensive and should only be true when announcementsEntry is
70       *                transient. See LEP-5473 for a detailed discussion of this
71       *                method.
72       * @return        true if the portlet can be displayed via Ajax
73       */
74      public com.liferay.portlet.announcements.model.AnnouncementsEntry update(
75          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
76          boolean merge) throws com.liferay.portal.SystemException;
77  
78      public com.liferay.portlet.announcements.model.AnnouncementsEntry updateImpl(
79          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.announcements.model.AnnouncementsEntry findByPrimaryKey(
83          long entryId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.announcements.NoSuchEntryException;
86  
87      public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchByPrimaryKey(
88          long entryId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
91          java.lang.String uuid) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
94          java.lang.String uuid, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
98          java.lang.String uuid, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
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     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_Last(
109         java.lang.String uuid,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.announcements.NoSuchEntryException;
113 
114     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUuid_PrevAndNext(
115         long entryId, java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.announcements.NoSuchEntryException;
119 
120     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
121         long userId) throws com.liferay.portal.SystemException;
122 
123     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
124         long userId, int start, int end)
125         throws com.liferay.portal.SystemException;
126 
127     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
128         long userId, int start, int end,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException;
131 
132     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_First(
133         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.announcements.NoSuchEntryException;
136 
137     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_Last(
138         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portlet.announcements.NoSuchEntryException;
141 
142     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUserId_PrevAndNext(
143         long entryId, long userId,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.announcements.NoSuchEntryException;
147 
148     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
149         long classNameId, long classPK)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
153         long classNameId, long classPK, int start, int end)
154         throws com.liferay.portal.SystemException;
155 
156     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
157         long classNameId, long classPK, int start, int end,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException;
160 
161     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_First(
162         long classNameId, long classPK,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.announcements.NoSuchEntryException;
166 
167     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_Last(
168         long classNameId, long classPK,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.announcements.NoSuchEntryException;
172 
173     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_PrevAndNext(
174         long entryId, 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     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
180         long classNameId, long classPK, boolean alert)
181         throws com.liferay.portal.SystemException;
182 
183     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
184         long classNameId, long classPK, boolean alert, int start, int end)
185         throws com.liferay.portal.SystemException;
186 
187     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
188         long classNameId, long classPK, boolean alert, int start, int end,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException;
191 
192     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_First(
193         long classNameId, long classPK, boolean alert,
194         com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.announcements.NoSuchEntryException;
197 
198     public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_Last(
199         long classNameId, long classPK, boolean alert,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.announcements.NoSuchEntryException;
203 
204     public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_A_PrevAndNext(
205         long entryId, long classNameId, long classPK, boolean alert,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException,
208             com.liferay.portlet.announcements.NoSuchEntryException;
209 
210     public java.util.List<Object> findWithDynamicQuery(
211         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
212         throws com.liferay.portal.SystemException;
213 
214     public java.util.List<Object> findWithDynamicQuery(
215         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
216         int end) throws com.liferay.portal.SystemException;
217 
218     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll()
219         throws com.liferay.portal.SystemException;
220 
221     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
222         int start, int end) throws com.liferay.portal.SystemException;
223 
224     public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
225         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException;
227 
228     public void removeByUuid(java.lang.String uuid)
229         throws com.liferay.portal.SystemException;
230 
231     public void removeByUserId(long userId)
232         throws com.liferay.portal.SystemException;
233 
234     public void removeByC_C(long classNameId, long classPK)
235         throws com.liferay.portal.SystemException;
236 
237     public void removeByC_C_A(long classNameId, long classPK, boolean alert)
238         throws com.liferay.portal.SystemException;
239 
240     public void removeAll() throws com.liferay.portal.SystemException;
241 
242     public int countByUuid(java.lang.String uuid)
243         throws com.liferay.portal.SystemException;
244 
245     public int countByUserId(long userId)
246         throws com.liferay.portal.SystemException;
247 
248     public int countByC_C(long classNameId, long classPK)
249         throws com.liferay.portal.SystemException;
250 
251     public int countByC_C_A(long classNameId, long classPK, boolean alert)
252         throws com.liferay.portal.SystemException;
253 
254     public int countAll() throws com.liferay.portal.SystemException;
255 }