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