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.kernel.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for Ticket. This utility wraps 024 * {@link com.liferay.portal.service.impl.TicketLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see TicketLocalService 032 * @see com.liferay.portal.service.base.TicketLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.TicketLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class TicketLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.TicketLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static com.liferay.portal.kernel.model.Ticket addDistinctTicket( 044 long companyId, java.lang.String className, long classPK, int type, 045 java.lang.String extraInfo, java.util.Date expirationDate, 046 com.liferay.portal.kernel.service.ServiceContext serviceContext) { 047 return getService() 048 .addDistinctTicket(companyId, className, classPK, type, 049 extraInfo, expirationDate, serviceContext); 050 } 051 052 public static com.liferay.portal.kernel.model.Ticket addTicket( 053 long companyId, java.lang.String className, long classPK, int type, 054 java.lang.String extraInfo, java.util.Date expirationDate, 055 com.liferay.portal.kernel.service.ServiceContext serviceContext) { 056 return getService() 057 .addTicket(companyId, className, classPK, type, extraInfo, 058 expirationDate, serviceContext); 059 } 060 061 /** 062 * Adds the ticket to the database. Also notifies the appropriate model listeners. 063 * 064 * @param ticket the ticket 065 * @return the ticket that was added 066 */ 067 public static com.liferay.portal.kernel.model.Ticket addTicket( 068 com.liferay.portal.kernel.model.Ticket ticket) { 069 return getService().addTicket(ticket); 070 } 071 072 /** 073 * Creates a new ticket with the primary key. Does not add the ticket to the database. 074 * 075 * @param ticketId the primary key for the new ticket 076 * @return the new ticket 077 */ 078 public static com.liferay.portal.kernel.model.Ticket createTicket( 079 long ticketId) { 080 return getService().createTicket(ticketId); 081 } 082 083 /** 084 * @throws PortalException 085 */ 086 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 087 com.liferay.portal.kernel.model.PersistedModel persistedModel) 088 throws com.liferay.portal.kernel.exception.PortalException { 089 return getService().deletePersistedModel(persistedModel); 090 } 091 092 /** 093 * Deletes the ticket from the database. Also notifies the appropriate model listeners. 094 * 095 * @param ticket the ticket 096 * @return the ticket that was removed 097 */ 098 public static com.liferay.portal.kernel.model.Ticket deleteTicket( 099 com.liferay.portal.kernel.model.Ticket ticket) { 100 return getService().deleteTicket(ticket); 101 } 102 103 /** 104 * Deletes the ticket with the primary key from the database. Also notifies the appropriate model listeners. 105 * 106 * @param ticketId the primary key of the ticket 107 * @return the ticket that was removed 108 * @throws PortalException if a ticket with the primary key could not be found 109 */ 110 public static com.liferay.portal.kernel.model.Ticket deleteTicket( 111 long ticketId) 112 throws com.liferay.portal.kernel.exception.PortalException { 113 return getService().deleteTicket(ticketId); 114 } 115 116 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 117 return getService().dynamicQuery(); 118 } 119 120 /** 121 * Performs a dynamic query on the database and returns the matching rows. 122 * 123 * @param dynamicQuery the dynamic query 124 * @return the matching rows 125 */ 126 public static <T> java.util.List<T> dynamicQuery( 127 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 128 return getService().dynamicQuery(dynamicQuery); 129 } 130 131 /** 132 * Performs a dynamic query on the database and returns a range of the matching rows. 133 * 134 * <p> 135 * 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. 136 * </p> 137 * 138 * @param dynamicQuery the dynamic query 139 * @param start the lower bound of the range of model instances 140 * @param end the upper bound of the range of model instances (not inclusive) 141 * @return the range of matching rows 142 */ 143 public static <T> java.util.List<T> dynamicQuery( 144 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 145 int end) { 146 return getService().dynamicQuery(dynamicQuery, start, end); 147 } 148 149 /** 150 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 151 * 152 * <p> 153 * 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. 154 * </p> 155 * 156 * @param dynamicQuery the dynamic query 157 * @param start the lower bound of the range of model instances 158 * @param end the upper bound of the range of model instances (not inclusive) 159 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 160 * @return the ordered range of matching rows 161 */ 162 public static <T> java.util.List<T> dynamicQuery( 163 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 164 int end, 165 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 166 return getService() 167 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 168 } 169 170 /** 171 * Returns the number of rows matching the dynamic query. 172 * 173 * @param dynamicQuery the dynamic query 174 * @return the number of rows matching the dynamic query 175 */ 176 public static long dynamicQueryCount( 177 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 178 return getService().dynamicQueryCount(dynamicQuery); 179 } 180 181 /** 182 * Returns the number of rows matching the dynamic query. 183 * 184 * @param dynamicQuery the dynamic query 185 * @param projection the projection to apply to the query 186 * @return the number of rows matching the dynamic query 187 */ 188 public static long dynamicQueryCount( 189 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 190 com.liferay.portal.kernel.dao.orm.Projection projection) { 191 return getService().dynamicQueryCount(dynamicQuery, projection); 192 } 193 194 public static com.liferay.portal.kernel.model.Ticket fetchTicket( 195 java.lang.String key) { 196 return getService().fetchTicket(key); 197 } 198 199 public static com.liferay.portal.kernel.model.Ticket fetchTicket( 200 long ticketId) { 201 return getService().fetchTicket(ticketId); 202 } 203 204 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 205 return getService().getActionableDynamicQuery(); 206 } 207 208 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 209 return getService().getIndexableActionableDynamicQuery(); 210 } 211 212 /** 213 * Returns the OSGi service identifier. 214 * 215 * @return the OSGi service identifier 216 */ 217 public static java.lang.String getOSGiServiceIdentifier() { 218 return getService().getOSGiServiceIdentifier(); 219 } 220 221 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 222 java.io.Serializable primaryKeyObj) 223 throws com.liferay.portal.kernel.exception.PortalException { 224 return getService().getPersistedModel(primaryKeyObj); 225 } 226 227 public static com.liferay.portal.kernel.model.Ticket getTicket( 228 java.lang.String key) 229 throws com.liferay.portal.kernel.exception.PortalException { 230 return getService().getTicket(key); 231 } 232 233 /** 234 * Returns the ticket with the primary key. 235 * 236 * @param ticketId the primary key of the ticket 237 * @return the ticket 238 * @throws PortalException if a ticket with the primary key could not be found 239 */ 240 public static com.liferay.portal.kernel.model.Ticket getTicket( 241 long ticketId) 242 throws com.liferay.portal.kernel.exception.PortalException { 243 return getService().getTicket(ticketId); 244 } 245 246 /** 247 * Returns a range of all the tickets. 248 * 249 * <p> 250 * 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. 251 * </p> 252 * 253 * @param start the lower bound of the range of tickets 254 * @param end the upper bound of the range of tickets (not inclusive) 255 * @return the range of tickets 256 */ 257 public static java.util.List<com.liferay.portal.kernel.model.Ticket> getTickets( 258 int start, int end) { 259 return getService().getTickets(start, end); 260 } 261 262 /** 263 * Returns the number of tickets. 264 * 265 * @return the number of tickets 266 */ 267 public static int getTicketsCount() { 268 return getService().getTicketsCount(); 269 } 270 271 /** 272 * Updates the ticket in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 273 * 274 * @param ticket the ticket 275 * @return the ticket that was updated 276 */ 277 public static com.liferay.portal.kernel.model.Ticket updateTicket( 278 com.liferay.portal.kernel.model.Ticket ticket) { 279 return getService().updateTicket(ticket); 280 } 281 282 public static TicketLocalService getService() { 283 if (_service == null) { 284 _service = (TicketLocalService)PortalBeanLocatorUtil.locate(TicketLocalService.class.getName()); 285 286 ReferenceRegistry.registerReference(TicketLocalServiceUtil.class, 287 "_service"); 288 } 289 290 return _service; 291 } 292 293 private static TicketLocalService _service; 294 }