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