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