001 /** 002 * Copyright (c) 2000-2011 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.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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns the ticket where key = ? or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found. 102 * 103 * @param key the key 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 * Returns 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 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 * Returns 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 126 * @param retrieveFromCache whether to use the finder cache 127 * @return the matching ticket, or <code>null</code> if a matching ticket could not be found 128 * @throws SystemException if a system exception occurred 129 */ 130 public com.liferay.portal.model.Ticket fetchByKey(java.lang.String key, 131 boolean retrieveFromCache) 132 throws com.liferay.portal.kernel.exception.SystemException; 133 134 /** 135 * Returns all the tickets. 136 * 137 * @return the tickets 138 * @throws SystemException if a system exception occurred 139 */ 140 public java.util.List<com.liferay.portal.model.Ticket> findAll() 141 throws com.liferay.portal.kernel.exception.SystemException; 142 143 /** 144 * Returns a range of all the tickets. 145 * 146 * <p> 147 * 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. 148 * </p> 149 * 150 * @param start the lower bound of the range of tickets 151 * @param end the upper bound of the range of tickets (not inclusive) 152 * @return the range of tickets 153 * @throws SystemException if a system exception occurred 154 */ 155 public java.util.List<com.liferay.portal.model.Ticket> findAll(int start, 156 int end) throws com.liferay.portal.kernel.exception.SystemException; 157 158 /** 159 * Returns an ordered range of all the tickets. 160 * 161 * <p> 162 * 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. 163 * </p> 164 * 165 * @param start the lower bound of the range of tickets 166 * @param end the upper bound of the range of tickets (not inclusive) 167 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 168 * @return the ordered range of tickets 169 * @throws SystemException if a system exception occurred 170 */ 171 public java.util.List<com.liferay.portal.model.Ticket> findAll(int start, 172 int end, 173 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 /** 177 * Removes the ticket where key = ? from the database. 178 * 179 * @param key the key 180 * @throws SystemException if a system exception occurred 181 */ 182 public void removeByKey(java.lang.String key) 183 throws com.liferay.portal.NoSuchTicketException, 184 com.liferay.portal.kernel.exception.SystemException; 185 186 /** 187 * Removes all the tickets from the database. 188 * 189 * @throws SystemException if a system exception occurred 190 */ 191 public void removeAll() 192 throws com.liferay.portal.kernel.exception.SystemException; 193 194 /** 195 * Returns the number of tickets where key = ?. 196 * 197 * @param key the key 198 * @return the number of matching tickets 199 * @throws SystemException if a system exception occurred 200 */ 201 public int countByKey(java.lang.String key) 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 213 public Ticket remove(Ticket ticket) throws SystemException; 214 }