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