001    /**
002     * Copyright (c) 2000-2011 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.kernel.exception.SystemException;
018    import com.liferay.portal.model.PasswordPolicyRel;
019    
020    /**
021     * The persistence interface for the password policy rel 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 PasswordPolicyRelPersistenceImpl
029     * @see PasswordPolicyRelUtil
030     * @generated
031     */
032    public interface PasswordPolicyRelPersistence extends BasePersistence<PasswordPolicyRel> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * Never modify or reference this interface directly. Always use {@link PasswordPolicyRelUtil} to access the password policy rel persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
037             */
038    
039            /**
040            * Caches the password policy rel in the entity cache if it is enabled.
041            *
042            * @param passwordPolicyRel the password policy rel
043            */
044            public void cacheResult(
045                    com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel);
046    
047            /**
048            * Caches the password policy rels in the entity cache if it is enabled.
049            *
050            * @param passwordPolicyRels the password policy rels
051            */
052            public void cacheResult(
053                    java.util.List<com.liferay.portal.model.PasswordPolicyRel> passwordPolicyRels);
054    
055            /**
056            * Creates a new password policy rel with the primary key. Does not add the password policy rel to the database.
057            *
058            * @param passwordPolicyRelId the primary key for the new password policy rel
059            * @return the new password policy rel
060            */
061            public com.liferay.portal.model.PasswordPolicyRel create(
062                    long passwordPolicyRelId);
063    
064            /**
065            * Removes the password policy rel with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param passwordPolicyRelId the primary key of the password policy rel
068            * @return the password policy rel that was removed
069            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.PasswordPolicyRel remove(
073                    long passwordPolicyRelId)
074                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            public com.liferay.portal.model.PasswordPolicyRel updateImpl(
078                    com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel,
079                    boolean merge)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Returns the password policy rel with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found.
084            *
085            * @param passwordPolicyRelId the primary key of the password policy rel
086            * @return the password policy rel
087            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.PasswordPolicyRel findByPrimaryKey(
091                    long passwordPolicyRelId)
092                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Returns the password policy rel with the primary key or returns <code>null</code> if it could not be found.
097            *
098            * @param passwordPolicyRelId the primary key of the password policy rel
099            * @return the password policy rel, or <code>null</code> if a password policy rel with the primary key could not be found
100            * @throws SystemException if a system exception occurred
101            */
102            public com.liferay.portal.model.PasswordPolicyRel fetchByPrimaryKey(
103                    long passwordPolicyRelId)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Returns all the password policy rels where passwordPolicyId = &#63;.
108            *
109            * @param passwordPolicyId the password policy ID
110            * @return the matching password policy rels
111            * @throws SystemException if a system exception occurred
112            */
113            public java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId(
114                    long passwordPolicyId)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Returns a range of all the password policy rels where passwordPolicyId = &#63;.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param passwordPolicyId the password policy ID
125            * @param start the lower bound of the range of password policy rels
126            * @param end the upper bound of the range of password policy rels (not inclusive)
127            * @return the range of matching password policy rels
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId(
131                    long passwordPolicyId, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Returns an ordered range of all the password policy rels where passwordPolicyId = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param passwordPolicyId the password policy ID
142            * @param start the lower bound of the range of password policy rels
143            * @param end the upper bound of the range of password policy rels (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching password policy rels
146            * @throws SystemException if a system exception occurred
147            */
148            public java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId(
149                    long passwordPolicyId, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the first password policy rel in the ordered set where passwordPolicyId = &#63;.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param passwordPolicyId the password policy ID
161            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
162            * @return the first matching password policy rel
163            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_First(
167                    long passwordPolicyId,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            /**
173            * Returns the last password policy rel in the ordered set where passwordPolicyId = &#63;.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param passwordPolicyId the password policy ID
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the last matching password policy rel
182            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_Last(
186                    long passwordPolicyId,
187                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
189                            com.liferay.portal.kernel.exception.SystemException;
190    
191            /**
192            * Returns the password policy rels before and after the current password policy rel in the ordered set where passwordPolicyId = &#63;.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param passwordPolicyRelId the primary key of the current password policy rel
199            * @param passwordPolicyId the password policy ID
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the previous, current, and next password policy rel
202            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portal.model.PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext(
206                    long passwordPolicyRelId, long passwordPolicyId,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
209                            com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * Returns the password policy rel where classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found.
213            *
214            * @param classNameId the class name ID
215            * @param classPK the class p k
216            * @return the matching password policy rel
217            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portal.model.PasswordPolicyRel findByC_C(
221                    long classNameId, long classPK)
222                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
223                            com.liferay.portal.kernel.exception.SystemException;
224    
225            /**
226            * Returns the password policy rel where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
227            *
228            * @param classNameId the class name ID
229            * @param classPK the class p k
230            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
231            * @throws SystemException if a system exception occurred
232            */
233            public com.liferay.portal.model.PasswordPolicyRel fetchByC_C(
234                    long classNameId, long classPK)
235                    throws com.liferay.portal.kernel.exception.SystemException;
236    
237            /**
238            * Returns the password policy rel where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
239            *
240            * @param classNameId the class name ID
241            * @param classPK the class p k
242            * @param retrieveFromCache whether to use the finder cache
243            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
244            * @throws SystemException if a system exception occurred
245            */
246            public com.liferay.portal.model.PasswordPolicyRel fetchByC_C(
247                    long classNameId, long classPK, boolean retrieveFromCache)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            /**
251            * Returns the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found.
252            *
253            * @param passwordPolicyId the password policy ID
254            * @param classNameId the class name ID
255            * @param classPK the class p k
256            * @return the matching password policy rel
257            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public com.liferay.portal.model.PasswordPolicyRel findByP_C_C(
261                    long passwordPolicyId, long classNameId, long classPK)
262                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
263                            com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * Returns the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
267            *
268            * @param passwordPolicyId the password policy ID
269            * @param classNameId the class name ID
270            * @param classPK the class p k
271            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
272            * @throws SystemException if a system exception occurred
273            */
274            public com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
275                    long passwordPolicyId, long classNameId, long classPK)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * Returns the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
280            *
281            * @param passwordPolicyId the password policy ID
282            * @param classNameId the class name ID
283            * @param classPK the class p k
284            * @param retrieveFromCache whether to use the finder cache
285            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
286            * @throws SystemException if a system exception occurred
287            */
288            public com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
289                    long passwordPolicyId, long classNameId, long classPK,
290                    boolean retrieveFromCache)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * Returns all the password policy rels.
295            *
296            * @return the password policy rels
297            * @throws SystemException if a system exception occurred
298            */
299            public java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll()
300                    throws com.liferay.portal.kernel.exception.SystemException;
301    
302            /**
303            * Returns a range of all the password policy rels.
304            *
305            * <p>
306            * 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.
307            * </p>
308            *
309            * @param start the lower bound of the range of password policy rels
310            * @param end the upper bound of the range of password policy rels (not inclusive)
311            * @return the range of password policy rels
312            * @throws SystemException if a system exception occurred
313            */
314            public java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
315                    int start, int end)
316                    throws com.liferay.portal.kernel.exception.SystemException;
317    
318            /**
319            * Returns an ordered range of all the password policy rels.
320            *
321            * <p>
322            * 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.
323            * </p>
324            *
325            * @param start the lower bound of the range of password policy rels
326            * @param end the upper bound of the range of password policy rels (not inclusive)
327            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
328            * @return the ordered range of password policy rels
329            * @throws SystemException if a system exception occurred
330            */
331            public java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
332                    int start, int end,
333                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Removes all the password policy rels where passwordPolicyId = &#63; from the database.
338            *
339            * @param passwordPolicyId the password policy ID
340            * @throws SystemException if a system exception occurred
341            */
342            public void removeByPasswordPolicyId(long passwordPolicyId)
343                    throws com.liferay.portal.kernel.exception.SystemException;
344    
345            /**
346            * Removes the password policy rel where classNameId = &#63; and classPK = &#63; from the database.
347            *
348            * @param classNameId the class name ID
349            * @param classPK the class p k
350            * @throws SystemException if a system exception occurred
351            */
352            public void removeByC_C(long classNameId, long classPK)
353                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
354                            com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Removes the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
358            *
359            * @param passwordPolicyId the password policy ID
360            * @param classNameId the class name ID
361            * @param classPK the class p k
362            * @throws SystemException if a system exception occurred
363            */
364            public void removeByP_C_C(long passwordPolicyId, long classNameId,
365                    long classPK)
366                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
367                            com.liferay.portal.kernel.exception.SystemException;
368    
369            /**
370            * Removes all the password policy rels from the database.
371            *
372            * @throws SystemException if a system exception occurred
373            */
374            public void removeAll()
375                    throws com.liferay.portal.kernel.exception.SystemException;
376    
377            /**
378            * Returns the number of password policy rels where passwordPolicyId = &#63;.
379            *
380            * @param passwordPolicyId the password policy ID
381            * @return the number of matching password policy rels
382            * @throws SystemException if a system exception occurred
383            */
384            public int countByPasswordPolicyId(long passwordPolicyId)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            /**
388            * Returns the number of password policy rels where classNameId = &#63; and classPK = &#63;.
389            *
390            * @param classNameId the class name ID
391            * @param classPK the class p k
392            * @return the number of matching password policy rels
393            * @throws SystemException if a system exception occurred
394            */
395            public int countByC_C(long classNameId, long classPK)
396                    throws com.liferay.portal.kernel.exception.SystemException;
397    
398            /**
399            * Returns the number of password policy rels where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63;.
400            *
401            * @param passwordPolicyId the password policy ID
402            * @param classNameId the class name ID
403            * @param classPK the class p k
404            * @return the number of matching password policy rels
405            * @throws SystemException if a system exception occurred
406            */
407            public int countByP_C_C(long passwordPolicyId, long classNameId,
408                    long classPK)
409                    throws com.liferay.portal.kernel.exception.SystemException;
410    
411            /**
412            * Returns the number of password policy rels.
413            *
414            * @return the number of password policy rels
415            * @throws SystemException if a system exception occurred
416            */
417            public int countAll()
418                    throws com.liferay.portal.kernel.exception.SystemException;
419    
420            public PasswordPolicyRel remove(PasswordPolicyRel passwordPolicyRel)
421                    throws SystemException;
422    }