001    /**
002     * Copyright (c) 2000-present 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 com.liferay.portal.service.persistence.impl.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 NoSuchTicketException} if it could not be found.
043            *
044            * @param key the key
045            * @return the matching ticket
046            * @throws NoSuchTicketException if a matching ticket could not be found
047            */
048            public Ticket findByKey(java.lang.String key)
049                    throws com.liferay.portal.NoSuchTicketException;
050    
051            /**
052            * Returns the ticket where key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
053            *
054            * @param key the key
055            * @return the matching ticket, or <code>null</code> if a matching ticket could not be found
056            */
057            public Ticket fetchByKey(java.lang.String key);
058    
059            /**
060            * Returns the ticket where key = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
061            *
062            * @param key the key
063            * @param retrieveFromCache whether to use the finder cache
064            * @return the matching ticket, or <code>null</code> if a matching ticket could not be found
065            */
066            public Ticket fetchByKey(java.lang.String key, boolean retrieveFromCache);
067    
068            /**
069            * Removes the ticket where key = &#63; from the database.
070            *
071            * @param key the key
072            * @return the ticket that was removed
073            */
074            public Ticket removeByKey(java.lang.String key)
075                    throws com.liferay.portal.NoSuchTicketException;
076    
077            /**
078            * Returns the number of tickets where key = &#63;.
079            *
080            * @param key the key
081            * @return the number of matching tickets
082            */
083            public int countByKey(java.lang.String key);
084    
085            /**
086            * Returns all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
087            *
088            * @param classNameId the class name ID
089            * @param classPK the class p k
090            * @param type the type
091            * @return the matching tickets
092            */
093            public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK,
094                    int type);
095    
096            /**
097            * Returns a range of all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
098            *
099            * <p>
100            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
101            * </p>
102            *
103            * @param classNameId the class name ID
104            * @param classPK the class p k
105            * @param type the type
106            * @param start the lower bound of the range of tickets
107            * @param end the upper bound of the range of tickets (not inclusive)
108            * @return the range of matching tickets
109            */
110            public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK,
111                    int type, int start, int end);
112    
113            /**
114            * Returns an ordered range of all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
115            *
116            * <p>
117            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
118            * </p>
119            *
120            * @param classNameId the class name ID
121            * @param classPK the class p k
122            * @param type the type
123            * @param start the lower bound of the range of tickets
124            * @param end the upper bound of the range of tickets (not inclusive)
125            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
126            * @return the ordered range of matching tickets
127            */
128            public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK,
129                    int type, int start, int end,
130                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator);
131    
132            /**
133            * Returns the first ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
134            *
135            * @param classNameId the class name ID
136            * @param classPK the class p k
137            * @param type the type
138            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
139            * @return the first matching ticket
140            * @throws NoSuchTicketException if a matching ticket could not be found
141            */
142            public Ticket findByC_C_T_First(long classNameId, long classPK, int type,
143                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator)
144                    throws com.liferay.portal.NoSuchTicketException;
145    
146            /**
147            * Returns the first ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
148            *
149            * @param classNameId the class name ID
150            * @param classPK the class p k
151            * @param type the type
152            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
153            * @return the first matching ticket, or <code>null</code> if a matching ticket could not be found
154            */
155            public Ticket fetchByC_C_T_First(long classNameId, long classPK, int type,
156                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator);
157    
158            /**
159            * Returns the last ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
160            *
161            * @param classNameId the class name ID
162            * @param classPK the class p k
163            * @param type the type
164            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
165            * @return the last matching ticket
166            * @throws NoSuchTicketException if a matching ticket could not be found
167            */
168            public Ticket findByC_C_T_Last(long classNameId, long classPK, int type,
169                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator)
170                    throws com.liferay.portal.NoSuchTicketException;
171    
172            /**
173            * Returns the last ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
174            *
175            * @param classNameId the class name ID
176            * @param classPK the class p k
177            * @param type the type
178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
179            * @return the last matching ticket, or <code>null</code> if a matching ticket could not be found
180            */
181            public Ticket fetchByC_C_T_Last(long classNameId, long classPK, int type,
182                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator);
183    
184            /**
185            * Returns the tickets before and after the current ticket in the ordered set where classNameId = &#63; and classPK = &#63; and type = &#63;.
186            *
187            * @param ticketId the primary key of the current ticket
188            * @param classNameId the class name ID
189            * @param classPK the class p k
190            * @param type the type
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the previous, current, and next ticket
193            * @throws NoSuchTicketException if a ticket with the primary key could not be found
194            */
195            public Ticket[] findByC_C_T_PrevAndNext(long ticketId, long classNameId,
196                    long classPK, int type,
197                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator)
198                    throws com.liferay.portal.NoSuchTicketException;
199    
200            /**
201            * Removes all the tickets where classNameId = &#63; and classPK = &#63; and type = &#63; from the database.
202            *
203            * @param classNameId the class name ID
204            * @param classPK the class p k
205            * @param type the type
206            */
207            public void removeByC_C_T(long classNameId, long classPK, int type);
208    
209            /**
210            * Returns the number of tickets where classNameId = &#63; and classPK = &#63; and type = &#63;.
211            *
212            * @param classNameId the class name ID
213            * @param classPK the class p k
214            * @param type the type
215            * @return the number of matching tickets
216            */
217            public int countByC_C_T(long classNameId, long classPK, int type);
218    
219            /**
220            * Caches the ticket in the entity cache if it is enabled.
221            *
222            * @param ticket the ticket
223            */
224            public void cacheResult(Ticket ticket);
225    
226            /**
227            * Caches the tickets in the entity cache if it is enabled.
228            *
229            * @param tickets the tickets
230            */
231            public void cacheResult(java.util.List<Ticket> tickets);
232    
233            /**
234            * Creates a new ticket with the primary key. Does not add the ticket to the database.
235            *
236            * @param ticketId the primary key for the new ticket
237            * @return the new ticket
238            */
239            public Ticket create(long ticketId);
240    
241            /**
242            * Removes the ticket with the primary key from the database. Also notifies the appropriate model listeners.
243            *
244            * @param ticketId the primary key of the ticket
245            * @return the ticket that was removed
246            * @throws NoSuchTicketException if a ticket with the primary key could not be found
247            */
248            public Ticket remove(long ticketId)
249                    throws com.liferay.portal.NoSuchTicketException;
250    
251            public Ticket updateImpl(Ticket ticket);
252    
253            /**
254            * Returns the ticket with the primary key or throws a {@link NoSuchTicketException} if it could not be found.
255            *
256            * @param ticketId the primary key of the ticket
257            * @return the ticket
258            * @throws NoSuchTicketException if a ticket with the primary key could not be found
259            */
260            public Ticket findByPrimaryKey(long ticketId)
261                    throws com.liferay.portal.NoSuchTicketException;
262    
263            /**
264            * Returns the ticket with the primary key or returns <code>null</code> if it could not be found.
265            *
266            * @param ticketId the primary key of the ticket
267            * @return the ticket, or <code>null</code> if a ticket with the primary key could not be found
268            */
269            public Ticket fetchByPrimaryKey(long ticketId);
270    
271            @Override
272            public java.util.Map<java.io.Serializable, Ticket> fetchByPrimaryKeys(
273                    java.util.Set<java.io.Serializable> primaryKeys);
274    
275            /**
276            * Returns all the tickets.
277            *
278            * @return the tickets
279            */
280            public java.util.List<Ticket> findAll();
281    
282            /**
283            * Returns a range of all the tickets.
284            *
285            * <p>
286            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
287            * </p>
288            *
289            * @param start the lower bound of the range of tickets
290            * @param end the upper bound of the range of tickets (not inclusive)
291            * @return the range of tickets
292            */
293            public java.util.List<Ticket> findAll(int start, int end);
294    
295            /**
296            * Returns an ordered range of all the tickets.
297            *
298            * <p>
299            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
300            * </p>
301            *
302            * @param start the lower bound of the range of tickets
303            * @param end the upper bound of the range of tickets (not inclusive)
304            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
305            * @return the ordered range of tickets
306            */
307            public java.util.List<Ticket> findAll(int start, int end,
308                    com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator);
309    
310            /**
311            * Removes all the tickets from the database.
312            */
313            public void removeAll();
314    
315            /**
316            * Returns the number of tickets.
317            *
318            * @return the number of tickets
319            */
320            public int countAll();
321    }