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#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.kernel.exception.SystemException {
96          return getPersistence().remove(serviceComponentId);
97      }
98  
99      public static com.liferay.portal.model.ServiceComponent updateImpl(
100         com.liferay.portal.model.ServiceComponent serviceComponent,
101         boolean merge)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getPersistence().updateImpl(serviceComponent, merge);
104     }
105 
106     public static com.liferay.portal.model.ServiceComponent findByPrimaryKey(
107         long serviceComponentId)
108         throws com.liferay.portal.NoSuchServiceComponentException,
109             com.liferay.portal.kernel.exception.SystemException {
110         return getPersistence().findByPrimaryKey(serviceComponentId);
111     }
112 
113     public static com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
114         long serviceComponentId)
115         throws com.liferay.portal.kernel.exception.SystemException {
116         return getPersistence().fetchByPrimaryKey(serviceComponentId);
117     }
118 
119     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
120         java.lang.String buildNamespace)
121         throws com.liferay.portal.kernel.exception.SystemException {
122         return getPersistence().findByBuildNamespace(buildNamespace);
123     }
124 
125     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
126         java.lang.String buildNamespace, int start, int end)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getPersistence().findByBuildNamespace(buildNamespace, start, end);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
132         java.lang.String buildNamespace, int start, int end,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence()
136                    .findByBuildNamespace(buildNamespace, start, end, obc);
137     }
138 
139     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
140         java.lang.String buildNamespace,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchServiceComponentException,
143             com.liferay.portal.kernel.exception.SystemException {
144         return getPersistence().findByBuildNamespace_First(buildNamespace, obc);
145     }
146 
147     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
148         java.lang.String buildNamespace,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.NoSuchServiceComponentException,
151             com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence().findByBuildNamespace_Last(buildNamespace, obc);
153     }
154 
155     public static com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
156         long serviceComponentId, java.lang.String buildNamespace,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.NoSuchServiceComponentException,
159             com.liferay.portal.kernel.exception.SystemException {
160         return getPersistence()
161                    .findByBuildNamespace_PrevAndNext(serviceComponentId,
162             buildNamespace, obc);
163     }
164 
165     public static com.liferay.portal.model.ServiceComponent findByBNS_BNU(
166         java.lang.String buildNamespace, long buildNumber)
167         throws com.liferay.portal.NoSuchServiceComponentException,
168             com.liferay.portal.kernel.exception.SystemException {
169         return getPersistence().findByBNS_BNU(buildNamespace, buildNumber);
170     }
171 
172     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
173         java.lang.String buildNamespace, long buildNumber)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getPersistence().fetchByBNS_BNU(buildNamespace, buildNumber);
176     }
177 
178     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
179         java.lang.String buildNamespace, long buildNumber,
180         boolean retrieveFromCache)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence()
183                    .fetchByBNS_BNU(buildNamespace, buildNumber,
184             retrieveFromCache);
185     }
186 
187     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
188         throws com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().findAll();
190     }
191 
192     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
193         int start, int end)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence().findAll(start, end);
196     }
197 
198     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
199         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence().findAll(start, end, obc);
202     }
203 
204     public static void removeByBuildNamespace(java.lang.String buildNamespace)
205         throws com.liferay.portal.kernel.exception.SystemException {
206         getPersistence().removeByBuildNamespace(buildNamespace);
207     }
208 
209     public static void removeByBNS_BNU(java.lang.String buildNamespace,
210         long buildNumber)
211         throws com.liferay.portal.NoSuchServiceComponentException,
212             com.liferay.portal.kernel.exception.SystemException {
213         getPersistence().removeByBNS_BNU(buildNamespace, buildNumber);
214     }
215 
216     public static void removeAll()
217         throws com.liferay.portal.kernel.exception.SystemException {
218         getPersistence().removeAll();
219     }
220 
221     public static int countByBuildNamespace(java.lang.String buildNamespace)
222         throws com.liferay.portal.kernel.exception.SystemException {
223         return getPersistence().countByBuildNamespace(buildNamespace);
224     }
225 
226     public static int countByBNS_BNU(java.lang.String buildNamespace,
227         long buildNumber)
228         throws com.liferay.portal.kernel.exception.SystemException {
229         return getPersistence().countByBNS_BNU(buildNamespace, buildNumber);
230     }
231 
232     public static int countAll()
233         throws com.liferay.portal.kernel.exception.SystemException {
234         return getPersistence().countAll();
235     }
236 
237     public static ServiceComponentPersistence getPersistence() {
238         if (_persistence == null) {
239             _persistence = (ServiceComponentPersistence)PortalBeanLocatorUtil.locate(ServiceComponentPersistence.class.getName());
240         }
241 
242         return _persistence;
243     }
244 
245     public void setPersistence(ServiceComponentPersistence persistence) {
246         _persistence = persistence;
247     }
248 
249     private static ServiceComponentPersistence _persistence;
250 }