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.kernel.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.NoSuchPasswordTrackerException; 020 import com.liferay.portal.kernel.model.PasswordTracker; 021 022 /** 023 * The persistence interface for the password tracker service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see com.liferay.portal.service.persistence.impl.PasswordTrackerPersistenceImpl 031 * @see PasswordTrackerUtil 032 * @generated 033 */ 034 @ProviderType 035 public interface PasswordTrackerPersistence extends BasePersistence<PasswordTracker> { 036 /* 037 * NOTE FOR DEVELOPERS: 038 * 039 * Never modify or reference this interface directly. Always use {@link PasswordTrackerUtil} to access the password tracker persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 040 */ 041 042 /** 043 * Returns all the password trackers where userId = ?. 044 * 045 * @param userId the user ID 046 * @return the matching password trackers 047 */ 048 public java.util.List<PasswordTracker> findByUserId(long userId); 049 050 /** 051 * Returns a range of all the password trackers where userId = ?. 052 * 053 * <p> 054 * 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. 055 * </p> 056 * 057 * @param userId the user ID 058 * @param start the lower bound of the range of password trackers 059 * @param end the upper bound of the range of password trackers (not inclusive) 060 * @return the range of matching password trackers 061 */ 062 public java.util.List<PasswordTracker> findByUserId(long userId, int start, 063 int end); 064 065 /** 066 * Returns an ordered range of all the password trackers where userId = ?. 067 * 068 * <p> 069 * 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. 070 * </p> 071 * 072 * @param userId the user ID 073 * @param start the lower bound of the range of password trackers 074 * @param end the upper bound of the range of password trackers (not inclusive) 075 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 076 * @return the ordered range of matching password trackers 077 */ 078 public java.util.List<PasswordTracker> findByUserId(long userId, int start, 079 int end, 080 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator); 081 082 /** 083 * Returns an ordered range of all the password trackers where userId = ?. 084 * 085 * <p> 086 * 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. 087 * </p> 088 * 089 * @param userId the user ID 090 * @param start the lower bound of the range of password trackers 091 * @param end the upper bound of the range of password trackers (not inclusive) 092 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 093 * @param retrieveFromCache whether to retrieve from the finder cache 094 * @return the ordered range of matching password trackers 095 */ 096 public java.util.List<PasswordTracker> findByUserId(long userId, int start, 097 int end, 098 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator, 099 boolean retrieveFromCache); 100 101 /** 102 * Returns the first password tracker in the ordered set where userId = ?. 103 * 104 * @param userId the user ID 105 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 106 * @return the first matching password tracker 107 * @throws NoSuchPasswordTrackerException if a matching password tracker could not be found 108 */ 109 public PasswordTracker findByUserId_First(long userId, 110 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator) 111 throws NoSuchPasswordTrackerException; 112 113 /** 114 * Returns the first password tracker in the ordered set where userId = ?. 115 * 116 * @param userId the user ID 117 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 118 * @return the first matching password tracker, or <code>null</code> if a matching password tracker could not be found 119 */ 120 public PasswordTracker fetchByUserId_First(long userId, 121 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator); 122 123 /** 124 * Returns the last password tracker in the ordered set where userId = ?. 125 * 126 * @param userId the user ID 127 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 128 * @return the last matching password tracker 129 * @throws NoSuchPasswordTrackerException if a matching password tracker could not be found 130 */ 131 public PasswordTracker findByUserId_Last(long userId, 132 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator) 133 throws NoSuchPasswordTrackerException; 134 135 /** 136 * Returns the last password tracker in the ordered set where userId = ?. 137 * 138 * @param userId the user ID 139 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 140 * @return the last matching password tracker, or <code>null</code> if a matching password tracker could not be found 141 */ 142 public PasswordTracker fetchByUserId_Last(long userId, 143 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator); 144 145 /** 146 * Returns the password trackers before and after the current password tracker in the ordered set where userId = ?. 147 * 148 * @param passwordTrackerId the primary key of the current password tracker 149 * @param userId the user ID 150 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 151 * @return the previous, current, and next password tracker 152 * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 153 */ 154 public PasswordTracker[] findByUserId_PrevAndNext(long passwordTrackerId, 155 long userId, 156 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator) 157 throws NoSuchPasswordTrackerException; 158 159 /** 160 * Removes all the password trackers where userId = ? from the database. 161 * 162 * @param userId the user ID 163 */ 164 public void removeByUserId(long userId); 165 166 /** 167 * Returns the number of password trackers where userId = ?. 168 * 169 * @param userId the user ID 170 * @return the number of matching password trackers 171 */ 172 public int countByUserId(long userId); 173 174 /** 175 * Caches the password tracker in the entity cache if it is enabled. 176 * 177 * @param passwordTracker the password tracker 178 */ 179 public void cacheResult(PasswordTracker passwordTracker); 180 181 /** 182 * Caches the password trackers in the entity cache if it is enabled. 183 * 184 * @param passwordTrackers the password trackers 185 */ 186 public void cacheResult(java.util.List<PasswordTracker> passwordTrackers); 187 188 /** 189 * Creates a new password tracker with the primary key. Does not add the password tracker to the database. 190 * 191 * @param passwordTrackerId the primary key for the new password tracker 192 * @return the new password tracker 193 */ 194 public PasswordTracker create(long passwordTrackerId); 195 196 /** 197 * Removes the password tracker with the primary key from the database. Also notifies the appropriate model listeners. 198 * 199 * @param passwordTrackerId the primary key of the password tracker 200 * @return the password tracker that was removed 201 * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 202 */ 203 public PasswordTracker remove(long passwordTrackerId) 204 throws NoSuchPasswordTrackerException; 205 206 public PasswordTracker updateImpl(PasswordTracker passwordTracker); 207 208 /** 209 * Returns the password tracker with the primary key or throws a {@link NoSuchPasswordTrackerException} if it could not be found. 210 * 211 * @param passwordTrackerId the primary key of the password tracker 212 * @return the password tracker 213 * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found 214 */ 215 public PasswordTracker findByPrimaryKey(long passwordTrackerId) 216 throws NoSuchPasswordTrackerException; 217 218 /** 219 * Returns the password tracker with the primary key or returns <code>null</code> if it could not be found. 220 * 221 * @param passwordTrackerId the primary key of the password tracker 222 * @return the password tracker, or <code>null</code> if a password tracker with the primary key could not be found 223 */ 224 public PasswordTracker fetchByPrimaryKey(long passwordTrackerId); 225 226 @Override 227 public java.util.Map<java.io.Serializable, PasswordTracker> fetchByPrimaryKeys( 228 java.util.Set<java.io.Serializable> primaryKeys); 229 230 /** 231 * Returns all the password trackers. 232 * 233 * @return the password trackers 234 */ 235 public java.util.List<PasswordTracker> findAll(); 236 237 /** 238 * Returns a range of all the password trackers. 239 * 240 * <p> 241 * 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. 242 * </p> 243 * 244 * @param start the lower bound of the range of password trackers 245 * @param end the upper bound of the range of password trackers (not inclusive) 246 * @return the range of password trackers 247 */ 248 public java.util.List<PasswordTracker> findAll(int start, int end); 249 250 /** 251 * Returns an ordered range of all the password trackers. 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 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. 255 * </p> 256 * 257 * @param start the lower bound of the range of password trackers 258 * @param end the upper bound of the range of password trackers (not inclusive) 259 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 260 * @return the ordered range of password trackers 261 */ 262 public java.util.List<PasswordTracker> findAll(int start, int end, 263 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator); 264 265 /** 266 * Returns an ordered range of all the password trackers. 267 * 268 * <p> 269 * 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. 270 * </p> 271 * 272 * @param start the lower bound of the range of password trackers 273 * @param end the upper bound of the range of password trackers (not inclusive) 274 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 275 * @param retrieveFromCache whether to retrieve from the finder cache 276 * @return the ordered range of password trackers 277 */ 278 public java.util.List<PasswordTracker> findAll(int start, int end, 279 com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator, 280 boolean retrieveFromCache); 281 282 /** 283 * Removes all the password trackers from the database. 284 */ 285 public void removeAll(); 286 287 /** 288 * Returns the number of password trackers. 289 * 290 * @return the number of password trackers 291 */ 292 public int countAll(); 293 294 @Override 295 public java.util.Set<java.lang.String> getBadColumnNames(); 296 }