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