001 /** 002 * Copyright (c) 2000-2013 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.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.PasswordTracker; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the password tracker service. This utility wraps {@link PasswordTrackerPersistenceImpl} 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. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see PasswordTrackerPersistence 036 * @see PasswordTrackerPersistenceImpl 037 * @generated 038 */ 039 public class PasswordTrackerUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(PasswordTracker passwordTracker) { 057 getPersistence().clearCache(passwordTracker); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<PasswordTracker> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<PasswordTracker> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<PasswordTracker> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static PasswordTracker update(PasswordTracker passwordTracker) 100 throws SystemException { 101 return getPersistence().update(passwordTracker); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static PasswordTracker update(PasswordTracker passwordTracker, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(passwordTracker, serviceContext); 110 } 111 112 /** 113 * Returns all the password trackers where userId = ?. 114 * 115 * @param userId the user ID 116 * @return the matching password trackers 117 * @throws SystemException if a system exception occurred 118 */ 119 public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId( 120 long userId) throws com.liferay.portal.kernel.exception.SystemException { 121 return getPersistence().findByUserId(userId); 122 } 123 124 /** 125 * Returns a range of all the password trackers where userId = ?. 126 * 127 * <p> 128 * 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.PasswordTrackerModelImpl}. 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. 129 * </p> 130 * 131 * @param userId the user ID 132 * @param start the lower bound of the range of password trackers 133 * @param end the upper bound of the range of password trackers (not inclusive) 134 * @return the range of matching password trackers 135 * @throws SystemException if a system exception occurred 136 */ 137 public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId( 138 long userId, int start, int end) 139 throws com.liferay.portal.kernel.exception.SystemException { 140 return getPersistence().findByUserId(userId, start, end); 141 } 142 143 /** 144 * Returns an ordered range of all the password trackers where userId = ?. 145 * 146 * <p> 147 * 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.PasswordTrackerModelImpl}. 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. 148 * </p> 149 * 150 * @param userId the user ID 151 * @param start the lower bound of the range of password trackers 152 * @param end the upper bound of the range of password trackers (not inclusive) 153 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 154 * @return the ordered range of matching password trackers 155 * @throws SystemException if a system exception occurred 156 */ 157 public static java.util.List<com.liferay.portal.model.PasswordTracker> findByUserId( 158 long userId, int start, int end, 159 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 160 throws com.liferay.portal.kernel.exception.SystemException { 161 return getPersistence() 162 .findByUserId(userId, start, end, orderByComparator); 163 } 164 165 /** 166 * Returns the first password tracker in the ordered set where userId = ?. 167 * 168 * @param userId the user ID 169 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 170 * @return the first matching password tracker 171 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a matching password tracker could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portal.model.PasswordTracker findByUserId_First( 175 long userId, 176 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 177 throws com.liferay.portal.NoSuchPasswordTrackerException, 178 com.liferay.portal.kernel.exception.SystemException { 179 return getPersistence().findByUserId_First(userId, orderByComparator); 180 } 181 182 /** 183 * Returns the first password tracker in the ordered set where userId = ?. 184 * 185 * @param userId the user ID 186 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 187 * @return the first matching password tracker, or <code>null</code> if a matching password tracker could not be found 188 * @throws SystemException if a system exception occurred 189 */ 190 public static com.liferay.portal.model.PasswordTracker fetchByUserId_First( 191 long userId, 192 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 193 throws com.liferay.portal.kernel.exception.SystemException { 194 return getPersistence().fetchByUserId_First(userId, orderByComparator); 195 } 196 197 /** 198 * Returns the last password tracker in the ordered set where userId = ?. 199 * 200 * @param userId the user ID 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching password tracker 203 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a matching password tracker could not be found 204 * @throws SystemException if a system exception occurred 205 */ 206 public static com.liferay.portal.model.PasswordTracker findByUserId_Last( 207 long userId, 208 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 209 throws com.liferay.portal.NoSuchPasswordTrackerException, 210 com.liferay.portal.kernel.exception.SystemException { 211 return getPersistence().findByUserId_Last(userId, orderByComparator); 212 } 213 214 /** 215 * Returns the last password tracker in the ordered set where userId = ?. 216 * 217 * @param userId the user ID 218 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 219 * @return the last matching password tracker, or <code>null</code> if a matching password tracker could not be found 220 * @throws SystemException if a system exception occurred 221 */ 222 public static com.liferay.portal.model.PasswordTracker fetchByUserId_Last( 223 long userId, 224 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 225 throws com.liferay.portal.kernel.exception.SystemException { 226 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 227 } 228 229 /** 230 * Returns the password trackers before and after the current password tracker in the ordered set where userId = ?. 231 * 232 * @param passwordTrackerId the primary key of the current password tracker 233 * @param userId the user ID 234 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 235 * @return the previous, current, and next password tracker 236 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 237 * @throws SystemException if a system exception occurred 238 */ 239 public static com.liferay.portal.model.PasswordTracker[] findByUserId_PrevAndNext( 240 long passwordTrackerId, long userId, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.NoSuchPasswordTrackerException, 243 com.liferay.portal.kernel.exception.SystemException { 244 return getPersistence() 245 .findByUserId_PrevAndNext(passwordTrackerId, userId, 246 orderByComparator); 247 } 248 249 /** 250 * Removes all the password trackers where userId = ? from the database. 251 * 252 * @param userId the user ID 253 * @throws SystemException if a system exception occurred 254 */ 255 public static void removeByUserId(long userId) 256 throws com.liferay.portal.kernel.exception.SystemException { 257 getPersistence().removeByUserId(userId); 258 } 259 260 /** 261 * Returns the number of password trackers where userId = ?. 262 * 263 * @param userId the user ID 264 * @return the number of matching password trackers 265 * @throws SystemException if a system exception occurred 266 */ 267 public static int countByUserId(long userId) 268 throws com.liferay.portal.kernel.exception.SystemException { 269 return getPersistence().countByUserId(userId); 270 } 271 272 /** 273 * Caches the password tracker in the entity cache if it is enabled. 274 * 275 * @param passwordTracker the password tracker 276 */ 277 public static void cacheResult( 278 com.liferay.portal.model.PasswordTracker passwordTracker) { 279 getPersistence().cacheResult(passwordTracker); 280 } 281 282 /** 283 * Caches the password trackers in the entity cache if it is enabled. 284 * 285 * @param passwordTrackers the password trackers 286 */ 287 public static void cacheResult( 288 java.util.List<com.liferay.portal.model.PasswordTracker> passwordTrackers) { 289 getPersistence().cacheResult(passwordTrackers); 290 } 291 292 /** 293 * Creates a new password tracker with the primary key. Does not add the password tracker to the database. 294 * 295 * @param passwordTrackerId the primary key for the new password tracker 296 * @return the new password tracker 297 */ 298 public static com.liferay.portal.model.PasswordTracker create( 299 long passwordTrackerId) { 300 return getPersistence().create(passwordTrackerId); 301 } 302 303 /** 304 * Removes the password tracker with the primary key from the database. Also notifies the appropriate model listeners. 305 * 306 * @param passwordTrackerId the primary key of the password tracker 307 * @return the password tracker that was removed 308 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 309 * @throws SystemException if a system exception occurred 310 */ 311 public static com.liferay.portal.model.PasswordTracker remove( 312 long passwordTrackerId) 313 throws com.liferay.portal.NoSuchPasswordTrackerException, 314 com.liferay.portal.kernel.exception.SystemException { 315 return getPersistence().remove(passwordTrackerId); 316 } 317 318 public static com.liferay.portal.model.PasswordTracker updateImpl( 319 com.liferay.portal.model.PasswordTracker passwordTracker) 320 throws com.liferay.portal.kernel.exception.SystemException { 321 return getPersistence().updateImpl(passwordTracker); 322 } 323 324 /** 325 * Returns the password tracker with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordTrackerException} if it could not be found. 326 * 327 * @param passwordTrackerId the primary key of the password tracker 328 * @return the password tracker 329 * @throws com.liferay.portal.NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 330 * @throws SystemException if a system exception occurred 331 */ 332 public static com.liferay.portal.model.PasswordTracker findByPrimaryKey( 333 long passwordTrackerId) 334 throws com.liferay.portal.NoSuchPasswordTrackerException, 335 com.liferay.portal.kernel.exception.SystemException { 336 return getPersistence().findByPrimaryKey(passwordTrackerId); 337 } 338 339 /** 340 * Returns the password tracker with the primary key or returns <code>null</code> if it could not be found. 341 * 342 * @param passwordTrackerId the primary key of the password tracker 343 * @return the password tracker, or <code>null</code> if a password tracker with the primary key could not be found 344 * @throws SystemException if a system exception occurred 345 */ 346 public static com.liferay.portal.model.PasswordTracker fetchByPrimaryKey( 347 long passwordTrackerId) 348 throws com.liferay.portal.kernel.exception.SystemException { 349 return getPersistence().fetchByPrimaryKey(passwordTrackerId); 350 } 351 352 /** 353 * Returns all the password trackers. 354 * 355 * @return the password trackers 356 * @throws SystemException if a system exception occurred 357 */ 358 public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll() 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence().findAll(); 361 } 362 363 /** 364 * Returns a range of all the password trackers. 365 * 366 * <p> 367 * 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.PasswordTrackerModelImpl}. 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. 368 * </p> 369 * 370 * @param start the lower bound of the range of password trackers 371 * @param end the upper bound of the range of password trackers (not inclusive) 372 * @return the range of password trackers 373 * @throws SystemException if a system exception occurred 374 */ 375 public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll( 376 int start, int end) 377 throws com.liferay.portal.kernel.exception.SystemException { 378 return getPersistence().findAll(start, end); 379 } 380 381 /** 382 * Returns an ordered range of all the password trackers. 383 * 384 * <p> 385 * 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.PasswordTrackerModelImpl}. 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. 386 * </p> 387 * 388 * @param start the lower bound of the range of password trackers 389 * @param end the upper bound of the range of password trackers (not inclusive) 390 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 391 * @return the ordered range of password trackers 392 * @throws SystemException if a system exception occurred 393 */ 394 public static java.util.List<com.liferay.portal.model.PasswordTracker> findAll( 395 int start, int end, 396 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 397 throws com.liferay.portal.kernel.exception.SystemException { 398 return getPersistence().findAll(start, end, orderByComparator); 399 } 400 401 /** 402 * Removes all the password trackers from the database. 403 * 404 * @throws SystemException if a system exception occurred 405 */ 406 public static void removeAll() 407 throws com.liferay.portal.kernel.exception.SystemException { 408 getPersistence().removeAll(); 409 } 410 411 /** 412 * Returns the number of password trackers. 413 * 414 * @return the number of password trackers 415 * @throws SystemException if a system exception occurred 416 */ 417 public static int countAll() 418 throws com.liferay.portal.kernel.exception.SystemException { 419 return getPersistence().countAll(); 420 } 421 422 public static PasswordTrackerPersistence getPersistence() { 423 if (_persistence == null) { 424 _persistence = (PasswordTrackerPersistence)PortalBeanLocatorUtil.locate(PasswordTrackerPersistence.class.getName()); 425 426 ReferenceRegistry.registerReference(PasswordTrackerUtil.class, 427 "_persistence"); 428 } 429 430 return _persistence; 431 } 432 433 /** 434 * @deprecated As of 6.2.0 435 */ 436 public void setPersistence(PasswordTrackerPersistence persistence) { 437 } 438 439 private static PasswordTrackerPersistence _persistence; 440 }