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 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 * Caches the ticket in the entity cache if it is enabled. 040 * 041 * @param ticket the ticket 042 */ 043 public void cacheResult(com.liferay.portal.model.Ticket ticket); 044 045 /** 046 * Caches the tickets in the entity cache if it is enabled. 047 * 048 * @param tickets the tickets 049 */ 050 public void cacheResult( 051 java.util.List<com.liferay.portal.model.Ticket> tickets); 052 053 /** 054 * Creates a new ticket with the primary key. Does not add the ticket to the database. 055 * 056 * @param ticketId the primary key for the new ticket 057 * @return the new ticket 058 */ 059 public com.liferay.portal.model.Ticket create(long ticketId); 060 061 /** 062 * Removes the ticket with the primary key from the database. Also notifies the appropriate model listeners. 063 * 064 * @param ticketId the primary key of the ticket 065 * @return the ticket that was removed 066 * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found 067 * @throws SystemException if a system exception occurred 068 */ 069 public com.liferay.portal.model.Ticket remove(long ticketId) 070 throws com.liferay.portal.NoSuchTicketException, 071 com.liferay.portal.kernel.exception.SystemException; 072 073 public com.liferay.portal.model.Ticket updateImpl( 074 com.liferay.portal.model.Ticket ticket, boolean merge) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Returns the ticket with the primary key or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found. 079 * 080 * @param ticketId the primary key of the ticket 081 * @return the ticket 082 * @throws com.liferay.portal.NoSuchTicketException if a ticket with the primary key could not be found 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portal.model.Ticket findByPrimaryKey(long ticketId) 086 throws com.liferay.portal.NoSuchTicketException, 087 com.liferay.portal.kernel.exception.SystemException; 088 089 /** 090 * Returns the ticket with the primary key or returns <code>null</code> if it could not be found. 091 * 092 * @param ticketId the primary key of the ticket 093 * @return the ticket, or <code>null</code> if a ticket with the primary key could not be found 094 * @throws SystemException if a system exception occurred 095 */ 096 public com.liferay.portal.model.Ticket fetchByPrimaryKey(long ticketId) 097 throws com.liferay.portal.kernel.exception.SystemException; 098 099 /** 100 * Returns the ticket where key = ? or throws a {@link com.liferay.portal.NoSuchTicketException} if it could not be found. 101 * 102 * @param key the key 103 * @return the matching ticket 104 * @throws com.liferay.portal.NoSuchTicketException if a matching ticket could not be found 105 * @throws SystemException if a system exception occurred 106 */ 107 public com.liferay.portal.model.Ticket findByKey(java.lang.String key) 108 throws com.liferay.portal.NoSuchTicketException, 109 com.liferay.portal.kernel.exception.SystemException; 110 111 /** 112 * Returns the ticket where key = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 113 * 114 * @param key the key 115 * @return the matching ticket, or <code>null</code> if a matching ticket could not be found 116 * @throws SystemException if a system exception occurred 117 */ 118 public com.liferay.portal.model.Ticket fetchByKey(java.lang.String key) 119 throws com.liferay.portal.kernel.exception.SystemException; 120 121 /** 122 * Returns the ticket where key = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 123 * 124 * @param key the key 125 * @param retrieveFromCache whether to use the finder cache 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 * Returns 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 * Returns 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 150 * @param end the upper bound of the range of tickets (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 * Returns 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 165 * @param end the upper bound of the range of tickets (not inclusive) 166 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 179 * @return the ticket that was removed 180 * @throws SystemException if a system exception occurred 181 */ 182 public com.liferay.portal.model.Ticket 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 }