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 SystemEvent. This utility wraps
024     * {@link com.liferay.portal.service.impl.SystemEventLocalServiceImpl} 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 SystemEventLocalService
032     * @see com.liferay.portal.service.base.SystemEventLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.SystemEventLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SystemEventLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.SystemEventLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portal.model.SystemEvent addSystemEvent(
044                    long companyId, java.lang.String className, long classPK,
045                    java.lang.String classUuid, java.lang.String referrerClassName,
046                    int type, java.lang.String extraData)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addSystemEvent(companyId, className, classPK, classUuid,
050                            referrerClassName, type, extraData);
051            }
052    
053            /**
054            * Adds the system event to the database. Also notifies the appropriate model listeners.
055            *
056            * @param systemEvent the system event
057            * @return the system event that was added
058            */
059            public static com.liferay.portal.model.SystemEvent addSystemEvent(
060                    com.liferay.portal.model.SystemEvent systemEvent) {
061                    return getService().addSystemEvent(systemEvent);
062            }
063    
064            public static com.liferay.portal.model.SystemEvent addSystemEvent(
065                    long userId, long groupId, java.lang.String className, long classPK,
066                    java.lang.String classUuid, java.lang.String referrerClassName,
067                    int type, java.lang.String extraData)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    return getService()
070                                       .addSystemEvent(userId, groupId, className, classPK,
071                            classUuid, referrerClassName, type, extraData);
072            }
073    
074            /**
075            * Creates a new system event with the primary key. Does not add the system event to the database.
076            *
077            * @param systemEventId the primary key for the new system event
078            * @return the new system event
079            */
080            public static com.liferay.portal.model.SystemEvent createSystemEvent(
081                    long systemEventId) {
082                    return getService().createSystemEvent(systemEventId);
083            }
084    
085            /**
086            * @throws PortalException
087            */
088            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
089                    com.liferay.portal.model.PersistedModel persistedModel)
090                    throws com.liferay.portal.kernel.exception.PortalException {
091                    return getService().deletePersistedModel(persistedModel);
092            }
093    
094            /**
095            * Deletes the system event from the database. Also notifies the appropriate model listeners.
096            *
097            * @param systemEvent the system event
098            * @return the system event that was removed
099            */
100            public static com.liferay.portal.model.SystemEvent deleteSystemEvent(
101                    com.liferay.portal.model.SystemEvent systemEvent) {
102                    return getService().deleteSystemEvent(systemEvent);
103            }
104    
105            /**
106            * Deletes the system event with the primary key from the database. Also notifies the appropriate model listeners.
107            *
108            * @param systemEventId the primary key of the system event
109            * @return the system event that was removed
110            * @throws PortalException if a system event with the primary key could not be found
111            */
112            public static com.liferay.portal.model.SystemEvent deleteSystemEvent(
113                    long systemEventId)
114                    throws com.liferay.portal.kernel.exception.PortalException {
115                    return getService().deleteSystemEvent(systemEventId);
116            }
117    
118            public static void deleteSystemEvents(long groupId) {
119                    getService().deleteSystemEvents(groupId);
120            }
121    
122            public static void deleteSystemEvents(long groupId, long systemEventSetKey) {
123                    getService().deleteSystemEvents(groupId, systemEventSetKey);
124            }
125    
126            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
127                    return getService().dynamicQuery();
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns the matching rows.
132            *
133            * @param dynamicQuery the dynamic query
134            * @return the matching rows
135            */
136            public static <T> java.util.List<T> dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
138                    return getService().dynamicQuery(dynamicQuery);
139            }
140    
141            /**
142            * Performs a dynamic query on the database and returns a range of the matching rows.
143            *
144            * <p>
145            * 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.SystemEventModelImpl}. 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.
146            * </p>
147            *
148            * @param dynamicQuery the dynamic query
149            * @param start the lower bound of the range of model instances
150            * @param end the upper bound of the range of model instances (not inclusive)
151            * @return the range of matching rows
152            */
153            public static <T> java.util.List<T> dynamicQuery(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
155                    int end) {
156                    return getService().dynamicQuery(dynamicQuery, start, end);
157            }
158    
159            /**
160            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
161            *
162            * <p>
163            * 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.SystemEventModelImpl}. 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.
164            * </p>
165            *
166            * @param dynamicQuery the dynamic query
167            * @param start the lower bound of the range of model instances
168            * @param end the upper bound of the range of model instances (not inclusive)
169            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
170            * @return the ordered range of matching rows
171            */
172            public static <T> java.util.List<T> dynamicQuery(
173                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
174                    int end,
175                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
176                    return getService()
177                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
178            }
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @return the number of rows matching the dynamic query
185            */
186            public static long dynamicQueryCount(
187                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
188                    return getService().dynamicQueryCount(dynamicQuery);
189            }
190    
191            /**
192            * Returns the number of rows matching the dynamic query.
193            *
194            * @param dynamicQuery the dynamic query
195            * @param projection the projection to apply to the query
196            * @return the number of rows matching the dynamic query
197            */
198            public static long dynamicQueryCount(
199                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
200                    com.liferay.portal.kernel.dao.orm.Projection projection) {
201                    return getService().dynamicQueryCount(dynamicQuery, projection);
202            }
203    
204            public static com.liferay.portal.model.SystemEvent fetchSystemEvent(
205                    long groupId, long classNameId, long classPK, int type) {
206                    return getService().fetchSystemEvent(groupId, classNameId, classPK, type);
207            }
208    
209            public static com.liferay.portal.model.SystemEvent fetchSystemEvent(
210                    long systemEventId) {
211                    return getService().fetchSystemEvent(systemEventId);
212            }
213    
214            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
215                    return getService().getActionableDynamicQuery();
216            }
217    
218            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
219                    return getService().getIndexableActionableDynamicQuery();
220            }
221    
222            /**
223            * Returns the OSGi service identifier.
224            *
225            * @return the OSGi service identifier
226            */
227            public static java.lang.String getOSGiServiceIdentifier() {
228                    return getService().getOSGiServiceIdentifier();
229            }
230    
231            public static com.liferay.portal.model.PersistedModel getPersistedModel(
232                    java.io.Serializable primaryKeyObj)
233                    throws com.liferay.portal.kernel.exception.PortalException {
234                    return getService().getPersistedModel(primaryKeyObj);
235            }
236    
237            /**
238            * Returns the system event with the primary key.
239            *
240            * @param systemEventId the primary key of the system event
241            * @return the system event
242            * @throws PortalException if a system event with the primary key could not be found
243            */
244            public static com.liferay.portal.model.SystemEvent getSystemEvent(
245                    long systemEventId)
246                    throws com.liferay.portal.kernel.exception.PortalException {
247                    return getService().getSystemEvent(systemEventId);
248            }
249    
250            public static java.util.List<com.liferay.portal.model.SystemEvent> getSystemEvents(
251                    long groupId, long classNameId, long classPK) {
252                    return getService().getSystemEvents(groupId, classNameId, classPK);
253            }
254    
255            public static java.util.List<com.liferay.portal.model.SystemEvent> getSystemEvents(
256                    long groupId, long classNameId, long classPK, int type) {
257                    return getService().getSystemEvents(groupId, classNameId, classPK, type);
258            }
259    
260            /**
261            * Returns a range of all the system events.
262            *
263            * <p>
264            * 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.SystemEventModelImpl}. 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.
265            * </p>
266            *
267            * @param start the lower bound of the range of system events
268            * @param end the upper bound of the range of system events (not inclusive)
269            * @return the range of system events
270            */
271            public static java.util.List<com.liferay.portal.model.SystemEvent> getSystemEvents(
272                    int start, int end) {
273                    return getService().getSystemEvents(start, end);
274            }
275    
276            /**
277            * Returns the number of system events.
278            *
279            * @return the number of system events
280            */
281            public static int getSystemEventsCount() {
282                    return getService().getSystemEventsCount();
283            }
284    
285            /**
286            * Updates the system event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
287            *
288            * @param systemEvent the system event
289            * @return the system event that was updated
290            */
291            public static com.liferay.portal.model.SystemEvent updateSystemEvent(
292                    com.liferay.portal.model.SystemEvent systemEvent) {
293                    return getService().updateSystemEvent(systemEvent);
294            }
295    
296            public static SystemEventLocalService getService() {
297                    if (_service == null) {
298                            _service = (SystemEventLocalService)PortalBeanLocatorUtil.locate(SystemEventLocalService.class.getName());
299    
300                            ReferenceRegistry.registerReference(SystemEventLocalServiceUtil.class,
301                                    "_service");
302                    }
303    
304                    return _service;
305            }
306    
307            private static SystemEventLocalService _service;
308    }