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;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="ServiceComponentLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link ServiceComponentLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       ServiceComponentLocalService
39   * @generated
40   */
41  public class ServiceComponentLocalServiceUtil {
42      public static com.liferay.portal.model.ServiceComponent addServiceComponent(
43          com.liferay.portal.model.ServiceComponent serviceComponent)
44          throws com.liferay.portal.SystemException {
45          return getService().addServiceComponent(serviceComponent);
46      }
47  
48      public static com.liferay.portal.model.ServiceComponent createServiceComponent(
49          long serviceComponentId) {
50          return getService().createServiceComponent(serviceComponentId);
51      }
52  
53      public static void deleteServiceComponent(long serviceComponentId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteServiceComponent(serviceComponentId);
57      }
58  
59      public static void deleteServiceComponent(
60          com.liferay.portal.model.ServiceComponent serviceComponent)
61          throws com.liferay.portal.SystemException {
62          getService().deleteServiceComponent(serviceComponent);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portal.model.ServiceComponent getServiceComponent(
96          long serviceComponentId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getServiceComponent(serviceComponentId);
100     }
101 
102     public static java.util.List<com.liferay.portal.model.ServiceComponent> getServiceComponents(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getServiceComponents(start, end);
105     }
106 
107     public static int getServiceComponentsCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getServiceComponentsCount();
110     }
111 
112     public static com.liferay.portal.model.ServiceComponent updateServiceComponent(
113         com.liferay.portal.model.ServiceComponent serviceComponent)
114         throws com.liferay.portal.SystemException {
115         return getService().updateServiceComponent(serviceComponent);
116     }
117 
118     public static com.liferay.portal.model.ServiceComponent updateServiceComponent(
119         com.liferay.portal.model.ServiceComponent serviceComponent,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateServiceComponent(serviceComponent, merge);
122     }
123 
124     public static void destroyServiceComponent(
125         javax.servlet.ServletContext servletContext,
126         java.lang.ClassLoader classLoader)
127         throws com.liferay.portal.SystemException {
128         getService().destroyServiceComponent(servletContext, classLoader);
129     }
130 
131     public static com.liferay.portal.model.ServiceComponent initServiceComponent(
132         javax.servlet.ServletContext servletContext,
133         java.lang.ClassLoader classLoader, java.lang.String buildNamespace,
134         long buildNumber, long buildDate, boolean buildAutoUpgrade)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException {
137         return getService()
138                    .initServiceComponent(servletContext, classLoader,
139             buildNamespace, buildNumber, buildDate, buildAutoUpgrade);
140     }
141 
142     public static void upgradeDB(java.lang.ClassLoader classLoader,
143         java.lang.String buildNamespace, long buildNumber,
144         boolean buildAutoUpgrade,
145         com.liferay.portal.model.ServiceComponent previousServiceComponent,
146         java.lang.String tablesSQL, java.lang.String sequencesSQL,
147         java.lang.String indexesSQL) throws java.lang.Exception {
148         getService()
149             .upgradeDB(classLoader, buildNamespace, buildNumber,
150             buildAutoUpgrade, previousServiceComponent, tablesSQL,
151             sequencesSQL, indexesSQL);
152     }
153 
154     public static void verifyDB()
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService().verifyDB();
158     }
159 
160     public static ServiceComponentLocalService getService() {
161         if (_service == null) {
162             _service = (ServiceComponentLocalService)PortalBeanLocatorUtil.locate(ServiceComponentLocalService.class.getName());
163 
164             ReferenceRegistry.registerReference(ServiceComponentLocalServiceUtil.class,
165                 "_service");
166             MethodCache.remove(ServiceComponentLocalService.class);
167         }
168 
169         return _service;
170     }
171 
172     public void setService(ServiceComponentLocalService service) {
173         MethodCache.remove(ServiceComponentLocalService.class);
174 
175         _service = service;
176 
177         ReferenceRegistry.registerReference(ServiceComponentLocalServiceUtil.class,
178             "_service");
179         MethodCache.remove(ServiceComponentLocalService.class);
180     }
181 
182     private static ServiceComponentLocalService _service;
183 }