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 com.liferay.portal.model.Company getCompany(long companyId)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          return getService().getCompany(companyId);
77      }
78  
79      public static java.util.List<com.liferay.portal.model.Company> getCompanies(
80          int start, int end)
81          throws com.liferay.portal.kernel.exception.SystemException {
82          return getService().getCompanies(start, end);
83      }
84  
85      public static int getCompaniesCount()
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().getCompaniesCount();
88      }
89  
90      public static com.liferay.portal.model.Company updateCompany(
91          com.liferay.portal.model.Company company)
92          throws com.liferay.portal.kernel.exception.SystemException {
93          return getService().updateCompany(company);
94      }
95  
96      public static com.liferay.portal.model.Company updateCompany(
97          com.liferay.portal.model.Company company, boolean merge)
98          throws com.liferay.portal.kernel.exception.SystemException {
99          return getService().updateCompany(company, merge);
100     }
101 
102     public static com.liferay.portal.model.Company addCompany(
103         java.lang.String webId, java.lang.String virtualHost,
104         java.lang.String mx, java.lang.String shardName, boolean system)
105         throws com.liferay.portal.kernel.exception.PortalException,
106             com.liferay.portal.kernel.exception.SystemException {
107         return getService().addCompany(webId, virtualHost, mx, shardName, system);
108     }
109 
110     public static com.liferay.portal.model.Company checkCompany(
111         java.lang.String webId)
112         throws com.liferay.portal.kernel.exception.PortalException,
113             com.liferay.portal.kernel.exception.SystemException {
114         return getService().checkCompany(webId);
115     }
116 
117     public static com.liferay.portal.model.Company checkCompany(
118         java.lang.String webId, java.lang.String mx, java.lang.String shardName)
119         throws com.liferay.portal.kernel.exception.PortalException,
120             com.liferay.portal.kernel.exception.SystemException {
121         return getService().checkCompany(webId, mx, shardName);
122     }
123 
124     public static void checkCompanyKey(long companyId)
125         throws com.liferay.portal.kernel.exception.PortalException,
126             com.liferay.portal.kernel.exception.SystemException {
127         getService().checkCompanyKey(companyId);
128     }
129 
130     public static void deleteLogo(long companyId)
131         throws com.liferay.portal.kernel.exception.PortalException,
132             com.liferay.portal.kernel.exception.SystemException {
133         getService().deleteLogo(companyId);
134     }
135 
136     public static java.util.List<com.liferay.portal.model.Company> getCompanies()
137         throws com.liferay.portal.kernel.exception.SystemException {
138         return getService().getCompanies();
139     }
140 
141     public static java.util.List<com.liferay.portal.model.Company> getCompanies(
142         boolean system)
143         throws com.liferay.portal.kernel.exception.SystemException {
144         return getService().getCompanies(system);
145     }
146 
147     public static int getCompaniesCount(boolean system)
148         throws com.liferay.portal.kernel.exception.SystemException {
149         return getService().getCompaniesCount(system);
150     }
151 
152     public static com.liferay.portal.model.Company getCompanyById(
153         long companyId)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException {
156         return getService().getCompanyById(companyId);
157     }
158 
159     public static com.liferay.portal.model.Company getCompanyByLogoId(
160         long logoId)
161         throws com.liferay.portal.kernel.exception.PortalException,
162             com.liferay.portal.kernel.exception.SystemException {
163         return getService().getCompanyByLogoId(logoId);
164     }
165 
166     public static com.liferay.portal.model.Company getCompanyByMx(
167         java.lang.String mx)
168         throws com.liferay.portal.kernel.exception.PortalException,
169             com.liferay.portal.kernel.exception.SystemException {
170         return getService().getCompanyByMx(mx);
171     }
172 
173     public static com.liferay.portal.model.Company getCompanyByVirtualHost(
174         java.lang.String virtualHost)
175         throws com.liferay.portal.kernel.exception.PortalException,
176             com.liferay.portal.kernel.exception.SystemException {
177         return getService().getCompanyByVirtualHost(virtualHost);
178     }
179 
180     public static com.liferay.portal.model.Company getCompanyByWebId(
181         java.lang.String webId)
182         throws com.liferay.portal.kernel.exception.PortalException,
183             com.liferay.portal.kernel.exception.SystemException {
184         return getService().getCompanyByWebId(webId);
185     }
186 
187     public static void removePreferences(long companyId, java.lang.String[] keys)
188         throws com.liferay.portal.kernel.exception.SystemException {
189         getService().removePreferences(companyId, keys);
190     }
191 
192     public static com.liferay.portal.kernel.search.Hits search(long companyId,
193         long userId, java.lang.String keywords, int start, int end)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getService().search(companyId, userId, keywords, start, end);
196     }
197 
198     public static com.liferay.portal.kernel.search.Hits search(long companyId,
199         long userId, java.lang.String portletId, long groupId,
200         java.lang.String type, java.lang.String keywords, int start, int end)
201         throws com.liferay.portal.kernel.exception.SystemException {
202         return getService()
203                    .search(companyId, userId, portletId, groupId, type,
204             keywords, start, end);
205     }
206 
207     public static com.liferay.portal.model.Company updateCompany(
208         long companyId, java.lang.String virtualHost, java.lang.String mx)
209         throws com.liferay.portal.kernel.exception.PortalException,
210             com.liferay.portal.kernel.exception.SystemException {
211         return getService().updateCompany(companyId, virtualHost, mx);
212     }
213 
214     public static com.liferay.portal.model.Company updateCompany(
215         long companyId, java.lang.String virtualHost, java.lang.String mx,
216         java.lang.String homeURL, java.lang.String name,
217         java.lang.String legalName, java.lang.String legalId,
218         java.lang.String legalType, java.lang.String sicCode,
219         java.lang.String tickerSymbol, java.lang.String industry,
220         java.lang.String type, java.lang.String size)
221         throws com.liferay.portal.kernel.exception.PortalException,
222             com.liferay.portal.kernel.exception.SystemException {
223         return getService()
224                    .updateCompany(companyId, virtualHost, mx, homeURL, name,
225             legalName, legalId, legalType, sicCode, tickerSymbol, industry,
226             type, size);
227     }
228 
229     public static void updateDisplay(long companyId,
230         java.lang.String languageId, java.lang.String timeZoneId)
231         throws com.liferay.portal.kernel.exception.PortalException,
232             com.liferay.portal.kernel.exception.SystemException {
233         getService().updateDisplay(companyId, languageId, timeZoneId);
234     }
235 
236     public static void updateLogo(long companyId, byte[] bytes)
237         throws com.liferay.portal.kernel.exception.PortalException,
238             com.liferay.portal.kernel.exception.SystemException {
239         getService().updateLogo(companyId, bytes);
240     }
241 
242     public static void updateLogo(long companyId, java.io.File file)
243         throws com.liferay.portal.kernel.exception.PortalException,
244             com.liferay.portal.kernel.exception.SystemException {
245         getService().updateLogo(companyId, file);
246     }
247 
248     public static void updateLogo(long companyId, java.io.InputStream is)
249         throws com.liferay.portal.kernel.exception.PortalException,
250             com.liferay.portal.kernel.exception.SystemException {
251         getService().updateLogo(companyId, is);
252     }
253 
254     public static void updatePreferences(long companyId,
255         com.liferay.portal.kernel.util.UnicodeProperties properties)
256         throws com.liferay.portal.kernel.exception.SystemException {
257         getService().updatePreferences(companyId, properties);
258     }
259 
260     public static void updateSecurity(long companyId,
261         java.lang.String authType, boolean autoLogin, boolean sendPassword,
262         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
263         boolean communityLogo)
264         throws com.liferay.portal.kernel.exception.SystemException {
265         getService()
266             .updateSecurity(companyId, authType, autoLogin, sendPassword,
267             strangers, strangersWithMx, strangersVerify, communityLogo);
268     }
269 
270     public static CompanyLocalService getService() {
271         if (_service == null) {
272             _service = (CompanyLocalService)PortalBeanLocatorUtil.locate(CompanyLocalService.class.getName());
273         }
274 
275         return _service;
276     }
277 
278     public void setService(CompanyLocalService service) {
279         _service = service;
280     }
281 
282     private static CompanyLocalService _service;
283 }