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