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