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