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