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