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