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 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.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 /** 071 * Adds the system event to the database. Also notifies the appropriate model listeners. 072 * 073 * @param systemEvent the system event 074 * @return the system event that was added 075 */ 076 public static com.liferay.portal.kernel.model.SystemEvent addSystemEvent( 077 com.liferay.portal.kernel.model.SystemEvent systemEvent) { 078 return getService().addSystemEvent(systemEvent); 079 } 080 081 public static com.liferay.portal.kernel.model.SystemEvent addSystemEvent( 082 long companyId, java.lang.String className, long classPK, 083 java.lang.String classUuid, java.lang.String referrerClassName, 084 int type, java.lang.String extraData) 085 throws com.liferay.portal.kernel.exception.PortalException { 086 return getService() 087 .addSystemEvent(companyId, className, classPK, classUuid, 088 referrerClassName, type, extraData); 089 } 090 091 public static com.liferay.portal.kernel.model.SystemEvent addSystemEvent( 092 long userId, long groupId, java.lang.String className, long classPK, 093 java.lang.String classUuid, java.lang.String referrerClassName, 094 int type, java.lang.String extraData) 095 throws com.liferay.portal.kernel.exception.PortalException { 096 return getService() 097 .addSystemEvent(userId, groupId, className, classPK, 098 classUuid, referrerClassName, type, extraData); 099 } 100 101 /** 102 * Creates a new system event with the primary key. Does not add the system event to the database. 103 * 104 * @param systemEventId the primary key for the new system event 105 * @return the new system event 106 */ 107 public static com.liferay.portal.kernel.model.SystemEvent createSystemEvent( 108 long systemEventId) { 109 return getService().createSystemEvent(systemEventId); 110 } 111 112 /** 113 * Deletes the system event from the database. Also notifies the appropriate model listeners. 114 * 115 * @param systemEvent the system event 116 * @return the system event that was removed 117 */ 118 public static com.liferay.portal.kernel.model.SystemEvent deleteSystemEvent( 119 com.liferay.portal.kernel.model.SystemEvent systemEvent) { 120 return getService().deleteSystemEvent(systemEvent); 121 } 122 123 /** 124 * Deletes the system event with the primary key from the database. Also notifies the appropriate model listeners. 125 * 126 * @param systemEventId the primary key of the system event 127 * @return the system event that was removed 128 * @throws PortalException if a system event with the primary key could not be found 129 */ 130 public static com.liferay.portal.kernel.model.SystemEvent deleteSystemEvent( 131 long systemEventId) 132 throws com.liferay.portal.kernel.exception.PortalException { 133 return getService().deleteSystemEvent(systemEventId); 134 } 135 136 public static com.liferay.portal.kernel.model.SystemEvent fetchSystemEvent( 137 long groupId, long classNameId, long classPK, int type) { 138 return getService().fetchSystemEvent(groupId, classNameId, classPK, type); 139 } 140 141 public static com.liferay.portal.kernel.model.SystemEvent fetchSystemEvent( 142 long systemEventId) { 143 return getService().fetchSystemEvent(systemEventId); 144 } 145 146 /** 147 * Returns the system event with the primary key. 148 * 149 * @param systemEventId the primary key of the system event 150 * @return the system event 151 * @throws PortalException if a system event with the primary key could not be found 152 */ 153 public static com.liferay.portal.kernel.model.SystemEvent getSystemEvent( 154 long systemEventId) 155 throws com.liferay.portal.kernel.exception.PortalException { 156 return getService().getSystemEvent(systemEventId); 157 } 158 159 /** 160 * Updates the system event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 161 * 162 * @param systemEvent the system event 163 * @return the system event that was updated 164 */ 165 public static com.liferay.portal.kernel.model.SystemEvent updateSystemEvent( 166 com.liferay.portal.kernel.model.SystemEvent systemEvent) { 167 return getService().updateSystemEvent(systemEvent); 168 } 169 170 /** 171 * Returns the number of system events. 172 * 173 * @return the number of system events 174 */ 175 public static int getSystemEventsCount() { 176 return getService().getSystemEventsCount(); 177 } 178 179 /** 180 * Returns the OSGi service identifier. 181 * 182 * @return the OSGi service identifier 183 */ 184 public static java.lang.String getOSGiServiceIdentifier() { 185 return getService().getOSGiServiceIdentifier(); 186 } 187 188 /** 189 * Performs a dynamic query on the database and returns the matching rows. 190 * 191 * @param dynamicQuery the dynamic query 192 * @return the matching rows 193 */ 194 public static <T> java.util.List<T> dynamicQuery( 195 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 196 return getService().dynamicQuery(dynamicQuery); 197 } 198 199 /** 200 * Performs a dynamic query on the database and returns a range of the matching rows. 201 * 202 * <p> 203 * 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. 204 * </p> 205 * 206 * @param dynamicQuery the dynamic query 207 * @param start the lower bound of the range of model instances 208 * @param end the upper bound of the range of model instances (not inclusive) 209 * @return the range of matching rows 210 */ 211 public static <T> java.util.List<T> dynamicQuery( 212 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 213 int end) { 214 return getService().dynamicQuery(dynamicQuery, start, end); 215 } 216 217 /** 218 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 219 * 220 * <p> 221 * 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. 222 * </p> 223 * 224 * @param dynamicQuery the dynamic query 225 * @param start the lower bound of the range of model instances 226 * @param end the upper bound of the range of model instances (not inclusive) 227 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 228 * @return the ordered range of matching rows 229 */ 230 public static <T> java.util.List<T> dynamicQuery( 231 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 232 int end, 233 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 234 return getService() 235 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 236 } 237 238 /** 239 * Returns a range of all the system events. 240 * 241 * <p> 242 * 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. 243 * </p> 244 * 245 * @param start the lower bound of the range of system events 246 * @param end the upper bound of the range of system events (not inclusive) 247 * @return the range of system events 248 */ 249 public static java.util.List<com.liferay.portal.kernel.model.SystemEvent> getSystemEvents( 250 int start, int end) { 251 return getService().getSystemEvents(start, end); 252 } 253 254 public static java.util.List<com.liferay.portal.kernel.model.SystemEvent> getSystemEvents( 255 long groupId, long classNameId, long classPK) { 256 return getService().getSystemEvents(groupId, classNameId, classPK); 257 } 258 259 public static java.util.List<com.liferay.portal.kernel.model.SystemEvent> getSystemEvents( 260 long groupId, long classNameId, long classPK, int type) { 261 return getService().getSystemEvents(groupId, classNameId, classPK, type); 262 } 263 264 /** 265 * Returns the number of rows matching the dynamic query. 266 * 267 * @param dynamicQuery the dynamic query 268 * @return the number of rows matching the dynamic query 269 */ 270 public static long dynamicQueryCount( 271 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 272 return getService().dynamicQueryCount(dynamicQuery); 273 } 274 275 /** 276 * Returns the number of rows matching the dynamic query. 277 * 278 * @param dynamicQuery the dynamic query 279 * @param projection the projection to apply to the query 280 * @return the number of rows matching the dynamic query 281 */ 282 public static long dynamicQueryCount( 283 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 284 com.liferay.portal.kernel.dao.orm.Projection projection) { 285 return getService().dynamicQueryCount(dynamicQuery, projection); 286 } 287 288 public static void deleteSystemEvents(long groupId) { 289 getService().deleteSystemEvents(groupId); 290 } 291 292 public static void deleteSystemEvents(long groupId, long systemEventSetKey) { 293 getService().deleteSystemEvents(groupId, systemEventSetKey); 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 }