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