001    /**
002     * Copyright (c) 2000-2013 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.PasswordPolicy;
018    
019    /**
020     * The persistence interface for the password policy 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 PasswordPolicyPersistenceImpl
028     * @see PasswordPolicyUtil
029     * @generated
030     */
031    public interface PasswordPolicyPersistence extends BasePersistence<PasswordPolicy> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link PasswordPolicyUtil} to access the password policy persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Caches the password policy in the entity cache if it is enabled.
040            *
041            * @param passwordPolicy the password policy
042            */
043            public void cacheResult(
044                    com.liferay.portal.model.PasswordPolicy passwordPolicy);
045    
046            /**
047            * Caches the password policies in the entity cache if it is enabled.
048            *
049            * @param passwordPolicies the password policies
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.PasswordPolicy> passwordPolicies);
053    
054            /**
055            * Creates a new password policy with the primary key. Does not add the password policy to the database.
056            *
057            * @param passwordPolicyId the primary key for the new password policy
058            * @return the new password policy
059            */
060            public com.liferay.portal.model.PasswordPolicy create(long passwordPolicyId);
061    
062            /**
063            * Removes the password policy with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param passwordPolicyId the primary key of the password policy
066            * @return the password policy that was removed
067            * @throws com.liferay.portal.NoSuchPasswordPolicyException if a password policy with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public com.liferay.portal.model.PasswordPolicy remove(long passwordPolicyId)
071                    throws com.liferay.portal.NoSuchPasswordPolicyException,
072                            com.liferay.portal.kernel.exception.SystemException;
073    
074            public com.liferay.portal.model.PasswordPolicy updateImpl(
075                    com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
076                    throws com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Returns the password policy with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordPolicyException} if it could not be found.
080            *
081            * @param passwordPolicyId the primary key of the password policy
082            * @return the password policy
083            * @throws com.liferay.portal.NoSuchPasswordPolicyException if a password policy with the primary key could not be found
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portal.model.PasswordPolicy findByPrimaryKey(
087                    long passwordPolicyId)
088                    throws com.liferay.portal.NoSuchPasswordPolicyException,
089                            com.liferay.portal.kernel.exception.SystemException;
090    
091            /**
092            * Returns the password policy with the primary key or returns <code>null</code> if it could not be found.
093            *
094            * @param passwordPolicyId the primary key of the password policy
095            * @return the password policy, or <code>null</code> if a password policy with the primary key could not be found
096            * @throws SystemException if a system exception occurred
097            */
098            public com.liferay.portal.model.PasswordPolicy fetchByPrimaryKey(
099                    long passwordPolicyId)
100                    throws com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Returns the password policy where companyId = &#63; and defaultPolicy = &#63; or throws a {@link com.liferay.portal.NoSuchPasswordPolicyException} if it could not be found.
104            *
105            * @param companyId the company ID
106            * @param defaultPolicy the default policy
107            * @return the matching password policy
108            * @throws com.liferay.portal.NoSuchPasswordPolicyException if a matching password policy could not be found
109            * @throws SystemException if a system exception occurred
110            */
111            public com.liferay.portal.model.PasswordPolicy findByC_DP(long companyId,
112                    boolean defaultPolicy)
113                    throws com.liferay.portal.NoSuchPasswordPolicyException,
114                            com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Returns the password policy where companyId = &#63; and defaultPolicy = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
118            *
119            * @param companyId the company ID
120            * @param defaultPolicy the default policy
121            * @return the matching password policy, or <code>null</code> if a matching password policy could not be found
122            * @throws SystemException if a system exception occurred
123            */
124            public com.liferay.portal.model.PasswordPolicy fetchByC_DP(long companyId,
125                    boolean defaultPolicy)
126                    throws com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns the password policy where companyId = &#63; and defaultPolicy = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
130            *
131            * @param companyId the company ID
132            * @param defaultPolicy the default policy
133            * @param retrieveFromCache whether to use the finder cache
134            * @return the matching password policy, or <code>null</code> if a matching password policy could not be found
135            * @throws SystemException if a system exception occurred
136            */
137            public com.liferay.portal.model.PasswordPolicy fetchByC_DP(long companyId,
138                    boolean defaultPolicy, boolean retrieveFromCache)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Returns the password policy where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchPasswordPolicyException} if it could not be found.
143            *
144            * @param companyId the company ID
145            * @param name the name
146            * @return the matching password policy
147            * @throws com.liferay.portal.NoSuchPasswordPolicyException if a matching password policy could not be found
148            * @throws SystemException if a system exception occurred
149            */
150            public com.liferay.portal.model.PasswordPolicy findByC_N(long companyId,
151                    java.lang.String name)
152                    throws com.liferay.portal.NoSuchPasswordPolicyException,
153                            com.liferay.portal.kernel.exception.SystemException;
154    
155            /**
156            * Returns the password policy where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
157            *
158            * @param companyId the company ID
159            * @param name the name
160            * @return the matching password policy, or <code>null</code> if a matching password policy could not be found
161            * @throws SystemException if a system exception occurred
162            */
163            public com.liferay.portal.model.PasswordPolicy fetchByC_N(long companyId,
164                    java.lang.String name)
165                    throws com.liferay.portal.kernel.exception.SystemException;
166    
167            /**
168            * Returns the password policy where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
169            *
170            * @param companyId the company ID
171            * @param name the name
172            * @param retrieveFromCache whether to use the finder cache
173            * @return the matching password policy, or <code>null</code> if a matching password policy could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portal.model.PasswordPolicy fetchByC_N(long companyId,
177                    java.lang.String name, boolean retrieveFromCache)
178                    throws com.liferay.portal.kernel.exception.SystemException;
179    
180            /**
181            * Returns all the password policies.
182            *
183            * @return the password policies
184            * @throws SystemException if a system exception occurred
185            */
186            public java.util.List<com.liferay.portal.model.PasswordPolicy> findAll()
187                    throws com.liferay.portal.kernel.exception.SystemException;
188    
189            /**
190            * Returns a range of all the password policies.
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 start the lower bound of the range of password policies
197            * @param end the upper bound of the range of password policies (not inclusive)
198            * @return the range of password policies
199            * @throws SystemException if a system exception occurred
200            */
201            public java.util.List<com.liferay.portal.model.PasswordPolicy> findAll(
202                    int start, int end)
203                    throws com.liferay.portal.kernel.exception.SystemException;
204    
205            /**
206            * Returns an ordered range of all the password policies.
207            *
208            * <p>
209            * 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.
210            * </p>
211            *
212            * @param start the lower bound of the range of password policies
213            * @param end the upper bound of the range of password policies (not inclusive)
214            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
215            * @return the ordered range of password policies
216            * @throws SystemException if a system exception occurred
217            */
218            public java.util.List<com.liferay.portal.model.PasswordPolicy> findAll(
219                    int start, int end,
220                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221                    throws com.liferay.portal.kernel.exception.SystemException;
222    
223            /**
224            * Removes the password policy where companyId = &#63; and defaultPolicy = &#63; from the database.
225            *
226            * @param companyId the company ID
227            * @param defaultPolicy the default policy
228            * @return the password policy that was removed
229            * @throws SystemException if a system exception occurred
230            */
231            public com.liferay.portal.model.PasswordPolicy removeByC_DP(
232                    long companyId, boolean defaultPolicy)
233                    throws com.liferay.portal.NoSuchPasswordPolicyException,
234                            com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Removes the password policy where companyId = &#63; and name = &#63; from the database.
238            *
239            * @param companyId the company ID
240            * @param name the name
241            * @return the password policy that was removed
242            * @throws SystemException if a system exception occurred
243            */
244            public com.liferay.portal.model.PasswordPolicy removeByC_N(long companyId,
245                    java.lang.String name)
246                    throws com.liferay.portal.NoSuchPasswordPolicyException,
247                            com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Removes all the password policies from the database.
251            *
252            * @throws SystemException if a system exception occurred
253            */
254            public void removeAll()
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * Returns the number of password policies where companyId = &#63; and defaultPolicy = &#63;.
259            *
260            * @param companyId the company ID
261            * @param defaultPolicy the default policy
262            * @return the number of matching password policies
263            * @throws SystemException if a system exception occurred
264            */
265            public int countByC_DP(long companyId, boolean defaultPolicy)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            /**
269            * Returns the number of password policies where companyId = &#63; and name = &#63;.
270            *
271            * @param companyId the company ID
272            * @param name the name
273            * @return the number of matching password policies
274            * @throws SystemException if a system exception occurred
275            */
276            public int countByC_N(long companyId, java.lang.String name)
277                    throws com.liferay.portal.kernel.exception.SystemException;
278    
279            /**
280            * Returns the number of password policies.
281            *
282            * @return the number of password policies
283            * @throws SystemException if a system exception occurred
284            */
285            public int countAll()
286                    throws com.liferay.portal.kernel.exception.SystemException;
287    }