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 com.liferay.portal.service.persistence.impl.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 NoSuchTicketException} if it could not be found. 043 * 044 * @param key the key 045 * @return the matching ticket 046 * @throws NoSuchTicketException if a matching ticket could not be found 047 */ 048 public Ticket findByKey(java.lang.String key) 049 throws com.liferay.portal.exception.NoSuchTicketException; 050 051 /** 052 * Returns the ticket where key = ? 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 Ticket fetchByKey(java.lang.String key); 058 059 /** 060 * Returns the ticket where key = ? 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 retrieve from the finder cache 064 * @return the matching ticket, or <code>null</code> if a matching ticket could not be found 065 */ 066 public Ticket fetchByKey(java.lang.String key, boolean retrieveFromCache); 067 068 /** 069 * Removes the ticket where key = ? from the database. 070 * 071 * @param key the key 072 * @return the ticket that was removed 073 */ 074 public Ticket removeByKey(java.lang.String key) 075 throws com.liferay.portal.exception.NoSuchTicketException; 076 077 /** 078 * Returns the number of tickets where key = ?. 079 * 080 * @param key the key 081 * @return the number of matching tickets 082 */ 083 public int countByKey(java.lang.String key); 084 085 /** 086 * Returns all the tickets where classNameId = ? and classPK = ? and type = ?. 087 * 088 * @param classNameId the class name ID 089 * @param classPK the class p k 090 * @param type the type 091 * @return the matching tickets 092 */ 093 public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK, 094 int type); 095 096 /** 097 * Returns a range of all the tickets where classNameId = ? and classPK = ? and type = ?. 098 * 099 * <p> 100 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 101 * </p> 102 * 103 * @param classNameId the class name ID 104 * @param classPK the class p k 105 * @param type the type 106 * @param start the lower bound of the range of tickets 107 * @param end the upper bound of the range of tickets (not inclusive) 108 * @return the range of matching tickets 109 */ 110 public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK, 111 int type, int start, int end); 112 113 /** 114 * Returns an ordered range of all the tickets where classNameId = ? and classPK = ? and type = ?. 115 * 116 * <p> 117 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 118 * </p> 119 * 120 * @param classNameId the class name ID 121 * @param classPK the class p k 122 * @param type the type 123 * @param start the lower bound of the range of tickets 124 * @param end the upper bound of the range of tickets (not inclusive) 125 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 126 * @return the ordered range of matching tickets 127 */ 128 public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK, 129 int type, int start, int end, 130 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator); 131 132 /** 133 * Returns an ordered range of all the tickets where classNameId = ? and classPK = ? and type = ?. 134 * 135 * <p> 136 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 137 * </p> 138 * 139 * @param classNameId the class name ID 140 * @param classPK the class p k 141 * @param type the type 142 * @param start the lower bound of the range of tickets 143 * @param end the upper bound of the range of tickets (not inclusive) 144 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 145 * @param retrieveFromCache whether to retrieve from the finder cache 146 * @return the ordered range of matching tickets 147 */ 148 public java.util.List<Ticket> findByC_C_T(long classNameId, long classPK, 149 int type, int start, int end, 150 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator, 151 boolean retrieveFromCache); 152 153 /** 154 * Returns the first ticket in the ordered set where classNameId = ? and classPK = ? and type = ?. 155 * 156 * @param classNameId the class name ID 157 * @param classPK the class p k 158 * @param type the type 159 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 160 * @return the first matching ticket 161 * @throws NoSuchTicketException if a matching ticket could not be found 162 */ 163 public Ticket findByC_C_T_First(long classNameId, long classPK, int type, 164 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator) 165 throws com.liferay.portal.exception.NoSuchTicketException; 166 167 /** 168 * Returns the first ticket in the ordered set where classNameId = ? and classPK = ? and type = ?. 169 * 170 * @param classNameId the class name ID 171 * @param classPK the class p k 172 * @param type the type 173 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 174 * @return the first matching ticket, or <code>null</code> if a matching ticket could not be found 175 */ 176 public Ticket fetchByC_C_T_First(long classNameId, long classPK, int type, 177 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator); 178 179 /** 180 * Returns the last ticket in the ordered set where classNameId = ? and classPK = ? and type = ?. 181 * 182 * @param classNameId the class name ID 183 * @param classPK the class p k 184 * @param type the type 185 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 186 * @return the last matching ticket 187 * @throws NoSuchTicketException if a matching ticket could not be found 188 */ 189 public Ticket findByC_C_T_Last(long classNameId, long classPK, int type, 190 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator) 191 throws com.liferay.portal.exception.NoSuchTicketException; 192 193 /** 194 * Returns the last ticket in the ordered set where classNameId = ? and classPK = ? and type = ?. 195 * 196 * @param classNameId the class name ID 197 * @param classPK the class p k 198 * @param type the type 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the last matching ticket, or <code>null</code> if a matching ticket could not be found 201 */ 202 public Ticket fetchByC_C_T_Last(long classNameId, long classPK, int type, 203 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator); 204 205 /** 206 * Returns the tickets before and after the current ticket in the ordered set where classNameId = ? and classPK = ? and type = ?. 207 * 208 * @param ticketId the primary key of the current ticket 209 * @param classNameId the class name ID 210 * @param classPK the class p k 211 * @param type the type 212 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 213 * @return the previous, current, and next ticket 214 * @throws NoSuchTicketException if a ticket with the primary key could not be found 215 */ 216 public Ticket[] findByC_C_T_PrevAndNext(long ticketId, long classNameId, 217 long classPK, int type, 218 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator) 219 throws com.liferay.portal.exception.NoSuchTicketException; 220 221 /** 222 * Removes all the tickets where classNameId = ? and classPK = ? and type = ? from the database. 223 * 224 * @param classNameId the class name ID 225 * @param classPK the class p k 226 * @param type the type 227 */ 228 public void removeByC_C_T(long classNameId, long classPK, int type); 229 230 /** 231 * Returns the number of tickets where classNameId = ? and classPK = ? and type = ?. 232 * 233 * @param classNameId the class name ID 234 * @param classPK the class p k 235 * @param type the type 236 * @return the number of matching tickets 237 */ 238 public int countByC_C_T(long classNameId, long classPK, int type); 239 240 /** 241 * Caches the ticket in the entity cache if it is enabled. 242 * 243 * @param ticket the ticket 244 */ 245 public void cacheResult(Ticket ticket); 246 247 /** 248 * Caches the tickets in the entity cache if it is enabled. 249 * 250 * @param tickets the tickets 251 */ 252 public void cacheResult(java.util.List<Ticket> tickets); 253 254 /** 255 * Creates a new ticket with the primary key. Does not add the ticket to the database. 256 * 257 * @param ticketId the primary key for the new ticket 258 * @return the new ticket 259 */ 260 public Ticket create(long ticketId); 261 262 /** 263 * Removes the ticket with the primary key from the database. Also notifies the appropriate model listeners. 264 * 265 * @param ticketId the primary key of the ticket 266 * @return the ticket that was removed 267 * @throws NoSuchTicketException if a ticket with the primary key could not be found 268 */ 269 public Ticket remove(long ticketId) 270 throws com.liferay.portal.exception.NoSuchTicketException; 271 272 public Ticket updateImpl(Ticket ticket); 273 274 /** 275 * Returns the ticket with the primary key or throws a {@link NoSuchTicketException} if it could not be found. 276 * 277 * @param ticketId the primary key of the ticket 278 * @return the ticket 279 * @throws NoSuchTicketException if a ticket with the primary key could not be found 280 */ 281 public Ticket findByPrimaryKey(long ticketId) 282 throws com.liferay.portal.exception.NoSuchTicketException; 283 284 /** 285 * Returns the ticket with the primary key or returns <code>null</code> if it could not be found. 286 * 287 * @param ticketId the primary key of the ticket 288 * @return the ticket, or <code>null</code> if a ticket with the primary key could not be found 289 */ 290 public Ticket fetchByPrimaryKey(long ticketId); 291 292 @Override 293 public java.util.Map<java.io.Serializable, Ticket> fetchByPrimaryKeys( 294 java.util.Set<java.io.Serializable> primaryKeys); 295 296 /** 297 * Returns all the tickets. 298 * 299 * @return the tickets 300 */ 301 public java.util.List<Ticket> findAll(); 302 303 /** 304 * Returns a range of all the tickets. 305 * 306 * <p> 307 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 308 * </p> 309 * 310 * @param start the lower bound of the range of tickets 311 * @param end the upper bound of the range of tickets (not inclusive) 312 * @return the range of tickets 313 */ 314 public java.util.List<Ticket> findAll(int start, int end); 315 316 /** 317 * Returns an ordered range of all the tickets. 318 * 319 * <p> 320 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 321 * </p> 322 * 323 * @param start the lower bound of the range of tickets 324 * @param end the upper bound of the range of tickets (not inclusive) 325 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 326 * @return the ordered range of tickets 327 */ 328 public java.util.List<Ticket> findAll(int start, int end, 329 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator); 330 331 /** 332 * Returns an ordered range of all the tickets. 333 * 334 * <p> 335 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 336 * </p> 337 * 338 * @param start the lower bound of the range of tickets 339 * @param end the upper bound of the range of tickets (not inclusive) 340 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 341 * @param retrieveFromCache whether to retrieve from the finder cache 342 * @return the ordered range of tickets 343 */ 344 public java.util.List<Ticket> findAll(int start, int end, 345 com.liferay.portal.kernel.util.OrderByComparator<Ticket> orderByComparator, 346 boolean retrieveFromCache); 347 348 /** 349 * Removes all the tickets from the database. 350 */ 351 public void removeAll(); 352 353 /** 354 * Returns the number of tickets. 355 * 356 * @return the number of tickets 357 */ 358 public int countAll(); 359 360 @Override 361 public java.util.Set<java.lang.String> getBadColumnNames(); 362 }