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 updateCompany(
104         com.liferay.portal.model.Company company, boolean merge)
105         throws com.liferay.portal.SystemException {
106         return getService().updateCompany(company, merge);
107     }
108 
109     public static com.liferay.portal.model.Company addCompany(
110         java.lang.String webId, java.lang.String virtualHost,
111         java.lang.String mx)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService().addCompany(webId, virtualHost, mx);
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.PortalException,
121             com.liferay.portal.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.PortalException,
128             com.liferay.portal.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.PortalException,
135             com.liferay.portal.SystemException {
136         return getService().checkCompany(webId, mx, shardName);
137     }
138 
139     public static void checkCompanyKey(long companyId)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         getService().checkCompanyKey(companyId);
143     }
144 
145     public static java.util.List<com.liferay.portal.model.Company> getCompanies()
146         throws com.liferay.portal.SystemException {
147         return getService().getCompanies();
148     }
149 
150     public static java.util.List<com.liferay.portal.model.Company> getCompanies(
151         boolean system) throws com.liferay.portal.SystemException {
152         return getService().getCompanies(system);
153     }
154 
155     public static int getCompaniesCount(boolean system)
156         throws com.liferay.portal.SystemException {
157         return getService().getCompaniesCount(system);
158     }
159 
160     public static com.liferay.portal.model.Company getCompanyById(
161         long companyId)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         return getService().getCompanyById(companyId);
165     }
166 
167     public static com.liferay.portal.model.Company getCompanyByLogoId(
168         long logoId)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         return getService().getCompanyByLogoId(logoId);
172     }
173 
174     public static com.liferay.portal.model.Company getCompanyByMx(
175         java.lang.String mx)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         return getService().getCompanyByMx(mx);
179     }
180 
181     public static com.liferay.portal.model.Company getCompanyByVirtualHost(
182         java.lang.String virtualHost)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         return getService().getCompanyByVirtualHost(virtualHost);
186     }
187 
188     public static com.liferay.portal.model.Company getCompanyByWebId(
189         java.lang.String webId)
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException {
192         return getService().getCompanyByWebId(webId);
193     }
194 
195     public static com.liferay.portal.kernel.search.Hits search(long companyId,
196         java.lang.String keywords, int start, int end)
197         throws com.liferay.portal.SystemException {
198         return getService().search(companyId, keywords, start, end);
199     }
200 
201     public static com.liferay.portal.kernel.search.Hits search(long companyId,
202         java.lang.String portletId, long groupId, java.lang.String type,
203         java.lang.String keywords, int start, int end)
204         throws com.liferay.portal.SystemException {
205         return getService()
206                    .search(companyId, portletId, groupId, type, keywords,
207             start, end);
208     }
209 
210     public static com.liferay.portal.model.Company updateCompany(
211         long companyId, java.lang.String virtualHost, java.lang.String mx)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         return getService().updateCompany(companyId, virtualHost, mx);
215     }
216 
217     public static com.liferay.portal.model.Company updateCompany(
218         long companyId, java.lang.String virtualHost, java.lang.String mx,
219         java.lang.String name, java.lang.String legalName,
220         java.lang.String legalId, java.lang.String legalType,
221         java.lang.String sicCode, java.lang.String tickerSymbol,
222         java.lang.String industry, java.lang.String type, java.lang.String size)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException {
225         return getService()
226                    .updateCompany(companyId, virtualHost, mx, name, legalName,
227             legalId, legalType, sicCode, tickerSymbol, industry, type, size);
228     }
229 
230     public static void updateDisplay(long companyId,
231         java.lang.String languageId, java.lang.String timeZoneId)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         getService().updateDisplay(companyId, languageId, timeZoneId);
235     }
236 
237     public static void updateLogo(long companyId, java.io.File file)
238         throws com.liferay.portal.PortalException,
239             com.liferay.portal.SystemException {
240         getService().updateLogo(companyId, file);
241     }
242 
243     public static void updateSecurity(long companyId,
244         java.lang.String authType, boolean autoLogin, boolean sendPassword,
245         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
246         boolean communityLogo) throws com.liferay.portal.SystemException {
247         getService()
248             .updateSecurity(companyId, authType, autoLogin, sendPassword,
249             strangers, strangersWithMx, strangersVerify, communityLogo);
250     }
251 
252     public static CompanyLocalService getService() {
253         if (_service == null) {
254             throw new RuntimeException("CompanyLocalService is not set");
255         }
256 
257         return _service;
258     }
259 
260     public void setService(CompanyLocalService service) {
261         _service = service;
262     }
263 
264     private static CompanyLocalService _service;
265 }