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> findByGroupId(
129         long groupId) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByGroupId(
132         long groupId, int start, int end)
133         throws com.liferay.portal.SystemException;
134 
135     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByGroupId(
136         long groupId, 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 findByGroupId_First(
141         long groupId, 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 findByGroupId_Last(
146         long groupId, 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[] findByGroupId_PrevAndNext(
151         long eventId, long groupId,
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> findByRemindBy(
157         int remindBy) throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByRemindBy(
160         int remindBy, int start, int end)
161         throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByRemindBy(
164         int remindBy, 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 findByRemindBy_First(
169         int remindBy, 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 findByRemindBy_Last(
174         int remindBy, 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[] findByRemindBy_PrevAndNext(
179         long eventId, int remindBy,
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> findByG_T(
185         long groupId, java.lang.String type)
186         throws com.liferay.portal.SystemException;
187 
188     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_T(
189         long groupId, java.lang.String type, int start, int end)
190         throws com.liferay.portal.SystemException;
191 
192     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_T(
193         long groupId, java.lang.String type, int start, int end,
194         com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException;
196 
197     public com.liferay.portlet.calendar.model.CalEvent findByG_T_First(
198         long groupId, java.lang.String type,
199         com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException,
201             com.liferay.portlet.calendar.NoSuchEventException;
202 
203     public com.liferay.portlet.calendar.model.CalEvent findByG_T_Last(
204         long groupId, java.lang.String type,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.calendar.NoSuchEventException;
208 
209     public com.liferay.portlet.calendar.model.CalEvent[] findByG_T_PrevAndNext(
210         long eventId, long groupId, java.lang.String type,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.calendar.NoSuchEventException;
214 
215     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_R(
216         long groupId, boolean repeating)
217         throws com.liferay.portal.SystemException;
218 
219     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_R(
220         long groupId, boolean repeating, int start, int end)
221         throws com.liferay.portal.SystemException;
222 
223     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findByG_R(
224         long groupId, boolean repeating, int start, int end,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException;
227 
228     public com.liferay.portlet.calendar.model.CalEvent findByG_R_First(
229         long groupId, boolean repeating,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.calendar.NoSuchEventException;
233 
234     public com.liferay.portlet.calendar.model.CalEvent findByG_R_Last(
235         long groupId, boolean repeating,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.calendar.NoSuchEventException;
239 
240     public com.liferay.portlet.calendar.model.CalEvent[] findByG_R_PrevAndNext(
241         long eventId, long groupId, boolean repeating,
242         com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.SystemException,
244             com.liferay.portlet.calendar.NoSuchEventException;
245 
246     public java.util.List<Object> findWithDynamicQuery(
247         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
248         throws com.liferay.portal.SystemException;
249 
250     public java.util.List<Object> findWithDynamicQuery(
251         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
252         int end) throws com.liferay.portal.SystemException;
253 
254     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findAll()
255         throws com.liferay.portal.SystemException;
256 
257     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findAll(
258         int start, int end) throws com.liferay.portal.SystemException;
259 
260     public java.util.List<com.liferay.portlet.calendar.model.CalEvent> findAll(
261         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.SystemException;
263 
264     public void removeByUuid(java.lang.String uuid)
265         throws com.liferay.portal.SystemException;
266 
267     public void removeByUUID_G(java.lang.String uuid, long groupId)
268         throws com.liferay.portal.SystemException,
269             com.liferay.portlet.calendar.NoSuchEventException;
270 
271     public void removeByGroupId(long groupId)
272         throws com.liferay.portal.SystemException;
273 
274     public void removeByRemindBy(int remindBy)
275         throws com.liferay.portal.SystemException;
276 
277     public void removeByG_T(long groupId, java.lang.String type)
278         throws com.liferay.portal.SystemException;
279 
280     public void removeByG_R(long groupId, boolean repeating)
281         throws com.liferay.portal.SystemException;
282 
283     public void removeAll() throws com.liferay.portal.SystemException;
284 
285     public int countByUuid(java.lang.String uuid)
286         throws com.liferay.portal.SystemException;
287 
288     public int countByUUID_G(java.lang.String uuid, long groupId)
289         throws com.liferay.portal.SystemException;
290 
291     public int countByGroupId(long groupId)
292         throws com.liferay.portal.SystemException;
293 
294     public int countByRemindBy(int remindBy)
295         throws com.liferay.portal.SystemException;
296 
297     public int countByG_T(long groupId, java.lang.String type)
298         throws com.liferay.portal.SystemException;
299 
300     public int countByG_R(long groupId, boolean repeating)
301         throws com.liferay.portal.SystemException;
302 
303     public int countAll() throws com.liferay.portal.SystemException;
304 }