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.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 044 return getService().getActionableDynamicQuery(); 045 } 046 047 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 048 return getService().dynamicQuery(); 049 } 050 051 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 052 return getService().getIndexableActionableDynamicQuery(); 053 } 054 055 /** 056 * @throws PortalException 057 */ 058 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 059 com.liferay.portal.kernel.model.PersistedModel persistedModel) 060 throws com.liferay.portal.kernel.exception.PortalException { 061 return getService().deletePersistedModel(persistedModel); 062 } 063 064 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 065 java.io.Serializable primaryKeyObj) 066 throws com.liferay.portal.kernel.exception.PortalException { 067 return getService().getPersistedModel(primaryKeyObj); 068 } 069 070 public static com.liferay.portal.kernel.model.Ticket addDistinctTicket( 071 long companyId, java.lang.String className, long classPK, int type, 072 java.lang.String extraInfo, java.util.Date expirationDate, 073 ServiceContext serviceContext) { 074 return getService() 075 .addDistinctTicket(companyId, className, classPK, type, 076 extraInfo, expirationDate, serviceContext); 077 } 078 079 /** 080 * Adds the ticket to the database. Also notifies the appropriate model listeners. 081 * 082 * @param ticket the ticket 083 * @return the ticket that was added 084 */ 085 public static com.liferay.portal.kernel.model.Ticket addTicket( 086 com.liferay.portal.kernel.model.Ticket ticket) { 087 return getService().addTicket(ticket); 088 } 089 090 public static com.liferay.portal.kernel.model.Ticket addTicket( 091 long companyId, java.lang.String className, long classPK, int type, 092 java.lang.String extraInfo, java.util.Date expirationDate, 093 ServiceContext serviceContext) { 094 return getService() 095 .addTicket(companyId, className, classPK, type, extraInfo, 096 expirationDate, serviceContext); 097 } 098 099 /** 100 * Creates a new ticket with the primary key. Does not add the ticket to the database. 101 * 102 * @param ticketId the primary key for the new ticket 103 * @return the new ticket 104 */ 105 public static com.liferay.portal.kernel.model.Ticket createTicket( 106 long ticketId) { 107 return getService().createTicket(ticketId); 108 } 109 110 /** 111 * Deletes the ticket from the database. Also notifies the appropriate model listeners. 112 * 113 * @param ticket the ticket 114 * @return the ticket that was removed 115 */ 116 public static com.liferay.portal.kernel.model.Ticket deleteTicket( 117 com.liferay.portal.kernel.model.Ticket ticket) { 118 return getService().deleteTicket(ticket); 119 } 120 121 /** 122 * Deletes the ticket with the primary key from the database. Also notifies the appropriate model listeners. 123 * 124 * @param ticketId the primary key of the ticket 125 * @return the ticket that was removed 126 * @throws PortalException if a ticket with the primary key could not be found 127 */ 128 public static com.liferay.portal.kernel.model.Ticket deleteTicket( 129 long ticketId) 130 throws com.liferay.portal.kernel.exception.PortalException { 131 return getService().deleteTicket(ticketId); 132 } 133 134 public static com.liferay.portal.kernel.model.Ticket fetchTicket( 135 java.lang.String key) { 136 return getService().fetchTicket(key); 137 } 138 139 public static com.liferay.portal.kernel.model.Ticket fetchTicket( 140 long ticketId) { 141 return getService().fetchTicket(ticketId); 142 } 143 144 public static com.liferay.portal.kernel.model.Ticket getTicket( 145 java.lang.String key) 146 throws com.liferay.portal.kernel.exception.PortalException { 147 return getService().getTicket(key); 148 } 149 150 /** 151 * Returns the ticket with the primary key. 152 * 153 * @param ticketId the primary key of the ticket 154 * @return the ticket 155 * @throws PortalException if a ticket with the primary key could not be found 156 */ 157 public static com.liferay.portal.kernel.model.Ticket getTicket( 158 long ticketId) 159 throws com.liferay.portal.kernel.exception.PortalException { 160 return getService().getTicket(ticketId); 161 } 162 163 /** 164 * Updates the ticket in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 165 * 166 * @param ticket the ticket 167 * @return the ticket that was updated 168 */ 169 public static com.liferay.portal.kernel.model.Ticket updateTicket( 170 com.liferay.portal.kernel.model.Ticket ticket) { 171 return getService().updateTicket(ticket); 172 } 173 174 /** 175 * Returns the number of tickets. 176 * 177 * @return the number of tickets 178 */ 179 public static int getTicketsCount() { 180 return getService().getTicketsCount(); 181 } 182 183 /** 184 * Returns the OSGi service identifier. 185 * 186 * @return the OSGi service identifier 187 */ 188 public static java.lang.String getOSGiServiceIdentifier() { 189 return getService().getOSGiServiceIdentifier(); 190 } 191 192 /** 193 * Performs a dynamic query on the database and returns the matching rows. 194 * 195 * @param dynamicQuery the dynamic query 196 * @return the matching rows 197 */ 198 public static <T> java.util.List<T> dynamicQuery( 199 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 200 return getService().dynamicQuery(dynamicQuery); 201 } 202 203 /** 204 * Performs a dynamic query on the database and returns a range of the matching rows. 205 * 206 * <p> 207 * 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. 208 * </p> 209 * 210 * @param dynamicQuery the dynamic query 211 * @param start the lower bound of the range of model instances 212 * @param end the upper bound of the range of model instances (not inclusive) 213 * @return the range of matching rows 214 */ 215 public static <T> java.util.List<T> dynamicQuery( 216 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 217 int end) { 218 return getService().dynamicQuery(dynamicQuery, start, end); 219 } 220 221 /** 222 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 223 * 224 * <p> 225 * 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. 226 * </p> 227 * 228 * @param dynamicQuery the dynamic query 229 * @param start the lower bound of the range of model instances 230 * @param end the upper bound of the range of model instances (not inclusive) 231 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 232 * @return the ordered range of matching rows 233 */ 234 public static <T> java.util.List<T> dynamicQuery( 235 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 236 int end, 237 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 238 return getService() 239 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 240 } 241 242 /** 243 * Returns a range of all the tickets. 244 * 245 * <p> 246 * 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. 247 * </p> 248 * 249 * @param start the lower bound of the range of tickets 250 * @param end the upper bound of the range of tickets (not inclusive) 251 * @return the range of tickets 252 */ 253 public static java.util.List<com.liferay.portal.kernel.model.Ticket> getTickets( 254 int start, int end) { 255 return getService().getTickets(start, end); 256 } 257 258 /** 259 * Returns the number of rows matching the dynamic query. 260 * 261 * @param dynamicQuery the dynamic query 262 * @return the number of rows matching the dynamic query 263 */ 264 public static long dynamicQueryCount( 265 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 266 return getService().dynamicQueryCount(dynamicQuery); 267 } 268 269 /** 270 * Returns the number of rows matching the dynamic query. 271 * 272 * @param dynamicQuery the dynamic query 273 * @param projection the projection to apply to the query 274 * @return the number of rows matching the dynamic query 275 */ 276 public static long dynamicQueryCount( 277 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 278 com.liferay.portal.kernel.dao.orm.Projection projection) { 279 return getService().dynamicQueryCount(dynamicQuery, projection); 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 }