001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for Company. This utility wraps
024     * {@link com.liferay.portal.service.impl.CompanyLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see CompanyLocalService
032     * @see com.liferay.portal.service.base.CompanyLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.CompanyLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class CompanyLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.CompanyLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the company to the database. Also notifies the appropriate model listeners.
046            *
047            * @param company the company
048            * @return the company that was added
049            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.Company addCompany(
052                    com.liferay.portal.model.Company company)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addCompany(company);
055            }
056    
057            /**
058            * Creates a new company with the primary key. Does not add the company to the database.
059            *
060            * @param companyId the primary key for the new company
061            * @return the new company
062            */
063            public static com.liferay.portal.model.Company createCompany(long companyId) {
064                    return getService().createCompany(companyId);
065            }
066    
067            /**
068            * Deletes the company with the primary key from the database. Also notifies the appropriate model listeners.
069            *
070            * @param companyId the primary key of the company
071            * @return the company that was removed
072            * @throws PortalException if a company with the primary key could not be found
073            * @throws SystemException if a system exception occurred
074            */
075            public static com.liferay.portal.model.Company deleteCompany(long companyId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService().deleteCompany(companyId);
079            }
080    
081            /**
082            * Deletes the company from the database. Also notifies the appropriate model listeners.
083            *
084            * @param company the company
085            * @return the company that was removed
086            * @throws PortalException
087            * @throws SystemException if a system exception occurred
088            */
089            public static com.liferay.portal.model.Company deleteCompany(
090                    com.liferay.portal.model.Company company)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService().deleteCompany(company);
094            }
095    
096            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
097                    return getService().dynamicQuery();
098            }
099    
100            /**
101            * Performs a dynamic query on the database and returns the matching rows.
102            *
103            * @param dynamicQuery the dynamic query
104            * @return the matching rows
105            * @throws SystemException if a system exception occurred
106            */
107            @SuppressWarnings("rawtypes")
108            public static java.util.List dynamicQuery(
109                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
110                    throws com.liferay.portal.kernel.exception.SystemException {
111                    return getService().dynamicQuery(dynamicQuery);
112            }
113    
114            /**
115            * Performs a dynamic query on the database and returns a range of the matching rows.
116            *
117            * <p>
118            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.CompanyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @return the range of matching rows
125            * @throws SystemException if a system exception occurred
126            */
127            @SuppressWarnings("rawtypes")
128            public static java.util.List dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
130                    int end) throws com.liferay.portal.kernel.exception.SystemException {
131                    return getService().dynamicQuery(dynamicQuery, start, end);
132            }
133    
134            /**
135            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
136            *
137            * <p>
138            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.CompanyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
139            * </p>
140            *
141            * @param dynamicQuery the dynamic query
142            * @param start the lower bound of the range of model instances
143            * @param end the upper bound of the range of model instances (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching rows
146            * @throws SystemException if a system exception occurred
147            */
148            @SuppressWarnings("rawtypes")
149            public static java.util.List dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151                    int end,
152                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getService()
155                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
156            }
157    
158            /**
159            * Returns the number of rows that match the dynamic query.
160            *
161            * @param dynamicQuery the dynamic query
162            * @return the number of rows that match the dynamic query
163            * @throws SystemException if a system exception occurred
164            */
165            public static long dynamicQueryCount(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
167                    throws com.liferay.portal.kernel.exception.SystemException {
168                    return getService().dynamicQueryCount(dynamicQuery);
169            }
170    
171            /**
172            * Returns the number of rows that match the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @param projection the projection to apply to the query
176            * @return the number of rows that match the dynamic query
177            * @throws SystemException if a system exception occurred
178            */
179            public static long dynamicQueryCount(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
181                    com.liferay.portal.kernel.dao.orm.Projection projection)
182                    throws com.liferay.portal.kernel.exception.SystemException {
183                    return getService().dynamicQueryCount(dynamicQuery, projection);
184            }
185    
186            public static com.liferay.portal.model.Company fetchCompany(long companyId)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getService().fetchCompany(companyId);
189            }
190    
191            /**
192            * Returns the company with the primary key.
193            *
194            * @param companyId the primary key of the company
195            * @return the company
196            * @throws PortalException if a company with the primary key could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public static com.liferay.portal.model.Company getCompany(long companyId)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException {
202                    return getService().getCompany(companyId);
203            }
204    
205            public static com.liferay.portal.model.PersistedModel getPersistedModel(
206                    java.io.Serializable primaryKeyObj)
207                    throws com.liferay.portal.kernel.exception.PortalException,
208                            com.liferay.portal.kernel.exception.SystemException {
209                    return getService().getPersistedModel(primaryKeyObj);
210            }
211    
212            /**
213            * Returns a range of all the companies.
214            *
215            * <p>
216            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.CompanyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
217            * </p>
218            *
219            * @param start the lower bound of the range of companies
220            * @param end the upper bound of the range of companies (not inclusive)
221            * @return the range of companies
222            * @throws SystemException if a system exception occurred
223            */
224            public static java.util.List<com.liferay.portal.model.Company> getCompanies(
225                    int start, int end)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getService().getCompanies(start, end);
228            }
229    
230            /**
231            * Returns the number of companies.
232            *
233            * @return the number of companies
234            * @throws SystemException if a system exception occurred
235            */
236            public static int getCompaniesCount()
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getService().getCompaniesCount();
239            }
240    
241            /**
242            * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
243            *
244            * @param company the company
245            * @return the company that was updated
246            * @throws SystemException if a system exception occurred
247            */
248            public static com.liferay.portal.model.Company updateCompany(
249                    com.liferay.portal.model.Company company)
250                    throws com.liferay.portal.kernel.exception.SystemException {
251                    return getService().updateCompany(company);
252            }
253    
254            /**
255            * Returns the Spring bean ID for this bean.
256            *
257            * @return the Spring bean ID for this bean
258            */
259            public static java.lang.String getBeanIdentifier() {
260                    return getService().getBeanIdentifier();
261            }
262    
263            /**
264            * Sets the Spring bean ID for this bean.
265            *
266            * @param beanIdentifier the Spring bean ID for this bean
267            */
268            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
269                    getService().setBeanIdentifier(beanIdentifier);
270            }
271    
272            /**
273            * Adds a company.
274            *
275            * @param webId the the company's web domain
276            * @param virtualHostname the company's virtual host name
277            * @param mx the company's mail domain
278            * @param shardName the company's shard
279            * @param system whether the company is the very first company (i.e., the
280            super company)
281            * @param maxUsers the max number of company users (optionally
282            <code>0</code>)
283            * @param active whether the company is active
284            * @return the company
285            * @throws PortalException if the web domain, virtual host name, or mail
286            domain was invalid
287            * @throws SystemException if a system exception occurred
288            */
289            public static com.liferay.portal.model.Company addCompany(
290                    java.lang.String webId, java.lang.String virtualHostname,
291                    java.lang.String mx, java.lang.String shardName, boolean system,
292                    int maxUsers, boolean active)
293                    throws com.liferay.portal.kernel.exception.PortalException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getService()
296                                       .addCompany(webId, virtualHostname, mx, shardName, system,
297                            maxUsers, active);
298            }
299    
300            /**
301            * Returns the company with the web domain.
302            *
303            * The method sets mail domain to the web domain, and the shard name to
304            * the default name set in portal.properties
305            *
306            * @param webId the company's web domain
307            * @return the company with the web domain
308            * @throws PortalException if a portal exception occurred
309            * @throws SystemException if a system exception occurred
310            */
311            public static com.liferay.portal.model.Company checkCompany(
312                    java.lang.String webId)
313                    throws com.liferay.portal.kernel.exception.PortalException,
314                            com.liferay.portal.kernel.exception.SystemException {
315                    return getService().checkCompany(webId);
316            }
317    
318            /**
319            * Returns the company with the web domain, mail domain, and shard. If no
320            * such company exits, the method will create a new company.
321            *
322            * The method goes through a series of checks to ensure that the company
323            * contains default users, groups, etc.
324            *
325            * @param webId the company's web domain
326            * @param mx the company's mail domain
327            * @param shardName the company's shard
328            * @return the company with the web domain, mail domain, and shard
329            * @throws PortalException if a portal exception occurred
330            * @throws SystemException if a system exception occurred
331            */
332            public static com.liferay.portal.model.Company checkCompany(
333                    java.lang.String webId, java.lang.String mx, java.lang.String shardName)
334                    throws com.liferay.portal.kernel.exception.PortalException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    return getService().checkCompany(webId, mx, shardName);
337            }
338    
339            /**
340            * Checks if the company has an encryption key. It will create a key if one
341            * does not exist.
342            *
343            * @param companyId the primary key of the company
344            * @throws PortalException if a company with the primary key could not be
345            found
346            * @throws SystemException if a system exception occurred
347            */
348            public static void checkCompanyKey(long companyId)
349                    throws com.liferay.portal.kernel.exception.PortalException,
350                            com.liferay.portal.kernel.exception.SystemException {
351                    getService().checkCompanyKey(companyId);
352            }
353    
354            /**
355            * Deletes the company's logo.
356            *
357            * @param companyId the primary key of the company
358            * @throws PortalException if the company with the primary key could not be
359            found or if the company's logo could not be found
360            * @throws SystemException if a system exception occurred
361            */
362            public static void deleteLogo(long companyId)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    getService().deleteLogo(companyId);
366            }
367    
368            /**
369            * Returns the company with the primary key.
370            *
371            * @param companyId the primary key of the company
372            * @return the company with the primary key, <code>null</code> if a company
373            with the primary key could not be found
374            * @throws SystemException if a system exception occurred
375            */
376            public static com.liferay.portal.model.Company fetchCompanyById(
377                    long companyId)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    return getService().fetchCompanyById(companyId);
380            }
381    
382            /**
383            * Returns the company with the virtual host name.
384            *
385            * @param virtualHostname the virtual host name
386            * @return the company with the virtual host name, <code>null</code> if a
387            company with the virtual host could not be found
388            * @throws SystemException if a system exception occurred
389            */
390            public static com.liferay.portal.model.Company fetchCompanyByVirtualHost(
391                    java.lang.String virtualHostname)
392                    throws com.liferay.portal.kernel.exception.SystemException {
393                    return getService().fetchCompanyByVirtualHost(virtualHostname);
394            }
395    
396            /**
397            * Returns all the companies.
398            *
399            * @return the companies
400            * @throws SystemException if a system exception occurred
401            */
402            public static java.util.List<com.liferay.portal.model.Company> getCompanies()
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    return getService().getCompanies();
405            }
406    
407            /**
408            * Returns all the companies used by WSRP.
409            *
410            * @param system whether the company is the very first company (i.e., the
411            super company)
412            * @return the companies used by WSRP
413            * @throws SystemException if a system exception occurred
414            */
415            public static java.util.List<com.liferay.portal.model.Company> getCompanies(
416                    boolean system)
417                    throws com.liferay.portal.kernel.exception.SystemException {
418                    return getService().getCompanies(system);
419            }
420    
421            /**
422            * Returns the number of companies used by WSRP.
423            *
424            * @param system whether the company is the very first company (i.e., the
425            super company)
426            * @return the number of companies used by WSRP
427            * @throws SystemException if a system exception occurred
428            */
429            public static int getCompaniesCount(boolean system)
430                    throws com.liferay.portal.kernel.exception.SystemException {
431                    return getService().getCompaniesCount(system);
432            }
433    
434            /**
435            * Returns the company with the primary key.
436            *
437            * @param companyId the primary key of the company
438            * @return the company with the primary key
439            * @throws PortalException if a company with the primary key could not be
440            found
441            * @throws SystemException if a system exception occurred
442            */
443            public static com.liferay.portal.model.Company getCompanyById(
444                    long companyId)
445                    throws com.liferay.portal.kernel.exception.PortalException,
446                            com.liferay.portal.kernel.exception.SystemException {
447                    return getService().getCompanyById(companyId);
448            }
449    
450            /**
451            * Returns the company with the logo.
452            *
453            * @param logoId the ID of the company's logo
454            * @return the company with the logo
455            * @throws PortalException if the company with the logo could not be found
456            * @throws SystemException if a system exception occurred
457            */
458            public static com.liferay.portal.model.Company getCompanyByLogoId(
459                    long logoId)
460                    throws com.liferay.portal.kernel.exception.PortalException,
461                            com.liferay.portal.kernel.exception.SystemException {
462                    return getService().getCompanyByLogoId(logoId);
463            }
464    
465            /**
466            * Returns the company with the mail domain.
467            *
468            * @param mx the company's mail domain
469            * @return the company with the mail domain
470            * @throws PortalException if the company with the mail domain could not be
471            found
472            * @throws SystemException if a system exception occurred
473            */
474            public static com.liferay.portal.model.Company getCompanyByMx(
475                    java.lang.String mx)
476                    throws com.liferay.portal.kernel.exception.PortalException,
477                            com.liferay.portal.kernel.exception.SystemException {
478                    return getService().getCompanyByMx(mx);
479            }
480    
481            /**
482            * Returns the company with the virtual host name.
483            *
484            * @param virtualHostname the company's virtual host name
485            * @return the company with the virtual host name
486            * @throws PortalException if the company with the virtual host name could
487            not be found or if the virtual host was not associated with a
488            company
489            * @throws SystemException if a system exception occurred
490            */
491            public static com.liferay.portal.model.Company getCompanyByVirtualHost(
492                    java.lang.String virtualHostname)
493                    throws com.liferay.portal.kernel.exception.PortalException,
494                            com.liferay.portal.kernel.exception.SystemException {
495                    return getService().getCompanyByVirtualHost(virtualHostname);
496            }
497    
498            /**
499            * Returns the company with the web domain.
500            *
501            * @param webId the company's web domain
502            * @return the company with the web domain
503            * @throws PortalException if the company with the web domain could not be
504            found
505            * @throws SystemException if a system exception occurred
506            */
507            public static com.liferay.portal.model.Company getCompanyByWebId(
508                    java.lang.String webId)
509                    throws com.liferay.portal.kernel.exception.PortalException,
510                            com.liferay.portal.kernel.exception.SystemException {
511                    return getService().getCompanyByWebId(webId);
512            }
513    
514            /**
515            * Returns the user's company.
516            *
517            * @param userId the primary key of the user
518            * @return Returns the first company if there is only one company or the
519            user's company if there are more than one company; <code>0</code>
520            otherwise
521            * @throws Exception if a user with the primary key could not be found
522            */
523            public static long getCompanyIdByUserId(long userId)
524                    throws java.lang.Exception {
525                    return getService().getCompanyIdByUserId(userId);
526            }
527    
528            /**
529            * Removes the values that match the keys of the company's preferences.
530            *
531            * This method is called by {@link
532            * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely
533            * through {@link com.liferay.portal.service.CompanyService}.
534            *
535            * @param companyId the primary key of the company
536            * @param keys the company's preferences keys to be remove
537            * @throws SystemException if a system exception occurred
538            */
539            public static void removePreferences(long companyId, java.lang.String[] keys)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    getService().removePreferences(companyId, keys);
542            }
543    
544            /**
545            * Returns an ordered range of all assets that match the keywords in the
546            * company.
547            *
548            * The method is called in {@link
549            * com.liferay.portal.search.PortalOpenSearchImpl} which is not longer used
550            * by the Search portlet.
551            *
552            * @param companyId the primary key of the company
553            * @param userId the primary key of the user
554            * @param keywords the keywords (space separated),which may occur in assets
555            in the company (optionally <code>null</code>)
556            * @param start the lower bound of the range of assets to return
557            * @param end the upper bound of the range of assets to return (not
558            inclusive)
559            * @return the matching assets in the company
560            * @throws SystemException if a system exception occurred
561            */
562            public static com.liferay.portal.kernel.search.Hits search(long companyId,
563                    long userId, java.lang.String keywords, int start, int end)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    return getService().search(companyId, userId, keywords, start, end);
566            }
567    
568            /**
569            * Returns an ordered range of all assets that match the keywords in the
570            * portlet within the company.
571            *
572            * @param companyId the primary key of the company
573            * @param userId the primary key of the user
574            * @param portletId the primary key of the portlet (optionally
575            <code>null</code>)
576            * @param groupId the primary key of the group (optionally <code>0</code>)
577            * @param type the mime type of assets to return(optionally
578            <code>null</code>)
579            * @param keywords the keywords (space separated), which may occur in any
580            assets in the portlet (optionally <code>null</code>)
581            * @param start the lower bound of the range of assets to return
582            * @param end the upper bound of the range of assets to return (not
583            inclusive)
584            * @return the matching assets in the portlet within the company
585            * @throws SystemException if a system exception occurred
586            */
587            public static com.liferay.portal.kernel.search.Hits search(long companyId,
588                    long userId, java.lang.String portletId, long groupId,
589                    java.lang.String type, java.lang.String keywords, int start, int end)
590                    throws com.liferay.portal.kernel.exception.SystemException {
591                    return getService()
592                                       .search(companyId, userId, portletId, groupId, type,
593                            keywords, start, end);
594            }
595    
596            /**
597            * Updates the company.
598            *
599            * @param companyId the primary key of the company
600            * @param virtualHostname the company's virtual host name
601            * @param mx the company's mail domain
602            * @param maxUsers the max number of company users (optionally
603            <code>0</code>)
604            * @param active whether the company is active
605            * @return the company with the primary key
606            * @throws PortalException if a company with primary key could not be found
607            or if the new information was invalid
608            * @throws SystemException if a system exception occurred
609            */
610            public static com.liferay.portal.model.Company updateCompany(
611                    long companyId, java.lang.String virtualHostname, java.lang.String mx,
612                    int maxUsers, boolean active)
613                    throws com.liferay.portal.kernel.exception.PortalException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    return getService()
616                                       .updateCompany(companyId, virtualHostname, mx, maxUsers,
617                            active);
618            }
619    
620            /**
621            * Update the company with additional account information.
622            *
623            * @param companyId the primary key of the company
624            * @param virtualHostname the company's virtual host name
625            * @param mx the company's mail domain
626            * @param homeURL the company's home URL (optionally <code>null</code>)
627            * @param name the company's account name(optionally <code>null</code>)
628            * @param legalName the company's account legal name (optionally
629            <code>null</code>)
630            * @param legalId the company's account legal ID (optionally
631            <code>null</code>)
632            * @param legalType the company's account legal type (optionally
633            <code>null</code>)
634            * @param sicCode the company's account SIC code (optionally
635            <code>null</code>)
636            * @param tickerSymbol the company's account ticker symbol (optionally
637            <code>null</code>)
638            * @param industry the company's account industry (optionally
639            <code>null</code>)
640            * @param type the company's account type (optionally <code>null</code>)
641            * @param size the company's account size (optionally <code>null</code>)
642            * @return the company with the primary key
643            * @throws PortalException if a company with the primary key could not be
644            found or if the new information was invalid
645            * @throws SystemException if a system exception occurred
646            */
647            public static com.liferay.portal.model.Company updateCompany(
648                    long companyId, java.lang.String virtualHostname, java.lang.String mx,
649                    java.lang.String homeURL, java.lang.String name,
650                    java.lang.String legalName, java.lang.String legalId,
651                    java.lang.String legalType, java.lang.String sicCode,
652                    java.lang.String tickerSymbol, java.lang.String industry,
653                    java.lang.String type, java.lang.String size)
654                    throws com.liferay.portal.kernel.exception.PortalException,
655                            com.liferay.portal.kernel.exception.SystemException {
656                    return getService()
657                                       .updateCompany(companyId, virtualHostname, mx, homeURL,
658                            name, legalName, legalId, legalType, sicCode, tickerSymbol,
659                            industry, type, size);
660            }
661    
662            /**
663            * Update the company's display.
664            *
665            * @param companyId the primary key of the company
666            * @param languageId the ID of the company's default user's language
667            * @param timeZoneId the ID of the company's default user's time zone
668            * @throws PortalException if the company's default user could not be found
669            * @throws SystemException if a system exception occurred
670            */
671            public static void updateDisplay(long companyId,
672                    java.lang.String languageId, java.lang.String timeZoneId)
673                    throws com.liferay.portal.kernel.exception.PortalException,
674                            com.liferay.portal.kernel.exception.SystemException {
675                    getService().updateDisplay(companyId, languageId, timeZoneId);
676            }
677    
678            /**
679            * Updates the company's logo.
680            *
681            * @param companyId the primary key of the company
682            * @param bytes the bytes of the company's logo image
683            * @return the company with the primary key
684            * @throws PortalException if the company's logo ID could not be found or if
685            the logo's image was corrupted
686            * @throws SystemException if a system exception occurred
687            */
688            public static com.liferay.portal.model.Company updateLogo(long companyId,
689                    byte[] bytes)
690                    throws com.liferay.portal.kernel.exception.PortalException,
691                            com.liferay.portal.kernel.exception.SystemException {
692                    return getService().updateLogo(companyId, bytes);
693            }
694    
695            /**
696            * Updates the company's logo.
697            *
698            * @param companyId the primary key of the company
699            * @param file the file of the company's logo image
700            * @return the company with the primary key
701            * @throws PortalException the company's logo ID could not be found or if
702            the logo's image was corrupted
703            * @throws SystemException if a system exception occurred
704            */
705            public static com.liferay.portal.model.Company updateLogo(long companyId,
706                    java.io.File file)
707                    throws com.liferay.portal.kernel.exception.PortalException,
708                            com.liferay.portal.kernel.exception.SystemException {
709                    return getService().updateLogo(companyId, file);
710            }
711    
712            /**
713            * Update the company's logo.
714            *
715            * @param companyId the primary key of the company
716            * @param is the input stream of the company's logo image
717            * @return the company with the primary key
718            * @throws PortalException if the company's logo ID could not be found or if
719            the company's logo image was corrupted
720            * @throws SystemException if a system exception occurred
721            */
722            public static com.liferay.portal.model.Company updateLogo(long companyId,
723                    java.io.InputStream is)
724                    throws com.liferay.portal.kernel.exception.PortalException,
725                            com.liferay.portal.kernel.exception.SystemException {
726                    return getService().updateLogo(companyId, is);
727            }
728    
729            /**
730            * Updates the company's preferences. The company's default properties are
731            * found in portal.properties.
732            *
733            * @param companyId the primary key of the company
734            * @param properties the company's properties. See {@link
735            com.liferay.portal.kernel.util.UnicodeProperties}
736            * @throws PortalException if the properties contained new locales that were
737            not supported
738            * @throws SystemException if a system exception occurred
739            */
740            public static void updatePreferences(long companyId,
741                    com.liferay.portal.kernel.util.UnicodeProperties properties)
742                    throws com.liferay.portal.kernel.exception.PortalException,
743                            com.liferay.portal.kernel.exception.SystemException {
744                    getService().updatePreferences(companyId, properties);
745            }
746    
747            /**
748            * Updates the company's security properties.
749            *
750            * @param companyId the primary key of the company
751            * @param authType the company's method of authenticating users
752            * @param autoLogin whether to allow users to select the "remember me"
753            feature
754            * @param sendPassword whether to allow users to ask the company to send
755            their password
756            * @param strangers whether to allow strangers to create accounts register
757            themselves in the company
758            * @param strangersWithMx whether to allow strangers to create accounts
759            with email addresses that match the company mail suffix
760            * @param strangersVerify whether to require strangers who create accounts
761            to be verified via email
762            * @param siteLogo whether to allow site administrators to use their own
763            logo instead of the enterprise logo
764            * @throws SystemException if a system exception occurred
765            */
766            public static void updateSecurity(long companyId,
767                    java.lang.String authType, boolean autoLogin, boolean sendPassword,
768                    boolean strangers, boolean strangersWithMx, boolean strangersVerify,
769                    boolean siteLogo)
770                    throws com.liferay.portal.kernel.exception.SystemException {
771                    getService()
772                            .updateSecurity(companyId, authType, autoLogin, sendPassword,
773                            strangers, strangersWithMx, strangersVerify, siteLogo);
774            }
775    
776            public static CompanyLocalService getService() {
777                    if (_service == null) {
778                            _service = (CompanyLocalService)PortalBeanLocatorUtil.locate(CompanyLocalService.class.getName());
779    
780                            ReferenceRegistry.registerReference(CompanyLocalServiceUtil.class,
781                                    "_service");
782                    }
783    
784                    return _service;
785            }
786    
787            /**
788             * @deprecated As of 6.2.0
789             */
790            public void setService(CompanyLocalService service) {
791            }
792    
793            private static CompanyLocalService _service;
794    }