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.PasswordTracker; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * The persistence utility for the password 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 PasswordTrackerPersistence 035 * @see PasswordTrackerPersistenceImpl 036 * @generated 037 */ 038 public class PasswordTrackerUtil { 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(PasswordTracker passwordTracker) { 050 getPersistence().clearCache(passwordTracker); 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<PasswordTracker> 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<PasswordTracker> 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<PasswordTracker> 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 PasswordTracker remove(PasswordTracker passwordTracker) 093 throws SystemException { 094 return getPersistence().remove(passwordTracker); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static PasswordTracker update(PasswordTracker passwordTracker, 101 boolean merge) throws SystemException { 102 return getPersistence().update(passwordTracker, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static PasswordTracker update(PasswordTracker passwordTracker, 109 boolean merge, ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(passwordTracker, merge, serviceContext); 111 } 112 113 /** 114 * Caches the password tracker in the entity cache if it is enabled. 115 * 116 * @param passwordTracker the password tracker to cache 117 */ 118 public static void cacheResult( 119 com.liferay.portal.model.PasswordTracker passwordTracker) { 120 getPersistence().cacheResult(passwordTracker); 121 } 122 123 /** 124 * Caches the password trackers in the entity cache if it is enabled. 125 * 126 * @param passwordTrackers the password trackers to cache 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portal.model.PasswordTracker> passwordTrackers) { 130 getPersistence().cacheResult(passwordTrackers); 131 } 132 133 /** 134 * Creates a new password tracker with the primary key. 135 * 136 * @param passwordTrackerId the primary key for the new password tracker 137 * @return the new password tracker 138 */ 139 public static com.liferay.portal.model.PasswordTracker create( 140 long passwordTrackerId) { 141 return getPersistence().create(passwordTrackerId); 142 } 143 144 /** 145 * Removes the password tracker with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param passwordTrackerId the primary key of the password tracker to remove 148 * @return the password tracker that was removed 149 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a password 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.PasswordTracker remove( 153 long passwordTrackerId) 154 throws com.liferay.portal.NoSuchPasswordTrackerException, 155 com.liferay.portal.kernel.exception.SystemException { 156 return getPersistence().remove(passwordTrackerId); 157 } 158 159 public static com.liferay.portal.model.PasswordTracker updateImpl( 160 com.liferay.portal.model.PasswordTracker passwordTracker, boolean merge) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(passwordTracker, merge); 163 } 164 165 /** 166 * Finds the password tracker with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordTrackerException} if it could not be found. 167 * 168 * @param passwordTrackerId the primary key of the password tracker to find 169 * @return the password tracker 170 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a password 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.PasswordTracker findByPrimaryKey( 174 long passwordTrackerId) 175 throws com.liferay.portal.NoSuchPasswordTrackerException, 176 com.liferay.portal.kernel.exception.SystemException { 177 return getPersistence().findByPrimaryKey(passwordTrackerId); 178 } 179 180 /** 181 * Finds the password tracker with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param passwordTrackerId the primary key of the password tracker to find 184 * @return the password tracker, or <code>null</code> if a password 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.PasswordTracker fetchByPrimaryKey( 188 long passwordTrackerId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(passwordTrackerId); 191 } 192 193 /** 194 * Finds all the password trackers where userId = ?. 195 * 196 * @param userId the user id to search with 197 * @return the matching password trackers 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId( 201 long userId) throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().findByUserId(userId); 203 } 204 205 /** 206 * Finds a range of all the password trackers where userId = ?. 207 * 208 * <p> 209 * 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. 210 * </p> 211 * 212 * @param userId the user id to search with 213 * @param start the lower bound of the range of password trackers to return 214 * @param end the upper bound of the range of password trackers to return (not inclusive) 215 * @return the range of matching password trackers 216 * @throws SystemException if a system exception occurred 217 */ 218 public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId( 219 long userId, int start, int end) 220 throws com.liferay.portal.kernel.exception.SystemException { 221 return getPersistence().findByUserId(userId, start, end); 222 } 223 224 /** 225 * Finds an ordered range of all the password trackers where userId = ?. 226 * 227 * <p> 228 * 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. 229 * </p> 230 * 231 * @param userId the user id to search with 232 * @param start the lower bound of the range of password trackers to return 233 * @param end the upper bound of the range of password trackers to return (not inclusive) 234 * @param orderByComparator the comparator to order the results by 235 * @return the ordered range of matching password trackers 236 * @throws SystemException if a system exception occurred 237 */ 238 public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId( 239 long userId, int start, int end, 240 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 241 throws com.liferay.portal.kernel.exception.SystemException { 242 return getPersistence() 243 .findByUserId(userId, start, end, orderByComparator); 244 } 245 246 /** 247 * Finds the first password tracker in the ordered set where userId = ?. 248 * 249 * <p> 250 * 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. 251 * </p> 252 * 253 * @param userId the user id to search with 254 * @param orderByComparator the comparator to order the set by 255 * @return the first matching password tracker 256 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a matching password tracker could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.PasswordTracker findByUserId_First( 260 long userId, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.NoSuchPasswordTrackerException, 263 com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence().findByUserId_First(userId, orderByComparator); 265 } 266 267 /** 268 * Finds the last password tracker in the ordered set where userId = ?. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param userId the user id to search with 275 * @param orderByComparator the comparator to order the set by 276 * @return the last matching password tracker 277 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a matching password tracker could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public static com.liferay.portal.model.PasswordTracker findByUserId_Last( 281 long userId, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchPasswordTrackerException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getPersistence().findByUserId_Last(userId, orderByComparator); 286 } 287 288 /** 289 * Finds the password trackers before and after the current password tracker in the ordered set where userId = ?. 290 * 291 * <p> 292 * 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. 293 * </p> 294 * 295 * @param passwordTrackerId the primary key of the current password tracker 296 * @param userId the user id to search with 297 * @param orderByComparator the comparator to order the set by 298 * @return the previous, current, and next password tracker 299 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portal.model.PasswordTracker[] findByUserId_PrevAndNext( 303 long passwordTrackerId, long userId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.NoSuchPasswordTrackerException, 306 com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence() 308 .findByUserId_PrevAndNext(passwordTrackerId, userId, 309 orderByComparator); 310 } 311 312 /** 313 * Finds all the password trackers. 314 * 315 * @return the password trackers 316 * @throws SystemException if a system exception occurred 317 */ 318 public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll() 319 throws com.liferay.portal.kernel.exception.SystemException { 320 return getPersistence().findAll(); 321 } 322 323 /** 324 * Finds a range of all the password trackers. 325 * 326 * <p> 327 * 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. 328 * </p> 329 * 330 * @param start the lower bound of the range of password trackers to return 331 * @param end the upper bound of the range of password trackers to return (not inclusive) 332 * @return the range of password trackers 333 * @throws SystemException if a system exception occurred 334 */ 335 public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll( 336 int start, int end) 337 throws com.liferay.portal.kernel.exception.SystemException { 338 return getPersistence().findAll(start, end); 339 } 340 341 /** 342 * Finds an ordered range of all the password trackers. 343 * 344 * <p> 345 * 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. 346 * </p> 347 * 348 * @param start the lower bound of the range of password trackers to return 349 * @param end the upper bound of the range of password trackers to return (not inclusive) 350 * @param orderByComparator the comparator to order the results by 351 * @return the ordered range of password trackers 352 * @throws SystemException if a system exception occurred 353 */ 354 public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll( 355 int start, int end, 356 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 357 throws com.liferay.portal.kernel.exception.SystemException { 358 return getPersistence().findAll(start, end, orderByComparator); 359 } 360 361 /** 362 * Removes all the password trackers where userId = ? from the database. 363 * 364 * @param userId the user id to search with 365 * @throws SystemException if a system exception occurred 366 */ 367 public static void removeByUserId(long userId) 368 throws com.liferay.portal.kernel.exception.SystemException { 369 getPersistence().removeByUserId(userId); 370 } 371 372 /** 373 * Removes all the password trackers from the database. 374 * 375 * @throws SystemException if a system exception occurred 376 */ 377 public static void removeAll() 378 throws com.liferay.portal.kernel.exception.SystemException { 379 getPersistence().removeAll(); 380 } 381 382 /** 383 * Counts all the password trackers where userId = ?. 384 * 385 * @param userId the user id to search with 386 * @return the number of matching password trackers 387 * @throws SystemException if a system exception occurred 388 */ 389 public static int countByUserId(long userId) 390 throws com.liferay.portal.kernel.exception.SystemException { 391 return getPersistence().countByUserId(userId); 392 } 393 394 /** 395 * Counts all the password trackers. 396 * 397 * @return the number of password trackers 398 * @throws SystemException if a system exception occurred 399 */ 400 public static int countAll() 401 throws com.liferay.portal.kernel.exception.SystemException { 402 return getPersistence().countAll(); 403 } 404 405 public static PasswordTrackerPersistence getPersistence() { 406 if (_persistence == null) { 407 _persistence = (PasswordTrackerPersistence)PortalBeanLocatorUtil.locate(PasswordTrackerPersistence.class.getName()); 408 } 409 410 return _persistence; 411 } 412 413 public void setPersistence(PasswordTrackerPersistence persistence) { 414 _persistence = persistence; 415 } 416 417 private static PasswordTrackerPersistence _persistence; 418 }