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 the first password tracker in the ordered set where userId = &#63;.
083            *
084            * @param userId the user ID
085            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
086            * @return the first matching password tracker
087            * @throws NoSuchPasswordTrackerException if a matching password tracker could not be found
088            */
089            public PasswordTracker findByUserId_First(long userId,
090                    com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator)
091                    throws com.liferay.portal.NoSuchPasswordTrackerException;
092    
093            /**
094            * Returns the first password tracker in the ordered set where userId = &#63;.
095            *
096            * @param userId the user ID
097            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
098            * @return the first matching password tracker, or <code>null</code> if a matching password tracker could not be found
099            */
100            public PasswordTracker fetchByUserId_First(long userId,
101                    com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator);
102    
103            /**
104            * Returns the last password tracker in the ordered set where userId = &#63;.
105            *
106            * @param userId the user ID
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the last matching password tracker
109            * @throws NoSuchPasswordTrackerException if a matching password tracker could not be found
110            */
111            public PasswordTracker findByUserId_Last(long userId,
112                    com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator)
113                    throws com.liferay.portal.NoSuchPasswordTrackerException;
114    
115            /**
116            * Returns the last password tracker in the ordered set where userId = &#63;.
117            *
118            * @param userId the user ID
119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
120            * @return the last matching password tracker, or <code>null</code> if a matching password tracker could not be found
121            */
122            public PasswordTracker fetchByUserId_Last(long userId,
123                    com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator);
124    
125            /**
126            * Returns the password trackers before and after the current password tracker in the ordered set where userId = &#63;.
127            *
128            * @param passwordTrackerId the primary key of the current password tracker
129            * @param userId the user ID
130            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
131            * @return the previous, current, and next password tracker
132            * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
133            */
134            public PasswordTracker[] findByUserId_PrevAndNext(long passwordTrackerId,
135                    long userId,
136                    com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator)
137                    throws com.liferay.portal.NoSuchPasswordTrackerException;
138    
139            /**
140            * Removes all the password trackers where userId = &#63; from the database.
141            *
142            * @param userId the user ID
143            */
144            public void removeByUserId(long userId);
145    
146            /**
147            * Returns the number of password trackers where userId = &#63;.
148            *
149            * @param userId the user ID
150            * @return the number of matching password trackers
151            */
152            public int countByUserId(long userId);
153    
154            /**
155            * Caches the password tracker in the entity cache if it is enabled.
156            *
157            * @param passwordTracker the password tracker
158            */
159            public void cacheResult(PasswordTracker passwordTracker);
160    
161            /**
162            * Caches the password trackers in the entity cache if it is enabled.
163            *
164            * @param passwordTrackers the password trackers
165            */
166            public void cacheResult(java.util.List<PasswordTracker> passwordTrackers);
167    
168            /**
169            * Creates a new password tracker with the primary key. Does not add the password tracker to the database.
170            *
171            * @param passwordTrackerId the primary key for the new password tracker
172            * @return the new password tracker
173            */
174            public PasswordTracker create(long passwordTrackerId);
175    
176            /**
177            * Removes the password tracker with the primary key from the database. Also notifies the appropriate model listeners.
178            *
179            * @param passwordTrackerId the primary key of the password tracker
180            * @return the password tracker that was removed
181            * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
182            */
183            public PasswordTracker remove(long passwordTrackerId)
184                    throws com.liferay.portal.NoSuchPasswordTrackerException;
185    
186            public PasswordTracker updateImpl(PasswordTracker passwordTracker);
187    
188            /**
189            * Returns the password tracker with the primary key or throws a {@link NoSuchPasswordTrackerException} if it could not be found.
190            *
191            * @param passwordTrackerId the primary key of the password tracker
192            * @return the password tracker
193            * @throws NoSuchPasswordTrackerException if a password tracker with the primary key could not be found
194            */
195            public PasswordTracker findByPrimaryKey(long passwordTrackerId)
196                    throws com.liferay.portal.NoSuchPasswordTrackerException;
197    
198            /**
199            * Returns the password tracker with the primary key or returns <code>null</code> if it could not be found.
200            *
201            * @param passwordTrackerId the primary key of the password tracker
202            * @return the password tracker, or <code>null</code> if a password tracker with the primary key could not be found
203            */
204            public PasswordTracker fetchByPrimaryKey(long passwordTrackerId);
205    
206            @Override
207            public java.util.Map<java.io.Serializable, PasswordTracker> fetchByPrimaryKeys(
208                    java.util.Set<java.io.Serializable> primaryKeys);
209    
210            /**
211            * Returns all the password trackers.
212            *
213            * @return the password trackers
214            */
215            public java.util.List<PasswordTracker> findAll();
216    
217            /**
218            * Returns a range of all the password trackers.
219            *
220            * <p>
221            * 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.
222            * </p>
223            *
224            * @param start the lower bound of the range of password trackers
225            * @param end the upper bound of the range of password trackers (not inclusive)
226            * @return the range of password trackers
227            */
228            public java.util.List<PasswordTracker> findAll(int start, int end);
229    
230            /**
231            * Returns an ordered range of all the password trackers.
232            *
233            * <p>
234            * 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.
235            * </p>
236            *
237            * @param start the lower bound of the range of password trackers
238            * @param end the upper bound of the range of password trackers (not inclusive)
239            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
240            * @return the ordered range of password trackers
241            */
242            public java.util.List<PasswordTracker> findAll(int start, int end,
243                    com.liferay.portal.kernel.util.OrderByComparator<PasswordTracker> orderByComparator);
244    
245            /**
246            * Removes all the password trackers from the database.
247            */
248            public void removeAll();
249    
250            /**
251            * Returns the number of password trackers.
252            *
253            * @return the number of password trackers
254            */
255            public int countAll();
256    }