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