1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.ServiceComponent;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="ServiceComponentUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       ServiceComponentPersistence
35   * @see       ServiceComponentPersistenceImpl
36   * @generated
37   */
38  public class ServiceComponentUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ServiceComponent)
48       */
49      public static void clearCache(ServiceComponent serviceComponent) {
50          getPersistence().clearCache(serviceComponent);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static ServiceComponent remove(ServiceComponent serviceComponent)
81          throws SystemException {
82          return getPersistence().remove(serviceComponent);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static ServiceComponent update(ServiceComponent serviceComponent,
89          boolean merge) throws SystemException {
90          return getPersistence().update(serviceComponent, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.ServiceComponent serviceComponent) {
95          getPersistence().cacheResult(serviceComponent);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.ServiceComponent> serviceComponents) {
100         getPersistence().cacheResult(serviceComponents);
101     }
102 
103     public static com.liferay.portal.model.ServiceComponent create(
104         long serviceComponentId) {
105         return getPersistence().create(serviceComponentId);
106     }
107 
108     public static com.liferay.portal.model.ServiceComponent remove(
109         long serviceComponentId)
110         throws com.liferay.portal.NoSuchServiceComponentException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(serviceComponentId);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.ServiceComponent update(
119         com.liferay.portal.model.ServiceComponent serviceComponent)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(serviceComponent);
122     }
123 
124     public static com.liferay.portal.model.ServiceComponent updateImpl(
125         com.liferay.portal.model.ServiceComponent serviceComponent,
126         boolean merge) throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(serviceComponent, merge);
128     }
129 
130     public static com.liferay.portal.model.ServiceComponent findByPrimaryKey(
131         long serviceComponentId)
132         throws com.liferay.portal.NoSuchServiceComponentException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(serviceComponentId);
135     }
136 
137     public static com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
138         long serviceComponentId) throws com.liferay.portal.SystemException {
139         return getPersistence().fetchByPrimaryKey(serviceComponentId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
143         java.lang.String buildNamespace)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByBuildNamespace(buildNamespace);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
149         java.lang.String buildNamespace, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByBuildNamespace(buildNamespace, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
155         java.lang.String buildNamespace, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByBuildNamespace(buildNamespace, start, end,
160             orderByComparator);
161     }
162 
163     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
164         java.lang.String buildNamespace,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.NoSuchServiceComponentException,
167             com.liferay.portal.SystemException {
168         return getPersistence()
169                    .findByBuildNamespace_First(buildNamespace, orderByComparator);
170     }
171 
172     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
173         java.lang.String buildNamespace,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.NoSuchServiceComponentException,
176             com.liferay.portal.SystemException {
177         return getPersistence()
178                    .findByBuildNamespace_Last(buildNamespace, orderByComparator);
179     }
180 
181     public static com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
182         long serviceComponentId, java.lang.String buildNamespace,
183         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
184         throws com.liferay.portal.NoSuchServiceComponentException,
185             com.liferay.portal.SystemException {
186         return getPersistence()
187                    .findByBuildNamespace_PrevAndNext(serviceComponentId,
188             buildNamespace, orderByComparator);
189     }
190 
191     public static com.liferay.portal.model.ServiceComponent findByBNS_BNU(
192         java.lang.String buildNamespace, long buildNumber)
193         throws com.liferay.portal.NoSuchServiceComponentException,
194             com.liferay.portal.SystemException {
195         return getPersistence().findByBNS_BNU(buildNamespace, buildNumber);
196     }
197 
198     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
199         java.lang.String buildNamespace, long buildNumber)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().fetchByBNS_BNU(buildNamespace, buildNumber);
202     }
203 
204     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
205         java.lang.String buildNamespace, long buildNumber,
206         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
207         return getPersistence()
208                    .fetchByBNS_BNU(buildNamespace, buildNumber,
209             retrieveFromCache);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findAll();
215     }
216 
217     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
218         int start, int end) throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(start, end);
220     }
221 
222     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
223         int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().findAll(start, end, orderByComparator);
227     }
228 
229     public static void removeByBuildNamespace(java.lang.String buildNamespace)
230         throws com.liferay.portal.SystemException {
231         getPersistence().removeByBuildNamespace(buildNamespace);
232     }
233 
234     public static void removeByBNS_BNU(java.lang.String buildNamespace,
235         long buildNumber)
236         throws com.liferay.portal.NoSuchServiceComponentException,
237             com.liferay.portal.SystemException {
238         getPersistence().removeByBNS_BNU(buildNamespace, buildNumber);
239     }
240 
241     public static void removeAll() throws com.liferay.portal.SystemException {
242         getPersistence().removeAll();
243     }
244 
245     public static int countByBuildNamespace(java.lang.String buildNamespace)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().countByBuildNamespace(buildNamespace);
248     }
249 
250     public static int countByBNS_BNU(java.lang.String buildNamespace,
251         long buildNumber) throws com.liferay.portal.SystemException {
252         return getPersistence().countByBNS_BNU(buildNamespace, buildNumber);
253     }
254 
255     public static int countAll() throws com.liferay.portal.SystemException {
256         return getPersistence().countAll();
257     }
258 
259     public static ServiceComponentPersistence getPersistence() {
260         if (_persistence == null) {
261             _persistence = (ServiceComponentPersistence)PortalBeanLocatorUtil.locate(ServiceComponentPersistence.class.getName());
262 
263             ReferenceRegistry.registerReference(ServiceComponentUtil.class,
264                 "_persistence");
265         }
266 
267         return _persistence;
268     }
269 
270     public void setPersistence(ServiceComponentPersistence persistence) {
271         _persistence = persistence;
272 
273         ReferenceRegistry.registerReference(ServiceComponentUtil.class,
274             "_persistence");
275     }
276 
277     private static ServiceComponentPersistence _persistence;
278 }