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