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