1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="PasswordPolicyUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class PasswordPolicyUtil {
32      public static com.liferay.portal.model.PasswordPolicy create(
33          long passwordPolicyId) {
34          return getPersistence().create(passwordPolicyId);
35      }
36  
37      public static com.liferay.portal.model.PasswordPolicy remove(
38          long passwordPolicyId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portal.NoSuchPasswordPolicyException {
41          return getPersistence().remove(passwordPolicyId);
42      }
43  
44      public static com.liferay.portal.model.PasswordPolicy remove(
45          com.liferay.portal.model.PasswordPolicy passwordPolicy)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(passwordPolicy);
48      }
49  
50      public static com.liferay.portal.model.PasswordPolicy update(
51          com.liferay.portal.model.PasswordPolicy passwordPolicy)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(passwordPolicy);
54      }
55  
56      public static com.liferay.portal.model.PasswordPolicy update(
57          com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
58          throws com.liferay.portal.SystemException {
59          return getPersistence().update(passwordPolicy, merge);
60      }
61  
62      public static com.liferay.portal.model.PasswordPolicy updateImpl(
63          com.liferay.portal.model.PasswordPolicy passwordPolicy, boolean merge)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(passwordPolicy, merge);
66      }
67  
68      public static com.liferay.portal.model.PasswordPolicy findByPrimaryKey(
69          long passwordPolicyId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchPasswordPolicyException {
72          return getPersistence().findByPrimaryKey(passwordPolicyId);
73      }
74  
75      public static com.liferay.portal.model.PasswordPolicy fetchByPrimaryKey(
76          long passwordPolicyId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(passwordPolicyId);
78      }
79  
80      public static com.liferay.portal.model.PasswordPolicy findByC_DP(
81          long companyId, boolean defaultPolicy)
82          throws com.liferay.portal.SystemException, 
83              com.liferay.portal.NoSuchPasswordPolicyException {
84          return getPersistence().findByC_DP(companyId, defaultPolicy);
85      }
86  
87      public static com.liferay.portal.model.PasswordPolicy fetchByC_DP(
88          long companyId, boolean defaultPolicy)
89          throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByC_DP(companyId, defaultPolicy);
91      }
92  
93      public static com.liferay.portal.model.PasswordPolicy findByC_N(
94          long companyId, java.lang.String name)
95          throws com.liferay.portal.SystemException, 
96              com.liferay.portal.NoSuchPasswordPolicyException {
97          return getPersistence().findByC_N(companyId, name);
98      }
99  
100     public static com.liferay.portal.model.PasswordPolicy fetchByC_N(
101         long companyId, java.lang.String name)
102         throws com.liferay.portal.SystemException {
103         return getPersistence().fetchByC_N(companyId, name);
104     }
105 
106     public static java.util.List findWithDynamicQuery(
107         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().findWithDynamicQuery(queryInitializer);
110     }
111 
112     public static java.util.List findWithDynamicQuery(
113         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
114         int begin, int end) throws com.liferay.portal.SystemException {
115         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
116             end);
117     }
118 
119     public static java.util.List findAll()
120         throws com.liferay.portal.SystemException {
121         return getPersistence().findAll();
122     }
123 
124     public static java.util.List findAll(int begin, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findAll(begin, end);
127     }
128 
129     public static java.util.List findAll(int begin, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findAll(begin, end, obc);
133     }
134 
135     public static void removeByC_DP(long companyId, boolean defaultPolicy)
136         throws com.liferay.portal.SystemException, 
137             com.liferay.portal.NoSuchPasswordPolicyException {
138         getPersistence().removeByC_DP(companyId, defaultPolicy);
139     }
140 
141     public static void removeByC_N(long companyId, java.lang.String name)
142         throws com.liferay.portal.SystemException, 
143             com.liferay.portal.NoSuchPasswordPolicyException {
144         getPersistence().removeByC_N(companyId, name);
145     }
146 
147     public static void removeAll() throws com.liferay.portal.SystemException {
148         getPersistence().removeAll();
149     }
150 
151     public static int countByC_DP(long companyId, boolean defaultPolicy)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().countByC_DP(companyId, defaultPolicy);
154     }
155 
156     public static int countByC_N(long companyId, java.lang.String name)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().countByC_N(companyId, name);
159     }
160 
161     public static int countAll() throws com.liferay.portal.SystemException {
162         return getPersistence().countAll();
163     }
164 
165     public static PasswordPolicyPersistence getPersistence() {
166         return _getUtil()._persistence;
167     }
168 
169     public void setPersistence(PasswordPolicyPersistence persistence) {
170         _persistence = persistence;
171     }
172 
173     private static PasswordPolicyUtil _getUtil() {
174         if (_util == null) {
175             _util = (PasswordPolicyUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
176         }
177 
178         return _util;
179     }
180 
181     private static final String _UTIL = PasswordPolicyUtil.class.getName();
182     private static PasswordPolicyUtil _util;
183     private PasswordPolicyPersistence _persistence;
184 }