001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Ticket;
020    
021    /**
022     * The persistence interface for the ticket service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see TicketPersistenceImpl
030     * @see TicketUtil
031     * @generated
032     */
033    @ProviderType
034    public interface TicketPersistence extends BasePersistence<Ticket> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link TicketUtil} to access the ticket persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns the ticket where key = &#63; or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found.
043            *
044            * @param key the key
045            * @return the matching ticket
046            * @throws com.liferay.portal.NoSuchTicketException if a matching ticket could not be found
047            * @throws SystemException if a system exception occurred
048            */
049            public com.liferay.portal.model.Ticket findByKey(java.lang.String key)
050                    throws com.liferay.portal.NoSuchTicketException,
051                            com.liferay.portal.kernel.exception.SystemException;
052    
053            /**
054            * Returns the ticket where key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
055            *
056            * @param key the key
057            * @return the matching ticket, or <code>null</code> if a matching ticket could not be found
058            * @throws SystemException if a system exception occurred
059            */
060            public com.liferay.portal.model.Ticket fetchByKey(java.lang.String key)
061                    throws com.liferay.portal.kernel.exception.SystemException;
062    
063            /**
064            * Returns the ticket where key = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
065            *
066            * @param key the key
067            * @param retrieveFromCache whether to use the finder cache
068            * @return the matching ticket, or <code>null</code> if a matching ticket could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portal.model.Ticket fetchByKey(java.lang.String key,
072                    boolean retrieveFromCache)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Removes the ticket where key = &#63; from the database.
077            *
078            * @param key the key
079            * @return the ticket that was removed
080            * @throws SystemException if a system exception occurred
081            */
082            public com.liferay.portal.model.Ticket removeByKey(java.lang.String key)
083                    throws com.liferay.portal.NoSuchTicketException,
084                            com.liferay.portal.kernel.exception.SystemException;
085    
086            /**
087            * Returns the number of tickets where key = &#63;.
088            *
089            * @param key the key
090            * @return the number of matching tickets
091            * @throws SystemException if a system exception occurred
092            */
093            public int countByKey(java.lang.String key)
094                    throws com.liferay.portal.kernel.exception.SystemException;
095    
096            /**
097            * Returns all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
098            *
099            * @param classNameId the class name ID
100            * @param classPK the class p k
101            * @param type the type
102            * @return the matching tickets
103            * @throws SystemException if a system exception occurred
104            */
105            public java.util.List<com.liferay.portal.model.Ticket> findByC_C_T(
106                    long classNameId, long classPK, int type)
107                    throws com.liferay.portal.kernel.exception.SystemException;
108    
109            /**
110            * Returns a range of all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
111            *
112            * <p>
113            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TicketModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
114            * </p>
115            *
116            * @param classNameId the class name ID
117            * @param classPK the class p k
118            * @param type the type
119            * @param start the lower bound of the range of tickets
120            * @param end the upper bound of the range of tickets (not inclusive)
121            * @return the range of matching tickets
122            * @throws SystemException if a system exception occurred
123            */
124            public java.util.List<com.liferay.portal.model.Ticket> findByC_C_T(
125                    long classNameId, long classPK, int type, int start, int end)
126                    throws com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns an ordered range of all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
130            *
131            * <p>
132            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TicketModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
133            * </p>
134            *
135            * @param classNameId the class name ID
136            * @param classPK the class p k
137            * @param type the type
138            * @param start the lower bound of the range of tickets
139            * @param end the upper bound of the range of tickets (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching tickets
142            * @throws SystemException if a system exception occurred
143            */
144            public java.util.List<com.liferay.portal.model.Ticket> findByC_C_T(
145                    long classNameId, long classPK, int type, int start, int end,
146                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147                    throws com.liferay.portal.kernel.exception.SystemException;
148    
149            /**
150            * Returns the first ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
151            *
152            * @param classNameId the class name ID
153            * @param classPK the class p k
154            * @param type the type
155            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
156            * @return the first matching ticket
157            * @throws com.liferay.portal.NoSuchTicketException if a matching ticket could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public com.liferay.portal.model.Ticket findByC_C_T_First(long classNameId,
161                    long classPK, int type,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.NoSuchTicketException,
164                            com.liferay.portal.kernel.exception.SystemException;
165    
166            /**
167            * Returns the first ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
168            *
169            * @param classNameId the class name ID
170            * @param classPK the class p k
171            * @param type the type
172            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
173            * @return the first matching ticket, or <code>null</code> if a matching ticket could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portal.model.Ticket fetchByC_C_T_First(
177                    long classNameId, long classPK, int type,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.kernel.exception.SystemException;
180    
181            /**
182            * Returns the last ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
183            *
184            * @param classNameId the class name ID
185            * @param classPK the class p k
186            * @param type the type
187            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
188            * @return the last matching ticket
189            * @throws com.liferay.portal.NoSuchTicketException if a matching ticket could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public com.liferay.portal.model.Ticket findByC_C_T_Last(long classNameId,
193                    long classPK, int type,
194                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195                    throws com.liferay.portal.NoSuchTicketException,
196                            com.liferay.portal.kernel.exception.SystemException;
197    
198            /**
199            * Returns the last ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
200            *
201            * @param classNameId the class name ID
202            * @param classPK the class p k
203            * @param type the type
204            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
205            * @return the last matching ticket, or <code>null</code> if a matching ticket could not be found
206            * @throws SystemException if a system exception occurred
207            */
208            public com.liferay.portal.model.Ticket fetchByC_C_T_Last(long classNameId,
209                    long classPK, int type,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Returns the tickets before and after the current ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
215            *
216            * @param ticketId the primary key of the current ticket
217            * @param classNameId the class name ID
218            * @param classPK the class p k
219            * @param type the type
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the previous, current, and next ticket
222            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
223            * @throws SystemException if a system exception occurred
224            */
225            public com.liferay.portal.model.Ticket[] findByC_C_T_PrevAndNext(
226                    long ticketId, long classNameId, long classPK, int type,
227                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228                    throws com.liferay.portal.NoSuchTicketException,
229                            com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Removes all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63; from the database.
233            *
234            * @param classNameId the class name ID
235            * @param classPK the class p k
236            * @param type the type
237            * @throws SystemException if a system exception occurred
238            */
239            public void removeByC_C_T(long classNameId, long classPK, int type)
240                    throws com.liferay.portal.kernel.exception.SystemException;
241    
242            /**
243            * Returns the number of tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
244            *
245            * @param classNameId the class name ID
246            * @param classPK the class p k
247            * @param type the type
248            * @return the number of matching tickets
249            * @throws SystemException if a system exception occurred
250            */
251            public int countByC_C_T(long classNameId, long classPK, int type)
252                    throws com.liferay.portal.kernel.exception.SystemException;
253    
254            /**
255            * Caches the ticket in the entity cache if it is enabled.
256            *
257            * @param ticket the ticket
258            */
259            public void cacheResult(com.liferay.portal.model.Ticket ticket);
260    
261            /**
262            * Caches the tickets in the entity cache if it is enabled.
263            *
264            * @param tickets the tickets
265            */
266            public void cacheResult(
267                    java.util.List<com.liferay.portal.model.Ticket> tickets);
268    
269            /**
270            * Creates a new ticket with the primary key. Does not add the ticket to the database.
271            *
272            * @param ticketId the primary key for the new ticket
273            * @return the new ticket
274            */
275            public com.liferay.portal.model.Ticket create(long ticketId);
276    
277            /**
278            * Removes the ticket with the primary key from the database. Also notifies the appropriate model listeners.
279            *
280            * @param ticketId the primary key of the ticket
281            * @return the ticket that was removed
282            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
283            * @throws SystemException if a system exception occurred
284            */
285            public com.liferay.portal.model.Ticket remove(long ticketId)
286                    throws com.liferay.portal.NoSuchTicketException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            public com.liferay.portal.model.Ticket updateImpl(
290                    com.liferay.portal.model.Ticket ticket)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Returns the ticket with the primary key or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found.
295            *
296            * @param ticketId the primary key of the ticket
297            * @return the ticket
298            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public com.liferay.portal.model.Ticket findByPrimaryKey(long ticketId)
302                    throws com.liferay.portal.NoSuchTicketException,
303                            com.liferay.portal.kernel.exception.SystemException;
304    
305            /**
306            * Returns the ticket with the primary key or returns <code>null</code> if it could not be found.
307            *
308            * @param ticketId the primary key of the ticket
309            * @return the ticket, or <code>null</code> if a ticket with the primary key could not be found
310            * @throws SystemException if a system exception occurred
311            */
312            public com.liferay.portal.model.Ticket fetchByPrimaryKey(long ticketId)
313                    throws com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Returns all the tickets.
317            *
318            * @return the tickets
319            * @throws SystemException if a system exception occurred
320            */
321            public java.util.List<com.liferay.portal.model.Ticket> findAll()
322                    throws com.liferay.portal.kernel.exception.SystemException;
323    
324            /**
325            * Returns a range of all the tickets.
326            *
327            * <p>
328            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TicketModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
329            * </p>
330            *
331            * @param start the lower bound of the range of tickets
332            * @param end the upper bound of the range of tickets (not inclusive)
333            * @return the range of tickets
334            * @throws SystemException if a system exception occurred
335            */
336            public java.util.List<com.liferay.portal.model.Ticket> findAll(int start,
337                    int end) throws com.liferay.portal.kernel.exception.SystemException;
338    
339            /**
340            * Returns an ordered range of all the tickets.
341            *
342            * <p>
343            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TicketModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
344            * </p>
345            *
346            * @param start the lower bound of the range of tickets
347            * @param end the upper bound of the range of tickets (not inclusive)
348            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
349            * @return the ordered range of tickets
350            * @throws SystemException if a system exception occurred
351            */
352            public java.util.List<com.liferay.portal.model.Ticket> findAll(int start,
353                    int end,
354                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
355                    throws com.liferay.portal.kernel.exception.SystemException;
356    
357            /**
358            * Removes all the tickets from the database.
359            *
360            * @throws SystemException if a system exception occurred
361            */
362            public void removeAll()
363                    throws com.liferay.portal.kernel.exception.SystemException;
364    
365            /**
366            * Returns the number of tickets.
367            *
368            * @return the number of tickets
369            * @throws SystemException if a system exception occurred
370            */
371            public int countAll()
372                    throws com.liferay.portal.kernel.exception.SystemException;
373    }