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 UserTracker. This utility wraps 024 * {@link com.liferay.portal.service.impl.UserTrackerLocalServiceImpl} 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 UserTrackerLocalService 032 * @see com.liferay.portal.service.base.UserTrackerLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.UserTrackerLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class UserTrackerLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserTrackerLocalServiceImpl} 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 user tracker to the database. Also notifies the appropriate model listeners. 072 * 073 * @param userTracker the user tracker 074 * @return the user tracker that was added 075 */ 076 public static com.liferay.portal.kernel.model.UserTracker addUserTracker( 077 com.liferay.portal.kernel.model.UserTracker userTracker) { 078 return getService().addUserTracker(userTracker); 079 } 080 081 public static com.liferay.portal.kernel.model.UserTracker addUserTracker( 082 long companyId, long userId, java.util.Date modifiedDate, 083 java.lang.String sessionId, java.lang.String remoteAddr, 084 java.lang.String remoteHost, java.lang.String userAgent, 085 java.util.List<com.liferay.portal.kernel.model.UserTrackerPath> userTrackerPaths) { 086 return getService() 087 .addUserTracker(companyId, userId, modifiedDate, sessionId, 088 remoteAddr, remoteHost, userAgent, userTrackerPaths); 089 } 090 091 /** 092 * Creates a new user tracker with the primary key. Does not add the user tracker to the database. 093 * 094 * @param userTrackerId the primary key for the new user tracker 095 * @return the new user tracker 096 */ 097 public static com.liferay.portal.kernel.model.UserTracker createUserTracker( 098 long userTrackerId) { 099 return getService().createUserTracker(userTrackerId); 100 } 101 102 /** 103 * Deletes the user tracker from the database. Also notifies the appropriate model listeners. 104 * 105 * @param userTracker the user tracker 106 * @return the user tracker that was removed 107 */ 108 public static com.liferay.portal.kernel.model.UserTracker deleteUserTracker( 109 com.liferay.portal.kernel.model.UserTracker userTracker) { 110 return getService().deleteUserTracker(userTracker); 111 } 112 113 /** 114 * Deletes the user tracker with the primary key from the database. Also notifies the appropriate model listeners. 115 * 116 * @param userTrackerId the primary key of the user tracker 117 * @return the user tracker that was removed 118 * @throws PortalException if a user tracker with the primary key could not be found 119 */ 120 public static com.liferay.portal.kernel.model.UserTracker deleteUserTracker( 121 long userTrackerId) 122 throws com.liferay.portal.kernel.exception.PortalException { 123 return getService().deleteUserTracker(userTrackerId); 124 } 125 126 public static com.liferay.portal.kernel.model.UserTracker fetchUserTracker( 127 long userTrackerId) { 128 return getService().fetchUserTracker(userTrackerId); 129 } 130 131 /** 132 * Returns the user tracker with the primary key. 133 * 134 * @param userTrackerId the primary key of the user tracker 135 * @return the user tracker 136 * @throws PortalException if a user tracker with the primary key could not be found 137 */ 138 public static com.liferay.portal.kernel.model.UserTracker getUserTracker( 139 long userTrackerId) 140 throws com.liferay.portal.kernel.exception.PortalException { 141 return getService().getUserTracker(userTrackerId); 142 } 143 144 /** 145 * Updates the user tracker in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 146 * 147 * @param userTracker the user tracker 148 * @return the user tracker that was updated 149 */ 150 public static com.liferay.portal.kernel.model.UserTracker updateUserTracker( 151 com.liferay.portal.kernel.model.UserTracker userTracker) { 152 return getService().updateUserTracker(userTracker); 153 } 154 155 /** 156 * Returns the number of user trackers. 157 * 158 * @return the number of user trackers 159 */ 160 public static int getUserTrackersCount() { 161 return getService().getUserTrackersCount(); 162 } 163 164 /** 165 * Returns the OSGi service identifier. 166 * 167 * @return the OSGi service identifier 168 */ 169 public static java.lang.String getOSGiServiceIdentifier() { 170 return getService().getOSGiServiceIdentifier(); 171 } 172 173 /** 174 * Performs a dynamic query on the database and returns the matching rows. 175 * 176 * @param dynamicQuery the dynamic query 177 * @return the matching rows 178 */ 179 public static <T> java.util.List<T> dynamicQuery( 180 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 181 return getService().dynamicQuery(dynamicQuery); 182 } 183 184 /** 185 * Performs a dynamic query on the database and returns a range of the matching rows. 186 * 187 * <p> 188 * 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.UserTrackerModelImpl}. 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. 189 * </p> 190 * 191 * @param dynamicQuery the dynamic query 192 * @param start the lower bound of the range of model instances 193 * @param end the upper bound of the range of model instances (not inclusive) 194 * @return the range of matching rows 195 */ 196 public static <T> java.util.List<T> dynamicQuery( 197 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 198 int end) { 199 return getService().dynamicQuery(dynamicQuery, start, end); 200 } 201 202 /** 203 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 204 * 205 * <p> 206 * 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.UserTrackerModelImpl}. 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. 207 * </p> 208 * 209 * @param dynamicQuery the dynamic query 210 * @param start the lower bound of the range of model instances 211 * @param end the upper bound of the range of model instances (not inclusive) 212 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 213 * @return the ordered 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 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 219 return getService() 220 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 221 } 222 223 /** 224 * Returns a range of all the user trackers. 225 * 226 * <p> 227 * 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.UserTrackerModelImpl}. 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. 228 * </p> 229 * 230 * @param start the lower bound of the range of user trackers 231 * @param end the upper bound of the range of user trackers (not inclusive) 232 * @return the range of user trackers 233 */ 234 public static java.util.List<com.liferay.portal.kernel.model.UserTracker> getUserTrackers( 235 int start, int end) { 236 return getService().getUserTrackers(start, end); 237 } 238 239 public static java.util.List<com.liferay.portal.kernel.model.UserTracker> getUserTrackers( 240 long companyId, int start, int end) { 241 return getService().getUserTrackers(companyId, start, end); 242 } 243 244 /** 245 * Returns the number of rows matching the dynamic query. 246 * 247 * @param dynamicQuery the dynamic query 248 * @return the number of rows matching the dynamic query 249 */ 250 public static long dynamicQueryCount( 251 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 252 return getService().dynamicQueryCount(dynamicQuery); 253 } 254 255 /** 256 * Returns the number of rows matching the dynamic query. 257 * 258 * @param dynamicQuery the dynamic query 259 * @param projection the projection to apply to the query 260 * @return the number of rows matching the dynamic query 261 */ 262 public static long dynamicQueryCount( 263 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 264 com.liferay.portal.kernel.dao.orm.Projection projection) { 265 return getService().dynamicQueryCount(dynamicQuery, projection); 266 } 267 268 public static UserTrackerLocalService getService() { 269 if (_service == null) { 270 _service = (UserTrackerLocalService)PortalBeanLocatorUtil.locate(UserTrackerLocalService.class.getName()); 271 272 ReferenceRegistry.registerReference(UserTrackerLocalServiceUtil.class, 273 "_service"); 274 } 275 276 return _service; 277 } 278 279 private static UserTrackerLocalService _service; 280 }