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 orderByComparator)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence()
136                    .findByBuildNamespace(buildNamespace, start, end,
137             orderByComparator);
138     }
139 
140     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
141         java.lang.String buildNamespace,
142         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143         throws com.liferay.portal.NoSuchServiceComponentException,
144             com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence()
146                    .findByBuildNamespace_First(buildNamespace, orderByComparator);
147     }
148 
149     public static com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
150         java.lang.String buildNamespace,
151         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152         throws com.liferay.portal.NoSuchServiceComponentException,
153             com.liferay.portal.kernel.exception.SystemException {
154         return getPersistence()
155                    .findByBuildNamespace_Last(buildNamespace, orderByComparator);
156     }
157 
158     public static com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
159         long serviceComponentId, java.lang.String buildNamespace,
160         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161         throws com.liferay.portal.NoSuchServiceComponentException,
162             com.liferay.portal.kernel.exception.SystemException {
163         return getPersistence()
164                    .findByBuildNamespace_PrevAndNext(serviceComponentId,
165             buildNamespace, orderByComparator);
166     }
167 
168     public static com.liferay.portal.model.ServiceComponent findByBNS_BNU(
169         java.lang.String buildNamespace, long buildNumber)
170         throws com.liferay.portal.NoSuchServiceComponentException,
171             com.liferay.portal.kernel.exception.SystemException {
172         return getPersistence().findByBNS_BNU(buildNamespace, buildNumber);
173     }
174 
175     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
176         java.lang.String buildNamespace, long buildNumber)
177         throws com.liferay.portal.kernel.exception.SystemException {
178         return getPersistence().fetchByBNS_BNU(buildNamespace, buildNumber);
179     }
180 
181     public static com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
182         java.lang.String buildNamespace, long buildNumber,
183         boolean retrieveFromCache)
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence()
186                    .fetchByBNS_BNU(buildNamespace, buildNumber,
187             retrieveFromCache);
188     }
189 
190     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findAll();
193     }
194 
195     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
196         int start, int end)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence().findAll(start, end);
199     }
200 
201     public static java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
202         int start, int end,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.kernel.exception.SystemException {
205         return getPersistence().findAll(start, end, orderByComparator);
206     }
207 
208     public static void removeByBuildNamespace(java.lang.String buildNamespace)
209         throws com.liferay.portal.kernel.exception.SystemException {
210         getPersistence().removeByBuildNamespace(buildNamespace);
211     }
212 
213     public static void removeByBNS_BNU(java.lang.String buildNamespace,
214         long buildNumber)
215         throws com.liferay.portal.NoSuchServiceComponentException,
216             com.liferay.portal.kernel.exception.SystemException {
217         getPersistence().removeByBNS_BNU(buildNamespace, buildNumber);
218     }
219 
220     public static void removeAll()
221         throws com.liferay.portal.kernel.exception.SystemException {
222         getPersistence().removeAll();
223     }
224 
225     public static int countByBuildNamespace(java.lang.String buildNamespace)
226         throws com.liferay.portal.kernel.exception.SystemException {
227         return getPersistence().countByBuildNamespace(buildNamespace);
228     }
229 
230     public static int countByBNS_BNU(java.lang.String buildNamespace,
231         long buildNumber)
232         throws com.liferay.portal.kernel.exception.SystemException {
233         return getPersistence().countByBNS_BNU(buildNamespace, buildNumber);
234     }
235 
236     public static int countAll()
237         throws com.liferay.portal.kernel.exception.SystemException {
238         return getPersistence().countAll();
239     }
240 
241     public static ServiceComponentPersistence getPersistence() {
242         if (_persistence == null) {
243             _persistence = (ServiceComponentPersistence)PortalBeanLocatorUtil.locate(ServiceComponentPersistence.class.getName());
244         }
245 
246         return _persistence;
247     }
248 
249     public void setPersistence(ServiceComponentPersistence persistence) {
250         _persistence = persistence;
251     }
252 
253     private static ServiceComponentPersistence _persistence;
254 }