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.portlet.softwarecatalog.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="SCLicenseLocalServiceUtil.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 SCLicenseLocalService} 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       SCLicenseLocalService
39   * @generated
40   */
41  public class SCLicenseLocalServiceUtil {
42      public static com.liferay.portlet.softwarecatalog.model.SCLicense addSCLicense(
43          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
44          throws com.liferay.portal.SystemException {
45          return getService().addSCLicense(scLicense);
46      }
47  
48      public static com.liferay.portlet.softwarecatalog.model.SCLicense createSCLicense(
49          long licenseId) {
50          return getService().createSCLicense(licenseId);
51      }
52  
53      public static void deleteSCLicense(long licenseId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteSCLicense(licenseId);
57      }
58  
59      public static void deleteSCLicense(
60          com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
61          throws com.liferay.portal.SystemException {
62          getService().deleteSCLicense(scLicense);
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.portlet.softwarecatalog.model.SCLicense getSCLicense(
96          long licenseId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getSCLicense(licenseId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getSCLicenses(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getSCLicenses(start, end);
105     }
106 
107     public static int getSCLicensesCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getSCLicensesCount();
110     }
111 
112     public static com.liferay.portlet.softwarecatalog.model.SCLicense updateSCLicense(
113         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense)
114         throws com.liferay.portal.SystemException {
115         return getService().updateSCLicense(scLicense);
116     }
117 
118     public static com.liferay.portlet.softwarecatalog.model.SCLicense updateSCLicense(
119         com.liferay.portlet.softwarecatalog.model.SCLicense scLicense,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateSCLicense(scLicense, merge);
122     }
123 
124     public static com.liferay.portlet.softwarecatalog.model.SCLicense addLicense(
125         java.lang.String name, java.lang.String url, boolean openSource,
126         boolean active, boolean recommended)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService()
130                    .addLicense(name, url, openSource, active, recommended);
131     }
132 
133     public static void deleteLicense(long licenseId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         getService().deleteLicense(licenseId);
137     }
138 
139     public static com.liferay.portlet.softwarecatalog.model.SCLicense getLicense(
140         long licenseId)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService().getLicense(licenseId);
144     }
145 
146     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses()
147         throws com.liferay.portal.SystemException {
148         return getService().getLicenses();
149     }
150 
151     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
152         boolean active, boolean recommended)
153         throws com.liferay.portal.SystemException {
154         return getService().getLicenses(active, recommended);
155     }
156 
157     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
158         boolean active, boolean recommended, int start, int end)
159         throws com.liferay.portal.SystemException {
160         return getService().getLicenses(active, recommended, start, end);
161     }
162 
163     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getLicenses(
164         int start, int end) throws com.liferay.portal.SystemException {
165         return getService().getLicenses(start, end);
166     }
167 
168     public static int getLicensesCount()
169         throws com.liferay.portal.SystemException {
170         return getService().getLicensesCount();
171     }
172 
173     public static int getLicensesCount(boolean active, boolean recommended)
174         throws com.liferay.portal.SystemException {
175         return getService().getLicensesCount(active, recommended);
176     }
177 
178     public static java.util.List<com.liferay.portlet.softwarecatalog.model.SCLicense> getProductEntryLicenses(
179         long productEntryId) throws com.liferay.portal.SystemException {
180         return getService().getProductEntryLicenses(productEntryId);
181     }
182 
183     public static com.liferay.portlet.softwarecatalog.model.SCLicense updateLicense(
184         long licenseId, java.lang.String name, java.lang.String url,
185         boolean openSource, boolean active, boolean recommended)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         return getService()
189                    .updateLicense(licenseId, name, url, openSource, active,
190             recommended);
191     }
192 
193     public static SCLicenseLocalService getService() {
194         if (_service == null) {
195             _service = (SCLicenseLocalService)PortalBeanLocatorUtil.locate(SCLicenseLocalService.class.getName());
196 
197             ReferenceRegistry.registerReference(SCLicenseLocalServiceUtil.class,
198                 "_service");
199             MethodCache.remove(SCLicenseLocalService.class);
200         }
201 
202         return _service;
203     }
204 
205     public void setService(SCLicenseLocalService service) {
206         MethodCache.remove(SCLicenseLocalService.class);
207 
208         _service = service;
209 
210         ReferenceRegistry.registerReference(SCLicenseLocalServiceUtil.class,
211             "_service");
212         MethodCache.remove(SCLicenseLocalService.class);
213     }
214 
215     private static SCLicenseLocalService _service;
216 }