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