001    /**
002     * Copyright (c) 2000-2010 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 com.liferay.portal.model.Ticket;
018    
019    /**
020     * The persistence interface for the ticket service.
021     *
022     * <p>
023     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see TicketPersistenceImpl
028     * @see TicketUtil
029     * @generated
030     */
031    public interface TicketPersistence extends BasePersistence<Ticket> {
032            /**
033            * Caches the ticket in the entity cache if it is enabled.
034            *
035            * @param ticket the ticket to cache
036            */
037            public void cacheResult(com.liferay.portal.model.Ticket ticket);
038    
039            /**
040            * Caches the tickets in the entity cache if it is enabled.
041            *
042            * @param tickets the tickets to cache
043            */
044            public void cacheResult(
045                    java.util.List<com.liferay.portal.model.Ticket> tickets);
046    
047            /**
048            * Creates a new ticket with the primary key.
049            *
050            * @param ticketId the primary key for the new ticket
051            * @return the new ticket
052            */
053            public com.liferay.portal.model.Ticket create(long ticketId);
054    
055            /**
056            * Removes the ticket with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param ticketId the primary key of the ticket to remove
059            * @return the ticket that was removed
060            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.Ticket remove(long ticketId)
064                    throws com.liferay.portal.NoSuchTicketException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public com.liferay.portal.model.Ticket updateImpl(
068                    com.liferay.portal.model.Ticket ticket, boolean merge)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Finds the ticket with the primary key or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found.
073            *
074            * @param ticketId the primary key of the ticket to find
075            * @return the ticket
076            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
077            * @throws SystemException if a system exception occurred
078            */
079            public com.liferay.portal.model.Ticket findByPrimaryKey(long ticketId)
080                    throws com.liferay.portal.NoSuchTicketException,
081                            com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * Finds the ticket with the primary key or returns <code>null</code> if it could not be found.
085            *
086            * @param ticketId the primary key of the ticket to find
087            * @return the ticket, or <code>null</code> if a ticket with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.Ticket fetchByPrimaryKey(long ticketId)
091                    throws com.liferay.portal.kernel.exception.SystemException;
092    
093            /**
094            * Finds the ticket where key = &#63; or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found.
095            *
096            * @param key the key to search with
097            * @return the matching ticket
098            * @throws com.liferay.portal.NoSuchTicketException if a matching ticket could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portal.model.Ticket findByKey(java.lang.String key)
102                    throws com.liferay.portal.NoSuchTicketException,
103                            com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Finds the ticket where key = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
107            *
108            * @param key the key to search with
109            * @return the matching ticket, or <code>null</code> if a matching ticket could not be found
110            * @throws SystemException if a system exception occurred
111            */
112            public com.liferay.portal.model.Ticket fetchByKey(java.lang.String key)
113                    throws com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Finds the ticket where key = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
117            *
118            * @param key the key to search with
119            * @return the matching ticket, or <code>null</code> if a matching ticket could not be found
120            * @throws SystemException if a system exception occurred
121            */
122            public com.liferay.portal.model.Ticket fetchByKey(java.lang.String key,
123                    boolean retrieveFromCache)
124                    throws com.liferay.portal.kernel.exception.SystemException;
125    
126            /**
127            * Finds all the tickets.
128            *
129            * @return the tickets
130            * @throws SystemException if a system exception occurred
131            */
132            public java.util.List<com.liferay.portal.model.Ticket> findAll()
133                    throws com.liferay.portal.kernel.exception.SystemException;
134    
135            /**
136            * Finds a range of all the tickets.
137            *
138            * <p>
139            * 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.
140            * </p>
141            *
142            * @param start the lower bound of the range of tickets to return
143            * @param end the upper bound of the range of tickets to return (not inclusive)
144            * @return the range of tickets
145            * @throws SystemException if a system exception occurred
146            */
147            public java.util.List<com.liferay.portal.model.Ticket> findAll(int start,
148                    int end) throws com.liferay.portal.kernel.exception.SystemException;
149    
150            /**
151            * Finds an ordered range of all the tickets.
152            *
153            * <p>
154            * 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.
155            * </p>
156            *
157            * @param start the lower bound of the range of tickets to return
158            * @param end the upper bound of the range of tickets to return (not inclusive)
159            * @param orderByComparator the comparator to order the results by
160            * @return the ordered range of tickets
161            * @throws SystemException if a system exception occurred
162            */
163            public java.util.List<com.liferay.portal.model.Ticket> findAll(int start,
164                    int end,
165                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166                    throws com.liferay.portal.kernel.exception.SystemException;
167    
168            /**
169            * Removes the ticket where key = &#63; from the database.
170            *
171            * @param key the key to search with
172            * @throws SystemException if a system exception occurred
173            */
174            public void removeByKey(java.lang.String key)
175                    throws com.liferay.portal.NoSuchTicketException,
176                            com.liferay.portal.kernel.exception.SystemException;
177    
178            /**
179            * Removes all the tickets from the database.
180            *
181            * @throws SystemException if a system exception occurred
182            */
183            public void removeAll()
184                    throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Counts all the tickets where key = &#63;.
188            *
189            * @param key the key to search with
190            * @return the number of matching tickets
191            * @throws SystemException if a system exception occurred
192            */
193            public int countByKey(java.lang.String key)
194                    throws com.liferay.portal.kernel.exception.SystemException;
195    
196            /**
197            * Counts all the tickets.
198            *
199            * @return the number of tickets
200            * @throws SystemException if a system exception occurred
201            */
202            public int countAll()
203                    throws com.liferay.portal.kernel.exception.SystemException;
204    }