1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service.persistence;
21  
22  /**
23   * <a href="PasswordPolicyRelUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class PasswordPolicyRelUtil {
29      public static com.liferay.portal.model.PasswordPolicyRel create(
30          long passwordPolicyRelId) {
31          return getPersistence().create(passwordPolicyRelId);
32      }
33  
34      public static com.liferay.portal.model.PasswordPolicyRel remove(
35          long passwordPolicyRelId)
36          throws com.liferay.portal.NoSuchPasswordPolicyRelException,
37              com.liferay.portal.SystemException {
38          return getPersistence().remove(passwordPolicyRelId);
39      }
40  
41      public static com.liferay.portal.model.PasswordPolicyRel remove(
42          com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(passwordPolicyRel);
45      }
46  
47      /**
48       * @deprecated Use <code>update(PasswordPolicyRel passwordPolicyRel, boolean merge)</code>.
49       */
50      public static com.liferay.portal.model.PasswordPolicyRel update(
51          com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(passwordPolicyRel);
54      }
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        passwordPolicyRel the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when passwordPolicyRel is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public static com.liferay.portal.model.PasswordPolicyRel update(
70          com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel,
71          boolean merge) throws com.liferay.portal.SystemException {
72          return getPersistence().update(passwordPolicyRel, merge);
73      }
74  
75      public static com.liferay.portal.model.PasswordPolicyRel updateImpl(
76          com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel,
77          boolean merge) throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(passwordPolicyRel, merge);
79      }
80  
81      public static com.liferay.portal.model.PasswordPolicyRel findByPrimaryKey(
82          long passwordPolicyRelId)
83          throws com.liferay.portal.NoSuchPasswordPolicyRelException,
84              com.liferay.portal.SystemException {
85          return getPersistence().findByPrimaryKey(passwordPolicyRelId);
86      }
87  
88      public static com.liferay.portal.model.PasswordPolicyRel fetchByPrimaryKey(
89          long passwordPolicyRelId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(passwordPolicyRelId);
91      }
92  
93      public static com.liferay.portal.model.PasswordPolicyRel findByC_C(
94          long classNameId, long classPK)
95          throws com.liferay.portal.NoSuchPasswordPolicyRelException,
96              com.liferay.portal.SystemException {
97          return getPersistence().findByC_C(classNameId, classPK);
98      }
99  
100     public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C(
101         long classNameId, long classPK)
102         throws com.liferay.portal.SystemException {
103         return getPersistence().fetchByC_C(classNameId, classPK);
104     }
105 
106     public static com.liferay.portal.model.PasswordPolicyRel findByP_C_C(
107         long passwordPolicyId, long classNameId, long classPK)
108         throws com.liferay.portal.NoSuchPasswordPolicyRelException,
109             com.liferay.portal.SystemException {
110         return getPersistence()
111                    .findByP_C_C(passwordPolicyId, classNameId, classPK);
112     }
113 
114     public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
115         long passwordPolicyId, long classNameId, long classPK)
116         throws com.liferay.portal.SystemException {
117         return getPersistence()
118                    .fetchByP_C_C(passwordPolicyId, classNameId, classPK);
119     }
120 
121     public static java.util.List<Object> findWithDynamicQuery(
122         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
123         throws com.liferay.portal.SystemException {
124         return getPersistence().findWithDynamicQuery(dynamicQuery);
125     }
126 
127     public static java.util.List<Object> findWithDynamicQuery(
128         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129         int end) throws com.liferay.portal.SystemException {
130         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
131     }
132 
133     public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll()
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findAll();
136     }
137 
138     public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
139         int start, int end) throws com.liferay.portal.SystemException {
140         return getPersistence().findAll(start, end);
141     }
142 
143     public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
144         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException {
146         return getPersistence().findAll(start, end, obc);
147     }
148 
149     public static void removeByC_C(long classNameId, long classPK)
150         throws com.liferay.portal.NoSuchPasswordPolicyRelException,
151             com.liferay.portal.SystemException {
152         getPersistence().removeByC_C(classNameId, classPK);
153     }
154 
155     public static void removeByP_C_C(long passwordPolicyId, long classNameId,
156         long classPK)
157         throws com.liferay.portal.NoSuchPasswordPolicyRelException,
158             com.liferay.portal.SystemException {
159         getPersistence().removeByP_C_C(passwordPolicyId, classNameId, classPK);
160     }
161 
162     public static void removeAll() throws com.liferay.portal.SystemException {
163         getPersistence().removeAll();
164     }
165 
166     public static int countByC_C(long classNameId, long classPK)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().countByC_C(classNameId, classPK);
169     }
170 
171     public static int countByP_C_C(long passwordPolicyId, long classNameId,
172         long classPK) throws com.liferay.portal.SystemException {
173         return getPersistence()
174                    .countByP_C_C(passwordPolicyId, classNameId, classPK);
175     }
176 
177     public static int countAll() throws com.liferay.portal.SystemException {
178         return getPersistence().countAll();
179     }
180 
181     public static PasswordPolicyRelPersistence getPersistence() {
182         return _persistence;
183     }
184 
185     public void setPersistence(PasswordPolicyRelPersistence persistence) {
186         _persistence = persistence;
187     }
188 
189     private static PasswordPolicyRelPersistence _persistence;
190 }