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="ServiceComponentUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class ServiceComponentUtil {
29      public static com.liferay.portal.model.ServiceComponent create(
30          long serviceComponentId) {
31          return getPersistence().create(serviceComponentId);
32      }
33  
34      public static com.liferay.portal.model.ServiceComponent remove(
35          long serviceComponentId)
36          throws com.liferay.portal.NoSuchServiceComponentException,
37              com.liferay.portal.SystemException {
38          return getPersistence().remove(serviceComponentId);
39      }
40  
41      public static com.liferay.portal.model.ServiceComponent remove(
42          com.liferay.portal.model.ServiceComponent serviceComponent)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(serviceComponent);
45      }
46  
47      /**
48       * @deprecated Use <code>update(ServiceComponent serviceComponent, boolean merge)</code>.
49       */
50      public static com.liferay.portal.model.ServiceComponent update(
51          com.liferay.portal.model.ServiceComponent serviceComponent)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(serviceComponent);
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        serviceComponent 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 serviceComponent 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.ServiceComponent update(
70          com.liferay.portal.model.ServiceComponent serviceComponent,
71          boolean merge) throws com.liferay.portal.SystemException {
72          return getPersistence().update(serviceComponent, merge);
73      }
74  
75      public static com.liferay.portal.model.ServiceComponent updateImpl(
76          com.liferay.portal.model.ServiceComponent serviceComponent,
77          boolean merge) throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(serviceComponent, merge);
79      }
80  
81      public static com.liferay.portal.model.ServiceComponent findByPrimaryKey(
82          long serviceComponentId)
83          throws com.liferay.portal.NoSuchServiceComponentException,
84              com.liferay.portal.SystemException {
85          return getPersistence().findByPrimaryKey(serviceComponentId);
86      }
87  
88      public static com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
89          long serviceComponentId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(serviceComponentId);
91      }
92  
93      public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
94          java.lang.String buildNamespace)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().findByBuildNamespace(buildNamespace);
97      }
98  
99      public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
100         java.lang.String buildNamespace, int start, int end)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().findByBuildNamespace(buildNamespace, start, end);
103     }
104 
105     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
106         java.lang.String buildNamespace, int start, int end,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException {
109         return getPersistence()
110                    .findByBuildNamespace(buildNamespace, start, end, obc);
111     }
112 
113     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
114         java.lang.String buildNamespace,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchServiceComponentException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByBuildNamespace_First(buildNamespace, obc);
119     }
120 
121     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
122         java.lang.String buildNamespace,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.NoSuchServiceComponentException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByBuildNamespace_Last(buildNamespace, obc);
127     }
128 
129     public static com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
130         long serviceComponentId, java.lang.String buildNamespace,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.NoSuchServiceComponentException,
133             com.liferay.portal.SystemException {
134         return getPersistence()
135                    .findByBuildNamespace_PrevAndNext(serviceComponentId,
136             buildNamespace, obc);
137     }
138 
139     public static com.liferay.portal.model.ServiceComponent findByBNS_BNU(
140         java.lang.String buildNamespace, long buildNumber)
141         throws com.liferay.portal.NoSuchServiceComponentException,
142             com.liferay.portal.SystemException {
143         return getPersistence().findByBNS_BNU(buildNamespace, buildNumber);
144     }
145 
146     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
147         java.lang.String buildNamespace, long buildNumber)
148         throws com.liferay.portal.SystemException {
149         return getPersistence().fetchByBNS_BNU(buildNamespace, buildNumber);
150     }
151 
152     public static java.util.List<Object> findWithDynamicQuery(
153         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
154         throws com.liferay.portal.SystemException {
155         return getPersistence().findWithDynamicQuery(dynamicQuery);
156     }
157 
158     public static java.util.List<Object> findWithDynamicQuery(
159         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
160         int end) throws com.liferay.portal.SystemException {
161         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findAll();
167     }
168 
169     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
170         int start, int end) throws com.liferay.portal.SystemException {
171         return getPersistence().findAll(start, end);
172     }
173 
174     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
175         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().findAll(start, end, obc);
178     }
179 
180     public static void removeByBuildNamespace(java.lang.String buildNamespace)
181         throws com.liferay.portal.SystemException {
182         getPersistence().removeByBuildNamespace(buildNamespace);
183     }
184 
185     public static void removeByBNS_BNU(java.lang.String buildNamespace,
186         long buildNumber)
187         throws com.liferay.portal.NoSuchServiceComponentException,
188             com.liferay.portal.SystemException {
189         getPersistence().removeByBNS_BNU(buildNamespace, buildNumber);
190     }
191 
192     public static void removeAll() throws com.liferay.portal.SystemException {
193         getPersistence().removeAll();
194     }
195 
196     public static int countByBuildNamespace(java.lang.String buildNamespace)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().countByBuildNamespace(buildNamespace);
199     }
200 
201     public static int countByBNS_BNU(java.lang.String buildNamespace,
202         long buildNumber) throws com.liferay.portal.SystemException {
203         return getPersistence().countByBNS_BNU(buildNamespace, buildNumber);
204     }
205 
206     public static int countAll() throws com.liferay.portal.SystemException {
207         return getPersistence().countAll();
208     }
209 
210     public static ServiceComponentPersistence getPersistence() {
211         return _persistence;
212     }
213 
214     public void setPersistence(ServiceComponentPersistence persistence) {
215         _persistence = persistence;
216     }
217 
218     private static ServiceComponentPersistence _persistence;
219 }