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