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 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            */
048            public com.liferay.portal.model.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 com.liferay.portal.model.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 com.liferay.portal.model.Ticket fetchByKey(java.lang.String key,
067                    boolean retrieveFromCache);
068    
069            /**
070            * Removes the ticket where key = &#63; from the database.
071            *
072            * @param key the key
073            * @return the ticket that was removed
074            */
075            public com.liferay.portal.model.Ticket removeByKey(java.lang.String key)
076                    throws com.liferay.portal.NoSuchTicketException;
077    
078            /**
079            * Returns the number of tickets where key = &#63;.
080            *
081            * @param key the key
082            * @return the number of matching tickets
083            */
084            public int countByKey(java.lang.String key);
085    
086            /**
087            * Caches the ticket in the entity cache if it is enabled.
088            *
089            * @param ticket the ticket
090            */
091            public void cacheResult(com.liferay.portal.model.Ticket ticket);
092    
093            /**
094            * Caches the tickets in the entity cache if it is enabled.
095            *
096            * @param tickets the tickets
097            */
098            public void cacheResult(
099                    java.util.List<com.liferay.portal.model.Ticket> tickets);
100    
101            /**
102            * Creates a new ticket with the primary key. Does not add the ticket to the database.
103            *
104            * @param ticketId the primary key for the new ticket
105            * @return the new ticket
106            */
107            public com.liferay.portal.model.Ticket create(long ticketId);
108    
109            /**
110            * Removes the ticket with the primary key from the database. Also notifies the appropriate model listeners.
111            *
112            * @param ticketId the primary key of the ticket
113            * @return the ticket that was removed
114            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
115            */
116            public com.liferay.portal.model.Ticket remove(long ticketId)
117                    throws com.liferay.portal.NoSuchTicketException;
118    
119            public com.liferay.portal.model.Ticket updateImpl(
120                    com.liferay.portal.model.Ticket ticket);
121    
122            /**
123            * Returns the ticket with the primary key or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found.
124            *
125            * @param ticketId the primary key of the ticket
126            * @return the ticket
127            * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found
128            */
129            public com.liferay.portal.model.Ticket findByPrimaryKey(long ticketId)
130                    throws com.liferay.portal.NoSuchTicketException;
131    
132            /**
133            * Returns the ticket with the primary key or returns <code>null</code> if it could not be found.
134            *
135            * @param ticketId the primary key of the ticket
136            * @return the ticket, or <code>null</code> if a ticket with the primary key could not be found
137            */
138            public com.liferay.portal.model.Ticket fetchByPrimaryKey(long ticketId);
139    
140            @Override
141            public java.util.Map<java.io.Serializable, com.liferay.portal.model.Ticket> fetchByPrimaryKeys(
142                    java.util.Set<java.io.Serializable> primaryKeys);
143    
144            /**
145            * Returns all the tickets.
146            *
147            * @return the tickets
148            */
149            public java.util.List<com.liferay.portal.model.Ticket> findAll();
150    
151            /**
152            * Returns a range of all the tickets.
153            *
154            * <p>
155            * 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.
156            * </p>
157            *
158            * @param start the lower bound of the range of tickets
159            * @param end the upper bound of the range of tickets (not inclusive)
160            * @return the range of tickets
161            */
162            public java.util.List<com.liferay.portal.model.Ticket> findAll(int start,
163                    int end);
164    
165            /**
166            * Returns an ordered range of all the tickets.
167            *
168            * <p>
169            * 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.
170            * </p>
171            *
172            * @param start the lower bound of the range of tickets
173            * @param end the upper bound of the range of tickets (not inclusive)
174            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
175            * @return the ordered range of tickets
176            */
177            public java.util.List<com.liferay.portal.model.Ticket> findAll(int start,
178                    int end,
179                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Ticket> orderByComparator);
180    
181            /**
182            * Removes all the tickets from the database.
183            */
184            public void removeAll();
185    
186            /**
187            * Returns the number of tickets.
188            *
189            * @return the number of tickets
190            */
191            public int countAll();
192    }