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