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.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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static ServiceComponent remove(ServiceComponent serviceComponent)
65          throws SystemException {
66          return getPersistence().remove(serviceComponent);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
71       */
72      public static ServiceComponent update(ServiceComponent serviceComponent,
73          boolean merge) throws SystemException {
74          return getPersistence().update(serviceComponent, merge);
75      }
76  
77      public static void cacheResult(
78          com.liferay.portal.model.ServiceComponent serviceComponent) {
79          getPersistence().cacheResult(serviceComponent);
80      }
81  
82      public static void cacheResult(
83          java.util.List<com.liferay.portal.model.ServiceComponent> serviceComponents) {
84          getPersistence().cacheResult(serviceComponents);
85      }
86  
87      public static com.liferay.portal.model.ServiceComponent create(
88          long serviceComponentId) {
89          return getPersistence().create(serviceComponentId);
90      }
91  
92      public static com.liferay.portal.model.ServiceComponent remove(
93          long serviceComponentId)
94          throws com.liferay.portal.NoSuchServiceComponentException,
95              com.liferay.portal.SystemException {
96          return getPersistence().remove(serviceComponentId);
97      }
98  
99      /**
100      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
101      */
102     public static com.liferay.portal.model.ServiceComponent update(
103         com.liferay.portal.model.ServiceComponent serviceComponent)
104         throws com.liferay.portal.SystemException {
105         return getPersistence().update(serviceComponent);
106     }
107 
108     public static com.liferay.portal.model.ServiceComponent updateImpl(
109         com.liferay.portal.model.ServiceComponent serviceComponent,
110         boolean merge) throws com.liferay.portal.SystemException {
111         return getPersistence().updateImpl(serviceComponent, merge);
112     }
113 
114     public static com.liferay.portal.model.ServiceComponent findByPrimaryKey(
115         long serviceComponentId)
116         throws com.liferay.portal.NoSuchServiceComponentException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByPrimaryKey(serviceComponentId);
119     }
120 
121     public static com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
122         long serviceComponentId) throws com.liferay.portal.SystemException {
123         return getPersistence().fetchByPrimaryKey(serviceComponentId);
124     }
125 
126     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
127         java.lang.String buildNamespace)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().findByBuildNamespace(buildNamespace);
130     }
131 
132     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
133         java.lang.String buildNamespace, int start, int end)
134         throws com.liferay.portal.SystemException {
135         return getPersistence().findByBuildNamespace(buildNamespace, start, end);
136     }
137 
138     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
139         java.lang.String buildNamespace, int start, int end,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.SystemException {
142         return getPersistence()
143                    .findByBuildNamespace(buildNamespace, start, end, obc);
144     }
145 
146     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
147         java.lang.String buildNamespace,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.NoSuchServiceComponentException,
150             com.liferay.portal.SystemException {
151         return getPersistence().findByBuildNamespace_First(buildNamespace, obc);
152     }
153 
154     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
155         java.lang.String buildNamespace,
156         com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.NoSuchServiceComponentException,
158             com.liferay.portal.SystemException {
159         return getPersistence().findByBuildNamespace_Last(buildNamespace, obc);
160     }
161 
162     public static com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
163         long serviceComponentId, java.lang.String buildNamespace,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.NoSuchServiceComponentException,
166             com.liferay.portal.SystemException {
167         return getPersistence()
168                    .findByBuildNamespace_PrevAndNext(serviceComponentId,
169             buildNamespace, obc);
170     }
171 
172     public static com.liferay.portal.model.ServiceComponent findByBNS_BNU(
173         java.lang.String buildNamespace, long buildNumber)
174         throws com.liferay.portal.NoSuchServiceComponentException,
175             com.liferay.portal.SystemException {
176         return getPersistence().findByBNS_BNU(buildNamespace, buildNumber);
177     }
178 
179     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
180         java.lang.String buildNamespace, long buildNumber)
181         throws com.liferay.portal.SystemException {
182         return getPersistence().fetchByBNS_BNU(buildNamespace, buildNumber);
183     }
184 
185     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
186         java.lang.String buildNamespace, long buildNumber,
187         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
188         return getPersistence()
189                    .fetchByBNS_BNU(buildNamespace, buildNumber,
190             retrieveFromCache);
191     }
192 
193     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findAll();
196     }
197 
198     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
199         int start, int end) throws com.liferay.portal.SystemException {
200         return getPersistence().findAll(start, end);
201     }
202 
203     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
204         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findAll(start, end, obc);
207     }
208 
209     public static void removeByBuildNamespace(java.lang.String buildNamespace)
210         throws com.liferay.portal.SystemException {
211         getPersistence().removeByBuildNamespace(buildNamespace);
212     }
213 
214     public static void removeByBNS_BNU(java.lang.String buildNamespace,
215         long buildNumber)
216         throws com.liferay.portal.NoSuchServiceComponentException,
217             com.liferay.portal.SystemException {
218         getPersistence().removeByBNS_BNU(buildNamespace, buildNumber);
219     }
220 
221     public static void removeAll() throws com.liferay.portal.SystemException {
222         getPersistence().removeAll();
223     }
224 
225     public static int countByBuildNamespace(java.lang.String buildNamespace)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().countByBuildNamespace(buildNamespace);
228     }
229 
230     public static int countByBNS_BNU(java.lang.String buildNamespace,
231         long buildNumber) throws com.liferay.portal.SystemException {
232         return getPersistence().countByBNS_BNU(buildNamespace, buildNumber);
233     }
234 
235     public static int countAll() throws com.liferay.portal.SystemException {
236         return getPersistence().countAll();
237     }
238 
239     public static ServiceComponentPersistence getPersistence() {
240         if (_persistence == null) {
241             _persistence = (ServiceComponentPersistence)PortalBeanLocatorUtil.locate(ServiceComponentPersistence.class.getName());
242         }
243 
244         return _persistence;
245     }
246 
247     public void setPersistence(ServiceComponentPersistence persistence) {
248         _persistence = persistence;
249     }
250 
251     private static ServiceComponentPersistence _persistence;
252 }