1   /**
2    * Copyright (c) 2000-2007 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   * <a href="CompanyLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portal.service.CompanyLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portal.service.CompanyLocalServiceFactory</code> is responsible
42   * for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.CompanyLocalService
48   * @see com.liferay.portal.service.CompanyLocalServiceFactory
49   *
50   */
51  public class CompanyLocalServiceUtil {
52      public static com.liferay.portal.model.Company addCompany(
53          com.liferay.portal.model.Company model)
54          throws com.liferay.portal.SystemException {
55          CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
56  
57          return companyLocalService.addCompany(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
64  
65          return companyLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
72  
73          return companyLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portal.model.Company updateCompany(
77          com.liferay.portal.model.Company model)
78          throws com.liferay.portal.SystemException {
79          CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
80  
81          return companyLocalService.updateCompany(model);
82      }
83  
84      public static com.liferay.portal.model.Company addCompany(
85          java.lang.String webId, java.lang.String virtualHost,
86          java.lang.String mx)
87          throws com.liferay.portal.PortalException, 
88              com.liferay.portal.SystemException {
89          CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
90  
91          return companyLocalService.addCompany(webId, virtualHost, mx);
92      }
93  
94      public static com.liferay.portal.model.Company checkCompany(
95          java.lang.String webId)
96          throws com.liferay.portal.PortalException, 
97              com.liferay.portal.SystemException {
98          CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
99  
100         return companyLocalService.checkCompany(webId);
101     }
102 
103     public static com.liferay.portal.model.Company checkCompany(
104         java.lang.String webId, java.lang.String mx)
105         throws com.liferay.portal.PortalException, 
106             com.liferay.portal.SystemException {
107         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
108 
109         return companyLocalService.checkCompany(webId, mx);
110     }
111 
112     public static void checkCompanyKey(long companyId)
113         throws com.liferay.portal.PortalException, 
114             com.liferay.portal.SystemException {
115         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
116         companyLocalService.checkCompanyKey(companyId);
117     }
118 
119     public static java.util.List getCompanies()
120         throws com.liferay.portal.SystemException {
121         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
122 
123         return companyLocalService.getCompanies();
124     }
125 
126     public static com.liferay.portal.model.Company getCompanyById(
127         long companyId)
128         throws com.liferay.portal.PortalException, 
129             com.liferay.portal.SystemException {
130         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
131 
132         return companyLocalService.getCompanyById(companyId);
133     }
134 
135     public static com.liferay.portal.model.Company getCompanyByMx(
136         java.lang.String mx)
137         throws com.liferay.portal.PortalException, 
138             com.liferay.portal.SystemException {
139         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
140 
141         return companyLocalService.getCompanyByMx(mx);
142     }
143 
144     public static com.liferay.portal.model.Company getCompanyByVirtualHost(
145         java.lang.String virtualHost)
146         throws com.liferay.portal.PortalException, 
147             com.liferay.portal.SystemException {
148         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
149 
150         return companyLocalService.getCompanyByVirtualHost(virtualHost);
151     }
152 
153     public static com.liferay.portal.model.Company getCompanyByWebId(
154         java.lang.String webId)
155         throws com.liferay.portal.PortalException, 
156             com.liferay.portal.SystemException {
157         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
158 
159         return companyLocalService.getCompanyByWebId(webId);
160     }
161 
162     public static com.liferay.portal.kernel.search.Hits search(long companyId,
163         java.lang.String keywords) throws com.liferay.portal.SystemException {
164         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
165 
166         return companyLocalService.search(companyId, keywords);
167     }
168 
169     public static com.liferay.portal.kernel.search.Hits search(long companyId,
170         java.lang.String portletId, long groupId, java.lang.String type,
171         java.lang.String keywords) throws com.liferay.portal.SystemException {
172         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
173 
174         return companyLocalService.search(companyId, portletId, groupId, type,
175             keywords);
176     }
177 
178     public static com.liferay.portal.model.Company updateCompany(
179         long companyId, java.lang.String virtualHost, java.lang.String mx)
180         throws com.liferay.portal.PortalException, 
181             com.liferay.portal.SystemException {
182         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
183 
184         return companyLocalService.updateCompany(companyId, virtualHost, mx);
185     }
186 
187     public static com.liferay.portal.model.Company updateCompany(
188         long companyId, java.lang.String virtualHost, java.lang.String mx,
189         java.lang.String name, java.lang.String legalName,
190         java.lang.String legalId, java.lang.String legalType,
191         java.lang.String sicCode, java.lang.String tickerSymbol,
192         java.lang.String industry, java.lang.String type, java.lang.String size)
193         throws com.liferay.portal.PortalException, 
194             com.liferay.portal.SystemException {
195         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
196 
197         return companyLocalService.updateCompany(companyId, virtualHost, mx,
198             name, legalName, legalId, legalType, sicCode, tickerSymbol,
199             industry, type, size);
200     }
201 
202     public static void updateDisplay(long companyId,
203         java.lang.String languageId, java.lang.String timeZoneId)
204         throws com.liferay.portal.PortalException, 
205             com.liferay.portal.SystemException {
206         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
207         companyLocalService.updateDisplay(companyId, languageId, timeZoneId);
208     }
209 
210     public static void updateLogo(long companyId, java.io.File file)
211         throws com.liferay.portal.PortalException, 
212             com.liferay.portal.SystemException {
213         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
214         companyLocalService.updateLogo(companyId, file);
215     }
216 
217     public static void updateSecurity(long companyId,
218         java.lang.String authType, boolean autoLogin, boolean sendPassword,
219         boolean strangers, boolean strangersWithMx, boolean strangersVerify,
220         boolean communityLogo)
221         throws com.liferay.portal.PortalException, 
222             com.liferay.portal.SystemException {
223         CompanyLocalService companyLocalService = CompanyLocalServiceFactory.getService();
224         companyLocalService.updateSecurity(companyId, authType, autoLogin,
225             sendPassword, strangers, strangersWithMx, strangersVerify,
226             communityLogo);
227     }
228 }