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