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