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.calendar.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="CalEventPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface CalEventPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.calendar.model.CalEvent calEvent);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.calendar.model.CalEvent> calEvents);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.calendar.model.CalEvent create(long eventId);
40  
41      public com.liferay.portlet.calendar.model.CalEvent remove(long eventId)
42          throws com.liferay.portal.SystemException,
43              com.liferay.portlet.calendar.NoSuchEventException;
44  
45      public com.liferay.portlet.calendar.model.CalEvent remove(
46          com.liferay.portlet.calendar.model.CalEvent calEvent)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(CalEvent calEvent, boolean merge)</code>.
51       */
52      public com.liferay.portlet.calendar.model.CalEvent update(
53          com.liferay.portlet.calendar.model.CalEvent calEvent)
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        calEvent 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 calEvent 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.calendar.model.CalEvent update(
70          com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portlet.calendar.model.CalEvent updateImpl(
74          com.liferay.portlet.calendar.model.CalEvent calEvent, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portlet.calendar.model.CalEvent findByPrimaryKey(
78          long eventId)
79          throws com.liferay.portal.SystemException,
80              com.liferay.portlet.calendar.NoSuchEventException;
81  
82      public com.liferay.portlet.calendar.model.CalEvent fetchByPrimaryKey(
83          long eventId) throws com.liferay.portal.SystemException;
84  
85      public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByUuid(
86          java.lang.String uuid) throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByUuid(
89          java.lang.String uuid, int start, int end)
90          throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByUuid(
93          java.lang.String uuid, int start, int end,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.calendar.model.CalEvent findByUuid_First(
98          java.lang.String uuid,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.calendar.NoSuchEventException;
102 
103     public com.liferay.portlet.calendar.model.CalEvent findByUuid_Last(
104         java.lang.String uuid,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.calendar.NoSuchEventException;
108 
109     public com.liferay.portlet.calendar.model.CalEvent[] findByUuid_PrevAndNext(
110         long eventId, java.lang.String uuid,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.calendar.NoSuchEventException;
114 
115     public com.liferay.portlet.calendar.model.CalEvent findByUUID_G(
116         java.lang.String uuid, long groupId)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.calendar.NoSuchEventException;
119 
120     public com.liferay.portlet.calendar.model.CalEvent fetchByUUID_G(
121         java.lang.String uuid, long groupId)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portlet.calendar.model.CalEvent fetchByUUID_G(
125         java.lang.String uuid, long groupId, boolean retrieveFromCache)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByCompanyId(
129         long companyId) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByCompanyId(
132         long companyId, int start, int end)
133         throws com.liferay.portal.SystemException;
134 
135     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByCompanyId(
136         long companyId, int start, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException;
139 
140     public com.liferay.portlet.calendar.model.CalEvent findByCompanyId_First(
141         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.calendar.NoSuchEventException;
144 
145     public com.liferay.portlet.calendar.model.CalEvent findByCompanyId_Last(
146         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.calendar.NoSuchEventException;
149 
150     public com.liferay.portlet.calendar.model.CalEvent[] findByCompanyId_PrevAndNext(
151         long eventId, long companyId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.calendar.NoSuchEventException;
155 
156     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByGroupId(
157         long groupId) throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByGroupId(
160         long groupId, int start, int end)
161         throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByGroupId(
164         long groupId, int start, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException;
167 
168     public com.liferay.portlet.calendar.model.CalEvent findByGroupId_First(
169         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.calendar.NoSuchEventException;
172 
173     public com.liferay.portlet.calendar.model.CalEvent findByGroupId_Last(
174         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.calendar.NoSuchEventException;
177 
178     public com.liferay.portlet.calendar.model.CalEvent[] findByGroupId_PrevAndNext(
179         long eventId, long groupId,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.calendar.NoSuchEventException;
183 
184     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByRemindBy(
185         int remindBy) throws com.liferay.portal.SystemException;
186 
187     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByRemindBy(
188         int remindBy, int start, int end)
189         throws com.liferay.portal.SystemException;
190 
191     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByRemindBy(
192         int remindBy, int start, int end,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException;
195 
196     public com.liferay.portlet.calendar.model.CalEvent findByRemindBy_First(
197         int remindBy, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.calendar.NoSuchEventException;
200 
201     public com.liferay.portlet.calendar.model.CalEvent findByRemindBy_Last(
202         int remindBy, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.calendar.NoSuchEventException;
205 
206     public com.liferay.portlet.calendar.model.CalEvent[] findByRemindBy_PrevAndNext(
207         long eventId, int remindBy,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.calendar.NoSuchEventException;
211 
212     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_T(
213         long groupId, java.lang.String type)
214         throws com.liferay.portal.SystemException;
215 
216     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_T(
217         long groupId, java.lang.String type, int start, int end)
218         throws com.liferay.portal.SystemException;
219 
220     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_T(
221         long groupId, java.lang.String type, int start, int end,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException;
224 
225     public com.liferay.portlet.calendar.model.CalEvent findByG_T_First(
226         long groupId, java.lang.String type,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.calendar.NoSuchEventException;
230 
231     public com.liferay.portlet.calendar.model.CalEvent findByG_T_Last(
232         long groupId, java.lang.String type,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException,
235             com.liferay.portlet.calendar.NoSuchEventException;
236 
237     public com.liferay.portlet.calendar.model.CalEvent[] findByG_T_PrevAndNext(
238         long eventId, long groupId, java.lang.String type,
239         com.liferay.portal.kernel.util.OrderByComparator obc)
240         throws com.liferay.portal.SystemException,
241             com.liferay.portlet.calendar.NoSuchEventException;
242 
243     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_R(
244         long groupId, boolean repeating)
245         throws com.liferay.portal.SystemException;
246 
247     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_R(
248         long groupId, boolean repeating, int start, int end)
249         throws com.liferay.portal.SystemException;
250 
251     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_R(
252         long groupId, boolean repeating, int start, int end,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException;
255 
256     public com.liferay.portlet.calendar.model.CalEvent findByG_R_First(
257         long groupId, boolean repeating,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException,
260             com.liferay.portlet.calendar.NoSuchEventException;
261 
262     public com.liferay.portlet.calendar.model.CalEvent findByG_R_Last(
263         long groupId, boolean repeating,
264         com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.SystemException,
266             com.liferay.portlet.calendar.NoSuchEventException;
267 
268     public com.liferay.portlet.calendar.model.CalEvent[] findByG_R_PrevAndNext(
269         long eventId, long groupId, boolean repeating,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException,
272             com.liferay.portlet.calendar.NoSuchEventException;
273 
274     public java.util.List<Object> findWithDynamicQuery(
275         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
276         throws com.liferay.portal.SystemException;
277 
278     public java.util.List<Object> findWithDynamicQuery(
279         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
280         int end) throws com.liferay.portal.SystemException;
281 
282     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findAll()
283         throws com.liferay.portal.SystemException;
284 
285     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findAll(
286         int start, int end) throws com.liferay.portal.SystemException;
287 
288     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findAll(
289         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.SystemException;
291 
292     public void removeByUuid(java.lang.String uuid)
293         throws com.liferay.portal.SystemException;
294 
295     public void removeByUUID_G(java.lang.String uuid, long groupId)
296         throws com.liferay.portal.SystemException,
297             com.liferay.portlet.calendar.NoSuchEventException;
298 
299     public void removeByCompanyId(long companyId)
300         throws com.liferay.portal.SystemException;
301 
302     public void removeByGroupId(long groupId)
303         throws com.liferay.portal.SystemException;
304 
305     public void removeByRemindBy(int remindBy)
306         throws com.liferay.portal.SystemException;
307 
308     public void removeByG_T(long groupId, java.lang.String type)
309         throws com.liferay.portal.SystemException;
310 
311     public void removeByG_R(long groupId, boolean repeating)
312         throws com.liferay.portal.SystemException;
313 
314     public void removeAll() throws com.liferay.portal.SystemException;
315 
316     public int countByUuid(java.lang.String uuid)
317         throws com.liferay.portal.SystemException;
318 
319     public int countByUUID_G(java.lang.String uuid, long groupId)
320         throws com.liferay.portal.SystemException;
321 
322     public int countByCompanyId(long companyId)
323         throws com.liferay.portal.SystemException;
324 
325     public int countByGroupId(long groupId)
326         throws com.liferay.portal.SystemException;
327 
328     public int countByRemindBy(int remindBy)
329         throws com.liferay.portal.SystemException;
330 
331     public int countByG_T(long groupId, java.lang.String type)
332         throws com.liferay.portal.SystemException;
333 
334     public int countByG_R(long groupId, boolean repeating)
335         throws com.liferay.portal.SystemException;
336 
337     public int countAll() throws com.liferay.portal.SystemException;
338 }