001 /** 002 * Copyright (c) 2000-2010 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.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.model.BrowserTracker; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * The persistence utility for the browser tracker service. 028 * 029 * <p> 030 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class. 031 * </p> 032 * 033 * @author Brian Wing Shun Chan 034 * @see BrowserTrackerPersistence 035 * @see BrowserTrackerPersistenceImpl 036 * @generated 037 */ 038 public class BrowserTrackerUtil { 039 /** 040 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 041 */ 042 public static void clearCache() { 043 getPersistence().clearCache(); 044 } 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 048 */ 049 public static void clearCache(BrowserTracker browserTracker) { 050 getPersistence().clearCache(browserTracker); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 055 */ 056 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 057 throws SystemException { 058 return getPersistence().countWithDynamicQuery(dynamicQuery); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 063 */ 064 public static List<BrowserTracker> findWithDynamicQuery( 065 DynamicQuery dynamicQuery) throws SystemException { 066 return getPersistence().findWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 071 */ 072 public static List<BrowserTracker> findWithDynamicQuery( 073 DynamicQuery dynamicQuery, int start, int end) 074 throws SystemException { 075 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 080 */ 081 public static List<BrowserTracker> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end, 083 OrderByComparator orderByComparator) throws SystemException { 084 return getPersistence() 085 .findWithDynamicQuery(dynamicQuery, start, end, 086 orderByComparator); 087 } 088 089 /** 090 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 091 */ 092 public static BrowserTracker remove(BrowserTracker browserTracker) 093 throws SystemException { 094 return getPersistence().remove(browserTracker); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static BrowserTracker update(BrowserTracker browserTracker, 101 boolean merge) throws SystemException { 102 return getPersistence().update(browserTracker, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static BrowserTracker update(BrowserTracker browserTracker, 109 boolean merge, ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(browserTracker, merge, serviceContext); 111 } 112 113 /** 114 * Caches the browser tracker in the entity cache if it is enabled. 115 * 116 * @param browserTracker the browser tracker to cache 117 */ 118 public static void cacheResult( 119 com.liferay.portal.model.BrowserTracker browserTracker) { 120 getPersistence().cacheResult(browserTracker); 121 } 122 123 /** 124 * Caches the browser trackers in the entity cache if it is enabled. 125 * 126 * @param browserTrackers the browser trackers to cache 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portal.model.BrowserTracker> browserTrackers) { 130 getPersistence().cacheResult(browserTrackers); 131 } 132 133 /** 134 * Creates a new browser tracker with the primary key. 135 * 136 * @param browserTrackerId the primary key for the new browser tracker 137 * @return the new browser tracker 138 */ 139 public static com.liferay.portal.model.BrowserTracker create( 140 long browserTrackerId) { 141 return getPersistence().create(browserTrackerId); 142 } 143 144 /** 145 * Removes the browser tracker with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param browserTrackerId the primary key of the browser tracker to remove 148 * @return the browser tracker that was removed 149 * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portal.model.BrowserTracker remove( 153 long browserTrackerId) 154 throws com.liferay.portal.NoSuchBrowserTrackerException, 155 com.liferay.portal.kernel.exception.SystemException { 156 return getPersistence().remove(browserTrackerId); 157 } 158 159 public static com.liferay.portal.model.BrowserTracker updateImpl( 160 com.liferay.portal.model.BrowserTracker browserTracker, boolean merge) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(browserTracker, merge); 163 } 164 165 /** 166 * Finds the browser tracker with the primary key or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found. 167 * 168 * @param browserTrackerId the primary key of the browser tracker to find 169 * @return the browser tracker 170 * @throws com.liferay.portal.NoSuchBrowserTrackerException if a browser tracker with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portal.model.BrowserTracker findByPrimaryKey( 174 long browserTrackerId) 175 throws com.liferay.portal.NoSuchBrowserTrackerException, 176 com.liferay.portal.kernel.exception.SystemException { 177 return getPersistence().findByPrimaryKey(browserTrackerId); 178 } 179 180 /** 181 * Finds the browser tracker with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param browserTrackerId the primary key of the browser tracker to find 184 * @return the browser tracker, or <code>null</code> if a browser tracker with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portal.model.BrowserTracker fetchByPrimaryKey( 188 long browserTrackerId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(browserTrackerId); 191 } 192 193 /** 194 * Finds the browser tracker where userId = ? or throws a {@link com.liferay.portal.NoSuchBrowserTrackerException} if it could not be found. 195 * 196 * @param userId the user id to search with 197 * @return the matching browser tracker 198 * @throws com.liferay.portal.NoSuchBrowserTrackerException if a matching browser tracker could not be found 199 * @throws SystemException if a system exception occurred 200 */ 201 public static com.liferay.portal.model.BrowserTracker findByUserId( 202 long userId) 203 throws com.liferay.portal.NoSuchBrowserTrackerException, 204 com.liferay.portal.kernel.exception.SystemException { 205 return getPersistence().findByUserId(userId); 206 } 207 208 /** 209 * Finds the browser tracker where userId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 210 * 211 * @param userId the user id to search with 212 * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found 213 * @throws SystemException if a system exception occurred 214 */ 215 public static com.liferay.portal.model.BrowserTracker fetchByUserId( 216 long userId) throws com.liferay.portal.kernel.exception.SystemException { 217 return getPersistence().fetchByUserId(userId); 218 } 219 220 /** 221 * Finds the browser tracker where userId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 222 * 223 * @param userId the user id to search with 224 * @return the matching browser tracker, or <code>null</code> if a matching browser tracker could not be found 225 * @throws SystemException if a system exception occurred 226 */ 227 public static com.liferay.portal.model.BrowserTracker fetchByUserId( 228 long userId, boolean retrieveFromCache) 229 throws com.liferay.portal.kernel.exception.SystemException { 230 return getPersistence().fetchByUserId(userId, retrieveFromCache); 231 } 232 233 /** 234 * Finds all the browser trackers. 235 * 236 * @return the browser trackers 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portal.model.BrowserTracker> findAll() 240 throws com.liferay.portal.kernel.exception.SystemException { 241 return getPersistence().findAll(); 242 } 243 244 /** 245 * Finds a range of all the browser trackers. 246 * 247 * <p> 248 * 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. 249 * </p> 250 * 251 * @param start the lower bound of the range of browser trackers to return 252 * @param end the upper bound of the range of browser trackers to return (not inclusive) 253 * @return the range of browser trackers 254 * @throws SystemException if a system exception occurred 255 */ 256 public static java.util.List<com.liferay.portal.model.BrowserTracker> findAll( 257 int start, int end) 258 throws com.liferay.portal.kernel.exception.SystemException { 259 return getPersistence().findAll(start, end); 260 } 261 262 /** 263 * Finds an ordered range of all the browser trackers. 264 * 265 * <p> 266 * 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. 267 * </p> 268 * 269 * @param start the lower bound of the range of browser trackers to return 270 * @param end the upper bound of the range of browser trackers to return (not inclusive) 271 * @param orderByComparator the comparator to order the results by 272 * @return the ordered range of browser trackers 273 * @throws SystemException if a system exception occurred 274 */ 275 public static java.util.List<com.liferay.portal.model.BrowserTracker> findAll( 276 int start, int end, 277 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 278 throws com.liferay.portal.kernel.exception.SystemException { 279 return getPersistence().findAll(start, end, orderByComparator); 280 } 281 282 /** 283 * Removes the browser tracker where userId = ? from the database. 284 * 285 * @param userId the user id to search with 286 * @throws SystemException if a system exception occurred 287 */ 288 public static void removeByUserId(long userId) 289 throws com.liferay.portal.NoSuchBrowserTrackerException, 290 com.liferay.portal.kernel.exception.SystemException { 291 getPersistence().removeByUserId(userId); 292 } 293 294 /** 295 * Removes all the browser trackers from the database. 296 * 297 * @throws SystemException if a system exception occurred 298 */ 299 public static void removeAll() 300 throws com.liferay.portal.kernel.exception.SystemException { 301 getPersistence().removeAll(); 302 } 303 304 /** 305 * Counts all the browser trackers where userId = ?. 306 * 307 * @param userId the user id to search with 308 * @return the number of matching browser trackers 309 * @throws SystemException if a system exception occurred 310 */ 311 public static int countByUserId(long userId) 312 throws com.liferay.portal.kernel.exception.SystemException { 313 return getPersistence().countByUserId(userId); 314 } 315 316 /** 317 * Counts all the browser trackers. 318 * 319 * @return the number of browser trackers 320 * @throws SystemException if a system exception occurred 321 */ 322 public static int countAll() 323 throws com.liferay.portal.kernel.exception.SystemException { 324 return getPersistence().countAll(); 325 } 326 327 public static BrowserTrackerPersistence getPersistence() { 328 if (_persistence == null) { 329 _persistence = (BrowserTrackerPersistence)PortalBeanLocatorUtil.locate(BrowserTrackerPersistence.class.getName()); 330 } 331 332 return _persistence; 333 } 334 335 public void setPersistence(BrowserTrackerPersistence persistence) { 336 _persistence = persistence; 337 } 338 339 private static BrowserTrackerPersistence _persistence; 340 }