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