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;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CompanyLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link CompanyLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       CompanyLocalService
37   * @generated
38   */
39  public class CompanyLocalServiceUtil {
40      public static com.liferay.portal.model.Company addCompany(
41          com.liferay.portal.model.Company company)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addCompany(company);
44      }
45  
46      public static com.liferay.portal.model.Company createCompany(long companyId) {
47          return getService().createCompany(companyId);
48      }
49  
50      public static void deleteCompany(long companyId)
51          throws com.liferay.portal.kernel.exception.PortalException,
52              com.liferay.portal.kernel.exception.SystemException {
53          getService().deleteCompany(companyId);
54      }
55  
56      public static void deleteCompany(com.liferay.portal.model.Company company)
57          throws com.liferay.portal.kernel.exception.SystemException {
58          getService().deleteCompany(company);
59      }
60  
61      public static java.util.List<Object> dynamicQuery(
62          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
63          throws com.liferay.portal.kernel.exception.SystemException {
64          return getService().dynamicQuery(dynamicQuery);
65      }
66  
67      public static java.util.List<Object> dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69          int end) throws com.liferay.portal.kernel.exception.SystemException {
70          return getService().dynamicQuery(dynamicQuery, start, end);
71      }
72  
73      public static java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end,
76          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
77          throws com.liferay.portal.kernel.exception.SystemException {
78          return getService()
79                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
80      }
81  
82      public static int dynamicQueryCount(
83          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().dynamicQueryCount(dynamicQuery);
86      }
87  
88      public static com.liferay.portal.model.Company getCompany(long companyId)
89          throws com.liferay.portal.kernel.exception.PortalException,
90              com.liferay.portal.kernel.exception.SystemException {
91          return getService().getCompany(companyId);
92      }
93  
94      public static java.util.List<com.liferay.portal.model.Company> getCompanies(
95          int start, int end)
96          throws com.liferay.portal.kernel.exception.SystemException {
97          return getService().getCompanies(start, end);
98      }
99  
100     public static int getCompaniesCount()
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getService().getCompaniesCount();
103     }
104 
105     public static com.liferay.portal.model.Company updateCompany(
106         com.liferay.portal.model.Company company)
107         throws com.liferay.portal.kernel.exception.SystemException {
108         return getService().updateCompany(company);
109     }
110 
111     public static com.liferay.portal.model.Company updateCompany(
112         com.liferay.portal.model.Company company, boolean merge)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getService().updateCompany(company, merge);
115     }
116 
117     public static com.liferay.portal.model.Company addCompany(
118         java.lang.String webId, java.lang.String virtualHost,
119         java.lang.String mx, java.lang.String shardName, boolean system)
120         throws com.liferay.portal.kernel.exception.PortalException,
121             com.liferay.portal.kernel.exception.SystemException {
122         return getService().addCompany(webId, virtualHost, mx, shardName, system);
123     }
124 
125     public static com.liferay.portal.model.Company checkCompany(
126         java.lang.String webId)
127         throws com.liferay.portal.kernel.exception.PortalException,
128             com.liferay.portal.kernel.exception.SystemException {
129         return getService().checkCompany(webId);
130     }
131 
132     public static com.liferay.portal.model.Company checkCompany(
133         java.lang.String webId, java.lang.String mx, java.lang.String shardName)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         return getService().checkCompany(webId, mx, shardName);
137     }
138 
139     public static void checkCompanyKey(long companyId)
140         throws com.liferay.portal.kernel.exception.PortalException,
141             com.liferay.portal.kernel.exception.SystemException {
142         getService().checkCompanyKey(companyId);
143     }
144 
145     public static void deleteLogo(long companyId)
146         throws com.liferay.portal.kernel.exception.PortalException,
147             com.liferay.portal.kernel.exception.SystemException {
148         getService().deleteLogo(companyId);
149     }
150 
151     public static java.util.List<com.liferay.portal.model.Company> getCompanies()
152         throws com.liferay.portal.kernel.exception.SystemException {
153         return getService().getCompanies();
154     }
155 
156     public static java.util.List<com.liferay.portal.model.Company> getCompanies(
157         boolean system)
158         throws com.liferay.portal.kernel.exception.SystemException {
159         return getService().getCompanies(system);
160     }
161 
162     public static int getCompaniesCount(boolean system)
163         throws com.liferay.portal.kernel.exception.SystemException {
164         return getService().getCompaniesCount(system);
165     }
166 
167     public static com.liferay.portal.model.Company getCompanyById(
168         long companyId)
169         throws com.liferay.portal.kernel.exception.PortalException,
170             com.liferay.portal.kernel.exception.SystemException {
171         return getService().getCompanyById(companyId);
172     }
173 
174     public static com.liferay.portal.model.Company getCompanyByLogoId(
175         long logoId)
176         throws com.liferay.portal.kernel.exception.PortalException,
177             com.liferay.portal.kernel.exception.SystemException {
178         return getService().getCompanyByLogoId(logoId);
179     }
180 
181     public static com.liferay.portal.model.Company getCompanyByMx(
182         java.lang.String mx)
183         throws com.liferay.portal.kernel.exception.PortalException,
184             com.liferay.portal.kernel.exception.SystemException {
185         return getService().getCompanyByMx(mx);
186     }
187 
188     public static com.liferay.portal.model.Company getCompanyByVirtualHost(
189         java.lang.String virtualHost)
190         throws com.liferay.portal.kernel.exception.PortalException,
191             com.liferay.portal.kernel.exception.SystemException {
192         return getService().getCompanyByVirtualHost(virtualHost);
193     }
194 
195     public static com.liferay.portal.model.Company getCompanyByWebId(
196         java.lang.String webId)
197         throws com.liferay.portal.kernel.exception.PortalException,
198             com.liferay.portal.kernel.exception.SystemException {
199         return getService().getCompanyByWebId(webId);
200     }
201 
202     public static void removePreferences(long companyId, java.lang.String[] keys)
203         throws com.liferay.portal.kernel.exception.SystemException {
204         getService().removePreferences(companyId, keys);
205     }
206 
207     public static com.liferay.portal.kernel.search.Hits search(long companyId,
208         long userId, java.lang.String keywords, int start, int end)
209         throws com.liferay.portal.kernel.exception.SystemException {
210         return getService().search(companyId, userId, keywords, start, end);
211     }
212 
213     public static com.liferay.portal.kernel.search.Hits search(long companyId,
214         long userId, java.lang.String portletId, long groupId,
215         java.lang.String type, java.lang.String keywords, int start, int end)
216         throws com.liferay.portal.kernel.exception.SystemException {
217         return getService()
218                    .search(companyId, userId, portletId, groupId, type,
219             keywords, start, end);
220     }
221 
222     public static com.liferay.portal.model.Company updateCompany(
223         long companyId, java.lang.String virtualHost, java.lang.String mx)
224         throws com.liferay.portal.kernel.exception.PortalException,
225             com.liferay.portal.kernel.exception.SystemException {
226         return getService().updateCompany(companyId, virtualHost, mx);
227     }
228 
229     public static com.liferay.portal.model.Company updateCompany(
230         long companyId, java.lang.String virtualHost, java.lang.String mx,
231         java.lang.String homeURL, java.lang.String name,
232         java.lang.String legalName, java.lang.String legalId,
233         java.lang.String legalType, java.lang.String sicCode,
234         java.lang.String tickerSymbol, java.lang.String industry,
235         java.lang.String type, java.lang.String size)
236         throws com.liferay.portal.kernel.exception.PortalException,
237             com.liferay.portal.kernel.exception.SystemException {
238         return getService()
239                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
240             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
241             type, size);
242     }
243 
244     public static void updateDisplay(long companyId,
245         java.lang.String languageId, java.lang.String timeZoneId)
246         throws com.liferay.portal.kernel.exception.PortalException,
247             com.liferay.portal.kernel.exception.SystemException {
248         getService().updateDisplay(companyId, languageId, timeZoneId);
249     }
250 
251     public static void updateLogo(long companyId, byte[] bytes)
252         throws com.liferay.portal.kernel.exception.PortalException,
253             com.liferay.portal.kernel.exception.SystemException {
254         getService().updateLogo(companyId, bytes);
255     }
256 
257     public static void updateLogo(long companyId, java.io.File file)
258         throws com.liferay.portal.kernel.exception.PortalException,
259             com.liferay.portal.kernel.exception.SystemException {
260         getService().updateLogo(companyId, file);
261     }
262 
263     public static void updateLogo(long companyId, java.io.InputStream is)
264         throws com.liferay.portal.kernel.exception.PortalException,
265             com.liferay.portal.kernel.exception.SystemException {
266         getService().updateLogo(companyId, is);
267     }
268 
269     public static void updatePreferences(long companyId,
270         com.liferay.portal.kernel.util.UnicodeProperties properties)
271         throws com.liferay.portal.kernel.exception.SystemException {
272         getService().updatePreferences(companyId, properties);
273     }
274 
275     public static void updateSecurity(long companyId,
276         java.lang.String authType, boolean autoLogin, boolean sendPassword,
277         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
278         boolean communityLogo)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         getService()
281             .updateSecurity(companyId, authType, autoLogin, sendPassword,
282             strangers, strangersWithMx, strangersVerify, communityLogo);
283     }
284 
285     public static CompanyLocalService getService() {
286         if (_service == null) {
287             _service = (CompanyLocalService)PortalBeanLocatorUtil.locate(CompanyLocalService.class.getName());
288         }
289 
290         return _service;
291     }
292 
293     public void setService(CompanyLocalService service) {
294         _service = service;
295     }
296 
297     private static CompanyLocalService _service;
298 }