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 BrowserTracker. This utility wraps 024 * {@link com.liferay.portal.service.impl.BrowserTrackerLocalServiceImpl} 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 BrowserTrackerLocalService 032 * @see com.liferay.portal.service.base.BrowserTrackerLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.BrowserTrackerLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class BrowserTrackerLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.BrowserTrackerLocalServiceImpl} 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 * Adds the browser tracker to the database. Also notifies the appropriate model listeners. 057 * 058 * @param browserTracker the browser tracker 059 * @return the browser tracker that was added 060 */ 061 public static com.liferay.portal.kernel.model.BrowserTracker addBrowserTracker( 062 com.liferay.portal.kernel.model.BrowserTracker browserTracker) { 063 return getService().addBrowserTracker(browserTracker); 064 } 065 066 /** 067 * Creates a new browser tracker with the primary key. Does not add the browser tracker to the database. 068 * 069 * @param browserTrackerId the primary key for the new browser tracker 070 * @return the new browser tracker 071 */ 072 public static com.liferay.portal.kernel.model.BrowserTracker createBrowserTracker( 073 long browserTrackerId) { 074 return getService().createBrowserTracker(browserTrackerId); 075 } 076 077 /** 078 * Deletes the browser tracker from the database. Also notifies the appropriate model listeners. 079 * 080 * @param browserTracker the browser tracker 081 * @return the browser tracker that was removed 082 */ 083 public static com.liferay.portal.kernel.model.BrowserTracker deleteBrowserTracker( 084 com.liferay.portal.kernel.model.BrowserTracker browserTracker) { 085 return getService().deleteBrowserTracker(browserTracker); 086 } 087 088 /** 089 * Deletes the browser tracker with the primary key from the database. Also notifies the appropriate model listeners. 090 * 091 * @param browserTrackerId the primary key of the browser tracker 092 * @return the browser tracker that was removed 093 * @throws PortalException if a browser tracker with the primary key could not be found 094 */ 095 public static com.liferay.portal.kernel.model.BrowserTracker deleteBrowserTracker( 096 long browserTrackerId) 097 throws com.liferay.portal.kernel.exception.PortalException { 098 return getService().deleteBrowserTracker(browserTrackerId); 099 } 100 101 public static com.liferay.portal.kernel.model.BrowserTracker fetchBrowserTracker( 102 long browserTrackerId) { 103 return getService().fetchBrowserTracker(browserTrackerId); 104 } 105 106 /** 107 * Returns the browser tracker with the primary key. 108 * 109 * @param browserTrackerId the primary key of the browser tracker 110 * @return the browser tracker 111 * @throws PortalException if a browser tracker with the primary key could not be found 112 */ 113 public static com.liferay.portal.kernel.model.BrowserTracker getBrowserTracker( 114 long browserTrackerId) 115 throws com.liferay.portal.kernel.exception.PortalException { 116 return getService().getBrowserTracker(browserTrackerId); 117 } 118 119 public static com.liferay.portal.kernel.model.BrowserTracker getBrowserTracker( 120 long userId, long browserKey) { 121 return getService().getBrowserTracker(userId, browserKey); 122 } 123 124 /** 125 * Updates the browser tracker in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 126 * 127 * @param browserTracker the browser tracker 128 * @return the browser tracker that was updated 129 */ 130 public static com.liferay.portal.kernel.model.BrowserTracker updateBrowserTracker( 131 com.liferay.portal.kernel.model.BrowserTracker browserTracker) { 132 return getService().updateBrowserTracker(browserTracker); 133 } 134 135 public static com.liferay.portal.kernel.model.BrowserTracker updateBrowserTracker( 136 long userId, long browserKey) { 137 return getService().updateBrowserTracker(userId, browserKey); 138 } 139 140 /** 141 * @throws PortalException 142 */ 143 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 144 com.liferay.portal.kernel.model.PersistedModel persistedModel) 145 throws com.liferay.portal.kernel.exception.PortalException { 146 return getService().deletePersistedModel(persistedModel); 147 } 148 149 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 150 java.io.Serializable primaryKeyObj) 151 throws com.liferay.portal.kernel.exception.PortalException { 152 return getService().getPersistedModel(primaryKeyObj); 153 } 154 155 /** 156 * Returns the number of browser trackers. 157 * 158 * @return the number of browser trackers 159 */ 160 public static int getBrowserTrackersCount() { 161 return getService().getBrowserTrackersCount(); 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.BrowserTrackerModelImpl}. 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.BrowserTrackerModelImpl}. 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 browser 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.BrowserTrackerModelImpl}. 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 browser trackers 231 * @param end the upper bound of the range of browser trackers (not inclusive) 232 * @return the range of browser trackers 233 */ 234 public static java.util.List<com.liferay.portal.kernel.model.BrowserTracker> getBrowserTrackers( 235 int start, int end) { 236 return getService().getBrowserTrackers(start, end); 237 } 238 239 /** 240 * Returns the number of rows matching the dynamic query. 241 * 242 * @param dynamicQuery the dynamic query 243 * @return the number of rows matching the dynamic query 244 */ 245 public static long dynamicQueryCount( 246 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 247 return getService().dynamicQueryCount(dynamicQuery); 248 } 249 250 /** 251 * Returns the number of rows matching the dynamic query. 252 * 253 * @param dynamicQuery the dynamic query 254 * @param projection the projection to apply to the query 255 * @return the number of rows matching the dynamic query 256 */ 257 public static long dynamicQueryCount( 258 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 259 com.liferay.portal.kernel.dao.orm.Projection projection) { 260 return getService().dynamicQueryCount(dynamicQuery, projection); 261 } 262 263 public static void deleteUserBrowserTracker(long userId) { 264 getService().deleteUserBrowserTracker(userId); 265 } 266 267 public static BrowserTrackerLocalService getService() { 268 if (_service == null) { 269 _service = (BrowserTrackerLocalService)PortalBeanLocatorUtil.locate(BrowserTrackerLocalService.class.getName()); 270 271 ReferenceRegistry.registerReference(BrowserTrackerLocalServiceUtil.class, 272 "_service"); 273 } 274 275 return _service; 276 } 277 278 private static BrowserTrackerLocalService _service; 279 }