1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.ServiceComponent;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="ServiceComponentUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       ServiceComponentPersistence
34   * @see       ServiceComponentPersistenceImpl
35   * @generated
36   */
37  public class ServiceComponentUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ServiceComponent)
47       */
48      public static void clearCache(ServiceComponent serviceComponent) {
49          getPersistence().clearCache(serviceComponent);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<ServiceComponent> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<ServiceComponent> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          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.kernel.exception.SystemException {
112         return getPersistence().remove(serviceComponentId);
113     }
114 
115     public static com.liferay.portal.model.ServiceComponent updateImpl(
116         com.liferay.portal.model.ServiceComponent serviceComponent,
117         boolean merge)
118         throws com.liferay.portal.kernel.exception.SystemException {
119         return getPersistence().updateImpl(serviceComponent, merge);
120     }
121 
122     public static com.liferay.portal.model.ServiceComponent findByPrimaryKey(
123         long serviceComponentId)
124         throws com.liferay.portal.NoSuchServiceComponentException,
125             com.liferay.portal.kernel.exception.SystemException {
126         return getPersistence().findByPrimaryKey(serviceComponentId);
127     }
128 
129     public static com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
130         long serviceComponentId)
131         throws com.liferay.portal.kernel.exception.SystemException {
132         return getPersistence().fetchByPrimaryKey(serviceComponentId);
133     }
134 
135     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
136         java.lang.String buildNamespace)
137         throws com.liferay.portal.kernel.exception.SystemException {
138         return getPersistence().findByBuildNamespace(buildNamespace);
139     }
140 
141     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
142         java.lang.String buildNamespace, int start, int end)
143         throws com.liferay.portal.kernel.exception.SystemException {
144         return getPersistence().findByBuildNamespace(buildNamespace, start, end);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
148         java.lang.String buildNamespace, int start, int end,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.kernel.exception.SystemException {
151         return getPersistence()
152                    .findByBuildNamespace(buildNamespace, start, end,
153             orderByComparator);
154     }
155 
156     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
157         java.lang.String buildNamespace,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.NoSuchServiceComponentException,
160             com.liferay.portal.kernel.exception.SystemException {
161         return getPersistence()
162                    .findByBuildNamespace_First(buildNamespace, orderByComparator);
163     }
164 
165     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
166         java.lang.String buildNamespace,
167         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168         throws com.liferay.portal.NoSuchServiceComponentException,
169             com.liferay.portal.kernel.exception.SystemException {
170         return getPersistence()
171                    .findByBuildNamespace_Last(buildNamespace, orderByComparator);
172     }
173 
174     public static com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
175         long serviceComponentId, java.lang.String buildNamespace,
176         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177         throws com.liferay.portal.NoSuchServiceComponentException,
178             com.liferay.portal.kernel.exception.SystemException {
179         return getPersistence()
180                    .findByBuildNamespace_PrevAndNext(serviceComponentId,
181             buildNamespace, orderByComparator);
182     }
183 
184     public static com.liferay.portal.model.ServiceComponent findByBNS_BNU(
185         java.lang.String buildNamespace, long buildNumber)
186         throws com.liferay.portal.NoSuchServiceComponentException,
187             com.liferay.portal.kernel.exception.SystemException {
188         return getPersistence().findByBNS_BNU(buildNamespace, buildNumber);
189     }
190 
191     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
192         java.lang.String buildNamespace, long buildNumber)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         return getPersistence().fetchByBNS_BNU(buildNamespace, buildNumber);
195     }
196 
197     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
198         java.lang.String buildNamespace, long buildNumber,
199         boolean retrieveFromCache)
200         throws com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence()
202                    .fetchByBNS_BNU(buildNamespace, buildNumber,
203             retrieveFromCache);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getPersistence().findAll();
209     }
210 
211     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
212         int start, int end)
213         throws com.liferay.portal.kernel.exception.SystemException {
214         return getPersistence().findAll(start, end);
215     }
216 
217     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
218         int start, int end,
219         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220         throws com.liferay.portal.kernel.exception.SystemException {
221         return getPersistence().findAll(start, end, orderByComparator);
222     }
223 
224     public static void removeByBuildNamespace(java.lang.String buildNamespace)
225         throws com.liferay.portal.kernel.exception.SystemException {
226         getPersistence().removeByBuildNamespace(buildNamespace);
227     }
228 
229     public static void removeByBNS_BNU(java.lang.String buildNamespace,
230         long buildNumber)
231         throws com.liferay.portal.NoSuchServiceComponentException,
232             com.liferay.portal.kernel.exception.SystemException {
233         getPersistence().removeByBNS_BNU(buildNamespace, buildNumber);
234     }
235 
236     public static void removeAll()
237         throws com.liferay.portal.kernel.exception.SystemException {
238         getPersistence().removeAll();
239     }
240 
241     public static int countByBuildNamespace(java.lang.String buildNamespace)
242         throws com.liferay.portal.kernel.exception.SystemException {
243         return getPersistence().countByBuildNamespace(buildNamespace);
244     }
245 
246     public static int countByBNS_BNU(java.lang.String buildNamespace,
247         long buildNumber)
248         throws com.liferay.portal.kernel.exception.SystemException {
249         return getPersistence().countByBNS_BNU(buildNamespace, buildNumber);
250     }
251 
252     public static int countAll()
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence().countAll();
255     }
256 
257     public static ServiceComponentPersistence getPersistence() {
258         if (_persistence == null) {
259             _persistence = (ServiceComponentPersistence)PortalBeanLocatorUtil.locate(ServiceComponentPersistence.class.getName());
260         }
261 
262         return _persistence;
263     }
264 
265     public void setPersistence(ServiceComponentPersistence persistence) {
266         _persistence = persistence;
267     }
268 
269     private static ServiceComponentPersistence _persistence;
270 }