1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  
26  /**
27   * <a href="CompanyLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portal.service.CompanyLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portal.service.CompanyLocalService
45   *
46   */
47  public class CompanyLocalServiceUtil {
48      public static com.liferay.portal.model.Company addCompany(
49          com.liferay.portal.model.Company company)
50          throws com.liferay.portal.SystemException {
51          return getService().addCompany(company);
52      }
53  
54      public static com.liferay.portal.model.Company createCompany(long companyId) {
55          return getService().createCompany(companyId);
56      }
57  
58      public static void deleteCompany(long companyId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteCompany(companyId);
62      }
63  
64      public static void deleteCompany(com.liferay.portal.model.Company company)
65          throws com.liferay.portal.SystemException {
66          getService().deleteCompany(company);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
71          throws com.liferay.portal.SystemException {
72          return getService().dynamicQuery(dynamicQuery);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end) throws com.liferay.portal.SystemException {
78          return getService().dynamicQuery(dynamicQuery, start, end);
79      }
80  
81      public static com.liferay.portal.model.Company getCompany(long companyId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getCompany(companyId);
85      }
86  
87      public static java.util.List<com.liferay.portal.model.Company> getCompanies(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getCompanies(start, end);
90      }
91  
92      public static int getCompaniesCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getCompaniesCount();
95      }
96  
97      public static com.liferay.portal.model.Company updateCompany(
98          com.liferay.portal.model.Company company)
99          throws com.liferay.portal.SystemException {
100         return getService().updateCompany(company);
101     }
102 
103     public static com.liferay.portal.model.Company addCompany(
104         java.lang.String webId, java.lang.String virtualHost,
105         java.lang.String mx)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService().addCompany(webId, virtualHost, mx);
109     }
110 
111     public static com.liferay.portal.model.Company checkCompany(
112         java.lang.String webId)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService().checkCompany(webId);
116     }
117 
118     public static com.liferay.portal.model.Company checkCompany(
119         java.lang.String webId, java.lang.String mx)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         return getService().checkCompany(webId, mx);
123     }
124 
125     public static void checkCompanyKey(long companyId)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         getService().checkCompanyKey(companyId);
129     }
130 
131     public static java.util.List<com.liferay.portal.model.Company> getCompanies()
132         throws com.liferay.portal.SystemException {
133         return getService().getCompanies();
134     }
135 
136     public static com.liferay.portal.model.Company getCompanyById(
137         long companyId)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         return getService().getCompanyById(companyId);
141     }
142 
143     public static com.liferay.portal.model.Company getCompanyByLogoId(
144         long logoId)
145         throws com.liferay.portal.PortalException,
146             com.liferay.portal.SystemException {
147         return getService().getCompanyByLogoId(logoId);
148     }
149 
150     public static com.liferay.portal.model.Company getCompanyByMx(
151         java.lang.String mx)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         return getService().getCompanyByMx(mx);
155     }
156 
157     public static com.liferay.portal.model.Company getCompanyByVirtualHost(
158         java.lang.String virtualHost)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         return getService().getCompanyByVirtualHost(virtualHost);
162     }
163 
164     public static com.liferay.portal.model.Company getCompanyByWebId(
165         java.lang.String webId)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService().getCompanyByWebId(webId);
169     }
170 
171     public static com.liferay.portal.kernel.search.Hits search(long companyId,
172         java.lang.String keywords, int start, int end)
173         throws com.liferay.portal.SystemException {
174         return getService().search(companyId, keywords, start, end);
175     }
176 
177     public static com.liferay.portal.kernel.search.Hits search(long companyId,
178         java.lang.String portletId, long groupId, java.lang.String type,
179         java.lang.String keywords, int start, int end)
180         throws com.liferay.portal.SystemException {
181         return getService()
182                    .search(companyId, portletId, groupId, type, keywords,
183             start, end);
184     }
185 
186     public static com.liferay.portal.model.Company updateCompany(
187         long companyId, java.lang.String virtualHost, java.lang.String mx)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         return getService().updateCompany(companyId, virtualHost, mx);
191     }
192 
193     public static com.liferay.portal.model.Company updateCompany(
194         long companyId, java.lang.String virtualHost, java.lang.String mx,
195         java.lang.String homeURL, java.lang.String name,
196         java.lang.String legalName, java.lang.String legalId,
197         java.lang.String legalType, java.lang.String sicCode,
198         java.lang.String tickerSymbol, java.lang.String industry,
199         java.lang.String type, java.lang.String size)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         return getService()
203                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
204             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
205             type, size);
206     }
207 
208     public static void updateDisplay(long companyId,
209         java.lang.String languageId, java.lang.String timeZoneId)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException {
212         getService().updateDisplay(companyId, languageId, timeZoneId);
213     }
214 
215     public static void updateLogo(long companyId, byte[] bytes)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         getService().updateLogo(companyId, bytes);
219     }
220 
221     public static void updateLogo(long companyId, java.io.File file)
222         throws com.liferay.portal.PortalException,
223             com.liferay.portal.SystemException {
224         getService().updateLogo(companyId, file);
225     }
226 
227     public static void updateLogo(long companyId, java.io.InputStream is)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException {
230         getService().updateLogo(companyId, is);
231     }
232 
233     public static void updateSecurity(long companyId,
234         java.lang.String authType, boolean autoLogin, boolean sendPassword,
235         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
236         boolean communityLogo) throws com.liferay.portal.SystemException {
237         getService()
238             .updateSecurity(companyId, authType, autoLogin, sendPassword,
239             strangers, strangersWithMx, strangersVerify, communityLogo);
240     }
241 
242     public static CompanyLocalService getService() {
243         if (_service == null) {
244             throw new RuntimeException("CompanyLocalService is not set");
245         }
246 
247         return _service;
248     }
249 
250     public void setService(CompanyLocalService service) {
251         _service = service;
252     }
253 
254     private static CompanyLocalService _service;
255 }