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  
26  /**
27   * <a href="PasswordPolicyUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       PasswordPolicyPersistence
36   * @see       PasswordPolicyPersistenceImpl
37   * @generated
38   */
39  public class PasswordPolicyUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.PasswordPolicy passwordPolicy) {
42          getPersistence().cacheResult(passwordPolicy);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.PasswordPolicy> passwordPolicies) {
47          getPersistence().cacheResult(passwordPolicies);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.PasswordPolicy create(
55          long passwordPolicyId) {
56          return getPersistence().create(passwordPolicyId);
57      }
58  
59      public static com.liferay.portal.model.PasswordPolicy remove(
60          long passwordPolicyId)
61          throws com.liferay.portal.NoSuchPasswordPolicyException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(passwordPolicyId);
64      }
65  
66      public static com.liferay.portal.model.PasswordPolicy remove(
67          com.liferay.portal.model.PasswordPolicy passwordPolicy)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(passwordPolicy);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(PasswordPolicy, boolean merge)}.
74       */
75      public static com.liferay.portal.model.PasswordPolicy update(
76          com.liferay.portal.model.PasswordPolicy passwordPolicy)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(passwordPolicy);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  passwordPolicy the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when passwordPolicy is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.PasswordPolicy update(
94          com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(passwordPolicy, merge);
97      }
98  
99      public static com.liferay.portal.model.PasswordPolicy updateImpl(
100         com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(passwordPolicy, merge);
103     }
104 
105     public static com.liferay.portal.model.PasswordPolicy findByPrimaryKey(
106         long passwordPolicyId)
107         throws com.liferay.portal.NoSuchPasswordPolicyException,
108             com.liferay.portal.SystemException {
109         return getPersistence().findByPrimaryKey(passwordPolicyId);
110     }
111 
112     public static com.liferay.portal.model.PasswordPolicy fetchByPrimaryKey(
113         long passwordPolicyId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(passwordPolicyId);
115     }
116 
117     public static com.liferay.portal.model.PasswordPolicy findByC_DP(
118         long companyId, boolean defaultPolicy)
119         throws com.liferay.portal.NoSuchPasswordPolicyException,
120             com.liferay.portal.SystemException {
121         return getPersistence().findByC_DP(companyId, defaultPolicy);
122     }
123 
124     public static com.liferay.portal.model.PasswordPolicy fetchByC_DP(
125         long companyId, boolean defaultPolicy)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().fetchByC_DP(companyId, defaultPolicy);
128     }
129 
130     public static com.liferay.portal.model.PasswordPolicy fetchByC_DP(
131         long companyId, boolean defaultPolicy, boolean retrieveFromCache)
132         throws com.liferay.portal.SystemException {
133         return getPersistence()
134                    .fetchByC_DP(companyId, defaultPolicy, retrieveFromCache);
135     }
136 
137     public static com.liferay.portal.model.PasswordPolicy findByC_N(
138         long companyId, java.lang.String name)
139         throws com.liferay.portal.NoSuchPasswordPolicyException,
140             com.liferay.portal.SystemException {
141         return getPersistence().findByC_N(companyId, name);
142     }
143 
144     public static com.liferay.portal.model.PasswordPolicy fetchByC_N(
145         long companyId, java.lang.String name)
146         throws com.liferay.portal.SystemException {
147         return getPersistence().fetchByC_N(companyId, name);
148     }
149 
150     public static com.liferay.portal.model.PasswordPolicy fetchByC_N(
151         long companyId, java.lang.String name, boolean retrieveFromCache)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
154     }
155 
156     public static java.util.List<Object> findWithDynamicQuery(
157         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findWithDynamicQuery(dynamicQuery);
160     }
161 
162     public static java.util.List<Object> findWithDynamicQuery(
163         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
164         int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.PasswordPolicy> findAll()
169         throws com.liferay.portal.SystemException {
170         return getPersistence().findAll();
171     }
172 
173     public static java.util.List<com.liferay.portal.model.PasswordPolicy> findAll(
174         int start, int end) throws com.liferay.portal.SystemException {
175         return getPersistence().findAll(start, end);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.PasswordPolicy> findAll(
179         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findAll(start, end, obc);
182     }
183 
184     public static void removeByC_DP(long companyId, boolean defaultPolicy)
185         throws com.liferay.portal.NoSuchPasswordPolicyException,
186             com.liferay.portal.SystemException {
187         getPersistence().removeByC_DP(companyId, defaultPolicy);
188     }
189 
190     public static void removeByC_N(long companyId, java.lang.String name)
191         throws com.liferay.portal.NoSuchPasswordPolicyException,
192             com.liferay.portal.SystemException {
193         getPersistence().removeByC_N(companyId, name);
194     }
195 
196     public static void removeAll() throws com.liferay.portal.SystemException {
197         getPersistence().removeAll();
198     }
199 
200     public static int countByC_DP(long companyId, boolean defaultPolicy)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().countByC_DP(companyId, defaultPolicy);
203     }
204 
205     public static int countByC_N(long companyId, java.lang.String name)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().countByC_N(companyId, name);
208     }
209 
210     public static int countAll() throws com.liferay.portal.SystemException {
211         return getPersistence().countAll();
212     }
213 
214     public static PasswordPolicyPersistence getPersistence() {
215         return _persistence;
216     }
217 
218     public void setPersistence(PasswordPolicyPersistence persistence) {
219         _persistence = persistence;
220     }
221 
222     private static PasswordPolicyPersistence _persistence;
223 }