1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.PasswordPolicy;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="PasswordPolicyUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       PasswordPolicyPersistence
42   * @see       PasswordPolicyPersistenceImpl
43   * @generated
44   */
45  public class PasswordPolicyUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static PasswordPolicy remove(PasswordPolicy passwordPolicy)
73          throws SystemException {
74          return getPersistence().remove(passwordPolicy);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
79       */
80      public static PasswordPolicy update(PasswordPolicy passwordPolicy,
81          boolean merge) throws SystemException {
82          return getPersistence().update(passwordPolicy, merge);
83      }
84  
85      public static void cacheResult(
86          com.liferay.portal.model.PasswordPolicy passwordPolicy) {
87          getPersistence().cacheResult(passwordPolicy);
88      }
89  
90      public static void cacheResult(
91          java.util.List<com.liferay.portal.model.PasswordPolicy> passwordPolicies) {
92          getPersistence().cacheResult(passwordPolicies);
93      }
94  
95      public static com.liferay.portal.model.PasswordPolicy create(
96          long passwordPolicyId) {
97          return getPersistence().create(passwordPolicyId);
98      }
99  
100     public static com.liferay.portal.model.PasswordPolicy remove(
101         long passwordPolicyId)
102         throws com.liferay.portal.NoSuchPasswordPolicyException,
103             com.liferay.portal.SystemException {
104         return getPersistence().remove(passwordPolicyId);
105     }
106 
107     /**
108      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
109      */
110     public static com.liferay.portal.model.PasswordPolicy update(
111         com.liferay.portal.model.PasswordPolicy passwordPolicy)
112         throws com.liferay.portal.SystemException {
113         return getPersistence().update(passwordPolicy);
114     }
115 
116     public static com.liferay.portal.model.PasswordPolicy updateImpl(
117         com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().updateImpl(passwordPolicy, merge);
120     }
121 
122     public static com.liferay.portal.model.PasswordPolicy findByPrimaryKey(
123         long passwordPolicyId)
124         throws com.liferay.portal.NoSuchPasswordPolicyException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByPrimaryKey(passwordPolicyId);
127     }
128 
129     public static com.liferay.portal.model.PasswordPolicy fetchByPrimaryKey(
130         long passwordPolicyId) throws com.liferay.portal.SystemException {
131         return getPersistence().fetchByPrimaryKey(passwordPolicyId);
132     }
133 
134     public static com.liferay.portal.model.PasswordPolicy findByC_DP(
135         long companyId, boolean defaultPolicy)
136         throws com.liferay.portal.NoSuchPasswordPolicyException,
137             com.liferay.portal.SystemException {
138         return getPersistence().findByC_DP(companyId, defaultPolicy);
139     }
140 
141     public static com.liferay.portal.model.PasswordPolicy fetchByC_DP(
142         long companyId, boolean defaultPolicy)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().fetchByC_DP(companyId, defaultPolicy);
145     }
146 
147     public static com.liferay.portal.model.PasswordPolicy fetchByC_DP(
148         long companyId, boolean defaultPolicy, boolean retrieveFromCache)
149         throws com.liferay.portal.SystemException {
150         return getPersistence()
151                    .fetchByC_DP(companyId, defaultPolicy, retrieveFromCache);
152     }
153 
154     public static com.liferay.portal.model.PasswordPolicy findByC_N(
155         long companyId, java.lang.String name)
156         throws com.liferay.portal.NoSuchPasswordPolicyException,
157             com.liferay.portal.SystemException {
158         return getPersistence().findByC_N(companyId, name);
159     }
160 
161     public static com.liferay.portal.model.PasswordPolicy fetchByC_N(
162         long companyId, java.lang.String name)
163         throws com.liferay.portal.SystemException {
164         return getPersistence().fetchByC_N(companyId, name);
165     }
166 
167     public static com.liferay.portal.model.PasswordPolicy fetchByC_N(
168         long companyId, java.lang.String name, boolean retrieveFromCache)
169         throws com.liferay.portal.SystemException {
170         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.PasswordPolicy> findAll()
174         throws com.liferay.portal.SystemException {
175         return getPersistence().findAll();
176     }
177 
178     public static java.util.List<com.liferay.portal.model.PasswordPolicy> findAll(
179         int start, int end) throws com.liferay.portal.SystemException {
180         return getPersistence().findAll(start, end);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.PasswordPolicy> findAll(
184         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findAll(start, end, obc);
187     }
188 
189     public static void removeByC_DP(long companyId, boolean defaultPolicy)
190         throws com.liferay.portal.NoSuchPasswordPolicyException,
191             com.liferay.portal.SystemException {
192         getPersistence().removeByC_DP(companyId, defaultPolicy);
193     }
194 
195     public static void removeByC_N(long companyId, java.lang.String name)
196         throws com.liferay.portal.NoSuchPasswordPolicyException,
197             com.liferay.portal.SystemException {
198         getPersistence().removeByC_N(companyId, name);
199     }
200 
201     public static void removeAll() throws com.liferay.portal.SystemException {
202         getPersistence().removeAll();
203     }
204 
205     public static int countByC_DP(long companyId, boolean defaultPolicy)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().countByC_DP(companyId, defaultPolicy);
208     }
209 
210     public static int countByC_N(long companyId, java.lang.String name)
211         throws com.liferay.portal.SystemException {
212         return getPersistence().countByC_N(companyId, name);
213     }
214 
215     public static int countAll() throws com.liferay.portal.SystemException {
216         return getPersistence().countAll();
217     }
218 
219     public static PasswordPolicyPersistence getPersistence() {
220         if (_persistence == null) {
221             _persistence = (PasswordPolicyPersistence)PortalBeanLocatorUtil.locate(PasswordPolicyPersistence.class.getName());
222         }
223 
224         return _persistence;
225     }
226 
227     public void setPersistence(PasswordPolicyPersistence persistence) {
228         _persistence = persistence;
229     }
230 
231     private static PasswordPolicyPersistence _persistence;
232 }