1   /**
2    * Copyright (c) 2000-2009 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.wsrp.service.persistence;
24  
25  /**
26   * <a href="WSRPConfiguredProducerUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class WSRPConfiguredProducerUtil {
32      public static com.liferay.wsrp.model.WSRPConfiguredProducer create(
33          long configuredProducerId) {
34          return getPersistence().create(configuredProducerId);
35      }
36  
37      public static com.liferay.wsrp.model.WSRPConfiguredProducer remove(
38          long configuredProducerId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.wsrp.NoSuchConfiguredProducerException {
41          return getPersistence().remove(configuredProducerId);
42      }
43  
44      public static com.liferay.wsrp.model.WSRPConfiguredProducer remove(
45          com.liferay.wsrp.model.WSRPConfiguredProducer wsrpConfiguredProducer)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(wsrpConfiguredProducer);
48      }
49  
50      /**
51       * @deprecated Use <code>update(WSRPConfiguredProducer wsrpConfiguredProducer, boolean merge)</code>.
52       */
53      public static com.liferay.wsrp.model.WSRPConfiguredProducer update(
54          com.liferay.wsrp.model.WSRPConfiguredProducer wsrpConfiguredProducer)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(wsrpConfiguredProducer);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        wsrpConfiguredProducer the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when wsrpConfiguredProducer is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.wsrp.model.WSRPConfiguredProducer update(
73          com.liferay.wsrp.model.WSRPConfiguredProducer wsrpConfiguredProducer,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(wsrpConfiguredProducer, merge);
76      }
77  
78      public static com.liferay.wsrp.model.WSRPConfiguredProducer updateImpl(
79          com.liferay.wsrp.model.WSRPConfiguredProducer wsrpConfiguredProducer,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(wsrpConfiguredProducer, merge);
82      }
83  
84      public static com.liferay.wsrp.model.WSRPConfiguredProducer findByPrimaryKey(
85          long configuredProducerId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.wsrp.NoSuchConfiguredProducerException {
88          return getPersistence().findByPrimaryKey(configuredProducerId);
89      }
90  
91      public static com.liferay.wsrp.model.WSRPConfiguredProducer fetchByPrimaryKey(
92          long configuredProducerId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(configuredProducerId);
94      }
95  
96      public static java.util.List<com.liferay.wsrp.model.WSRPConfiguredProducer> findByP_N(
97          java.lang.String portalId, java.lang.String namespace)
98          throws com.liferay.portal.SystemException {
99          return getPersistence().findByP_N(portalId, namespace);
100     }
101 
102     public static java.util.List<com.liferay.wsrp.model.WSRPConfiguredProducer> findByP_N(
103         java.lang.String portalId, java.lang.String namespace, int start,
104         int end) throws com.liferay.portal.SystemException {
105         return getPersistence().findByP_N(portalId, namespace, start, end);
106     }
107 
108     public static java.util.List<com.liferay.wsrp.model.WSRPConfiguredProducer> findByP_N(
109         java.lang.String portalId, java.lang.String namespace, int start,
110         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException {
112         return getPersistence().findByP_N(portalId, namespace, start, end, obc);
113     }
114 
115     public static com.liferay.wsrp.model.WSRPConfiguredProducer findByP_N_First(
116         java.lang.String portalId, java.lang.String namespace,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException,
119             com.liferay.wsrp.NoSuchConfiguredProducerException {
120         return getPersistence().findByP_N_First(portalId, namespace, obc);
121     }
122 
123     public static com.liferay.wsrp.model.WSRPConfiguredProducer findByP_N_Last(
124         java.lang.String portalId, java.lang.String namespace,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.SystemException,
127             com.liferay.wsrp.NoSuchConfiguredProducerException {
128         return getPersistence().findByP_N_Last(portalId, namespace, obc);
129     }
130 
131     public static com.liferay.wsrp.model.WSRPConfiguredProducer[] findByP_N_PrevAndNext(
132         long configuredProducerId, java.lang.String portalId,
133         java.lang.String namespace,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException,
136             com.liferay.wsrp.NoSuchConfiguredProducerException {
137         return getPersistence()
138                    .findByP_N_PrevAndNext(configuredProducerId, portalId,
139             namespace, obc);
140     }
141 
142     public static java.util.List<Object> findWithDynamicQuery(
143         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findWithDynamicQuery(dynamicQuery);
146     }
147 
148     public static java.util.List<Object> findWithDynamicQuery(
149         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
150         int end) throws com.liferay.portal.SystemException {
151         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
152     }
153 
154     public static java.util.List<com.liferay.wsrp.model.WSRPConfiguredProducer> findAll()
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findAll();
157     }
158 
159     public static java.util.List<com.liferay.wsrp.model.WSRPConfiguredProducer> findAll(
160         int start, int end) throws com.liferay.portal.SystemException {
161         return getPersistence().findAll(start, end);
162     }
163 
164     public static java.util.List<com.liferay.wsrp.model.WSRPConfiguredProducer> findAll(
165         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findAll(start, end, obc);
168     }
169 
170     public static void removeByP_N(java.lang.String portalId,
171         java.lang.String namespace) throws com.liferay.portal.SystemException {
172         getPersistence().removeByP_N(portalId, namespace);
173     }
174 
175     public static void removeAll() throws com.liferay.portal.SystemException {
176         getPersistence().removeAll();
177     }
178 
179     public static int countByP_N(java.lang.String portalId,
180         java.lang.String namespace) throws com.liferay.portal.SystemException {
181         return getPersistence().countByP_N(portalId, namespace);
182     }
183 
184     public static int countAll() throws com.liferay.portal.SystemException {
185         return getPersistence().countAll();
186     }
187 
188     public static WSRPConfiguredProducerPersistence getPersistence() {
189         return _persistence;
190     }
191 
192     public void setPersistence(WSRPConfiguredProducerPersistence persistence) {
193         _persistence = persistence;
194     }
195 
196     private static WSRPConfiguredProducerPersistence _persistence;
197 }