001    /**
002     * Copyright (c) 2000-2010 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.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Company;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * The persistence utility for the company service. This utility wraps {@link CompanyPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
028     *
029     * <p>
030     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
031     * </p>
032     *
033     * <p>
034     * Caching information and settings can be found in <code>portal.properties</code>
035     * </p>
036     *
037     * @author Brian Wing Shun Chan
038     * @see CompanyPersistence
039     * @see CompanyPersistenceImpl
040     * @generated
041     */
042    public class CompanyUtil {
043            /**
044             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
045             */
046            public static void clearCache() {
047                    getPersistence().clearCache();
048            }
049    
050            /**
051             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
052             */
053            public static void clearCache(Company company) {
054                    getPersistence().clearCache(company);
055            }
056    
057            /**
058             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
059             */
060            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
061                    throws SystemException {
062                    return getPersistence().countWithDynamicQuery(dynamicQuery);
063            }
064    
065            /**
066             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
067             */
068            public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery)
069                    throws SystemException {
070                    return getPersistence().findWithDynamicQuery(dynamicQuery);
071            }
072    
073            /**
074             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
075             */
076            public static List<Company> findWithDynamicQuery(
077                    DynamicQuery dynamicQuery, int start, int end)
078                    throws SystemException {
079                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
080            }
081    
082            /**
083             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
084             */
085            public static List<Company> findWithDynamicQuery(
086                    DynamicQuery dynamicQuery, int start, int end,
087                    OrderByComparator orderByComparator) throws SystemException {
088                    return getPersistence()
089                                       .findWithDynamicQuery(dynamicQuery, start, end,
090                            orderByComparator);
091            }
092    
093            /**
094             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
095             */
096            public static Company remove(Company company) throws SystemException {
097                    return getPersistence().remove(company);
098            }
099    
100            /**
101             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
102             */
103            public static Company update(Company company, boolean merge)
104                    throws SystemException {
105                    return getPersistence().update(company, merge);
106            }
107    
108            /**
109             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
110             */
111            public static Company update(Company company, boolean merge,
112                    ServiceContext serviceContext) throws SystemException {
113                    return getPersistence().update(company, merge, serviceContext);
114            }
115    
116            /**
117            * Caches the company in the entity cache if it is enabled.
118            *
119            * @param company the company to cache
120            */
121            public static void cacheResult(com.liferay.portal.model.Company company) {
122                    getPersistence().cacheResult(company);
123            }
124    
125            /**
126            * Caches the companies in the entity cache if it is enabled.
127            *
128            * @param companies the companies to cache
129            */
130            public static void cacheResult(
131                    java.util.List<com.liferay.portal.model.Company> companies) {
132                    getPersistence().cacheResult(companies);
133            }
134    
135            /**
136            * Creates a new company with the primary key. Does not add the company to the database.
137            *
138            * @param companyId the primary key for the new company
139            * @return the new company
140            */
141            public static com.liferay.portal.model.Company create(long companyId) {
142                    return getPersistence().create(companyId);
143            }
144    
145            /**
146            * Removes the company with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param companyId the primary key of the company to remove
149            * @return the company that was removed
150            * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portal.model.Company remove(long companyId)
154                    throws com.liferay.portal.NoSuchCompanyException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().remove(companyId);
157            }
158    
159            public static com.liferay.portal.model.Company updateImpl(
160                    com.liferay.portal.model.Company company, boolean merge)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(company, merge);
163            }
164    
165            /**
166            * Finds the company with the primary key or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
167            *
168            * @param companyId the primary key of the company to find
169            * @return the company
170            * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.Company findByPrimaryKey(
174                    long companyId)
175                    throws com.liferay.portal.NoSuchCompanyException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByPrimaryKey(companyId);
178            }
179    
180            /**
181            * Finds the company with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param companyId the primary key of the company to find
184            * @return the company, or <code>null</code> if a company with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.model.Company fetchByPrimaryKey(
188                    long companyId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(companyId);
191            }
192    
193            /**
194            * Finds the company where webId = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
195            *
196            * @param webId the web id to search with
197            * @return the matching company
198            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            public static com.liferay.portal.model.Company findByWebId(
202                    java.lang.String webId)
203                    throws com.liferay.portal.NoSuchCompanyException,
204                            com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByWebId(webId);
206            }
207    
208            /**
209            * Finds the company where webId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
210            *
211            * @param webId the web id to search with
212            * @return the matching company, or <code>null</code> if a matching company could not be found
213            * @throws SystemException if a system exception occurred
214            */
215            public static com.liferay.portal.model.Company fetchByWebId(
216                    java.lang.String webId)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence().fetchByWebId(webId);
219            }
220    
221            /**
222            * Finds the company where webId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
223            *
224            * @param webId the web id to search with
225            * @return the matching company, or <code>null</code> if a matching company could not be found
226            * @throws SystemException if a system exception occurred
227            */
228            public static com.liferay.portal.model.Company fetchByWebId(
229                    java.lang.String webId, boolean retrieveFromCache)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().fetchByWebId(webId, retrieveFromCache);
232            }
233    
234            /**
235            * Finds the company where virtualHost = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
236            *
237            * @param virtualHost the virtual host to search with
238            * @return the matching company
239            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
240            * @throws SystemException if a system exception occurred
241            */
242            public static com.liferay.portal.model.Company findByVirtualHost(
243                    java.lang.String virtualHost)
244                    throws com.liferay.portal.NoSuchCompanyException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    return getPersistence().findByVirtualHost(virtualHost);
247            }
248    
249            /**
250            * Finds the company where virtualHost = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
251            *
252            * @param virtualHost the virtual host to search with
253            * @return the matching company, or <code>null</code> if a matching company could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.Company fetchByVirtualHost(
257                    java.lang.String virtualHost)
258                    throws com.liferay.portal.kernel.exception.SystemException {
259                    return getPersistence().fetchByVirtualHost(virtualHost);
260            }
261    
262            /**
263            * Finds the company where virtualHost = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
264            *
265            * @param virtualHost the virtual host to search with
266            * @return the matching company, or <code>null</code> if a matching company could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portal.model.Company fetchByVirtualHost(
270                    java.lang.String virtualHost, boolean retrieveFromCache)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence()
273                                       .fetchByVirtualHost(virtualHost, retrieveFromCache);
274            }
275    
276            /**
277            * Finds the company where mx = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
278            *
279            * @param mx the mx to search with
280            * @return the matching company
281            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
282            * @throws SystemException if a system exception occurred
283            */
284            public static com.liferay.portal.model.Company findByMx(java.lang.String mx)
285                    throws com.liferay.portal.NoSuchCompanyException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return getPersistence().findByMx(mx);
288            }
289    
290            /**
291            * Finds the company where mx = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
292            *
293            * @param mx the mx to search with
294            * @return the matching company, or <code>null</code> if a matching company could not be found
295            * @throws SystemException if a system exception occurred
296            */
297            public static com.liferay.portal.model.Company fetchByMx(
298                    java.lang.String mx)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getPersistence().fetchByMx(mx);
301            }
302    
303            /**
304            * Finds the company where mx = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
305            *
306            * @param mx the mx to search with
307            * @return the matching company, or <code>null</code> if a matching company could not be found
308            * @throws SystemException if a system exception occurred
309            */
310            public static com.liferay.portal.model.Company fetchByMx(
311                    java.lang.String mx, boolean retrieveFromCache)
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    return getPersistence().fetchByMx(mx, retrieveFromCache);
314            }
315    
316            /**
317            * Finds the company where logoId = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
318            *
319            * @param logoId the logo id to search with
320            * @return the matching company
321            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
322            * @throws SystemException if a system exception occurred
323            */
324            public static com.liferay.portal.model.Company findByLogoId(long logoId)
325                    throws com.liferay.portal.NoSuchCompanyException,
326                            com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence().findByLogoId(logoId);
328            }
329    
330            /**
331            * Finds the company where logoId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
332            *
333            * @param logoId the logo id to search with
334            * @return the matching company, or <code>null</code> if a matching company could not be found
335            * @throws SystemException if a system exception occurred
336            */
337            public static com.liferay.portal.model.Company fetchByLogoId(long logoId)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getPersistence().fetchByLogoId(logoId);
340            }
341    
342            /**
343            * Finds the company where logoId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
344            *
345            * @param logoId the logo id to search with
346            * @return the matching company, or <code>null</code> if a matching company could not be found
347            * @throws SystemException if a system exception occurred
348            */
349            public static com.liferay.portal.model.Company fetchByLogoId(long logoId,
350                    boolean retrieveFromCache)
351                    throws com.liferay.portal.kernel.exception.SystemException {
352                    return getPersistence().fetchByLogoId(logoId, retrieveFromCache);
353            }
354    
355            /**
356            * Finds all the companies where system = &#63;.
357            *
358            * @param system the system to search with
359            * @return the matching companies
360            * @throws SystemException if a system exception occurred
361            */
362            public static java.util.List<com.liferay.portal.model.Company> findBySystem(
363                    boolean system)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence().findBySystem(system);
366            }
367    
368            /**
369            * Finds a range of all the companies where system = &#63;.
370            *
371            * <p>
372            * 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.
373            * </p>
374            *
375            * @param system the system to search with
376            * @param start the lower bound of the range of companies to return
377            * @param end the upper bound of the range of companies to return (not inclusive)
378            * @return the range of matching companies
379            * @throws SystemException if a system exception occurred
380            */
381            public static java.util.List<com.liferay.portal.model.Company> findBySystem(
382                    boolean system, int start, int end)
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    return getPersistence().findBySystem(system, start, end);
385            }
386    
387            /**
388            * Finds an ordered range of all the companies where system = &#63;.
389            *
390            * <p>
391            * 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.
392            * </p>
393            *
394            * @param system the system to search with
395            * @param start the lower bound of the range of companies to return
396            * @param end the upper bound of the range of companies to return (not inclusive)
397            * @param orderByComparator the comparator to order the results by
398            * @return the ordered range of matching companies
399            * @throws SystemException if a system exception occurred
400            */
401            public static java.util.List<com.liferay.portal.model.Company> findBySystem(
402                    boolean system, int start, int end,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getPersistence()
406                                       .findBySystem(system, start, end, orderByComparator);
407            }
408    
409            /**
410            * Finds the first company in the ordered set where system = &#63;.
411            *
412            * <p>
413            * 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.
414            * </p>
415            *
416            * @param system the system to search with
417            * @param orderByComparator the comparator to order the set by
418            * @return the first matching company
419            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
420            * @throws SystemException if a system exception occurred
421            */
422            public static com.liferay.portal.model.Company findBySystem_First(
423                    boolean system,
424                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
425                    throws com.liferay.portal.NoSuchCompanyException,
426                            com.liferay.portal.kernel.exception.SystemException {
427                    return getPersistence().findBySystem_First(system, orderByComparator);
428            }
429    
430            /**
431            * Finds the last company in the ordered set where system = &#63;.
432            *
433            * <p>
434            * 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.
435            * </p>
436            *
437            * @param system the system to search with
438            * @param orderByComparator the comparator to order the set by
439            * @return the last matching company
440            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
441            * @throws SystemException if a system exception occurred
442            */
443            public static com.liferay.portal.model.Company findBySystem_Last(
444                    boolean system,
445                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
446                    throws com.liferay.portal.NoSuchCompanyException,
447                            com.liferay.portal.kernel.exception.SystemException {
448                    return getPersistence().findBySystem_Last(system, orderByComparator);
449            }
450    
451            /**
452            * Finds the companies before and after the current company in the ordered set where system = &#63;.
453            *
454            * <p>
455            * 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.
456            * </p>
457            *
458            * @param companyId the primary key of the current company
459            * @param system the system to search with
460            * @param orderByComparator the comparator to order the set by
461            * @return the previous, current, and next company
462            * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found
463            * @throws SystemException if a system exception occurred
464            */
465            public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
466                    long companyId, boolean system,
467                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
468                    throws com.liferay.portal.NoSuchCompanyException,
469                            com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence()
471                                       .findBySystem_PrevAndNext(companyId, system,
472                            orderByComparator);
473            }
474    
475            /**
476            * Finds all the companies.
477            *
478            * @return the companies
479            * @throws SystemException if a system exception occurred
480            */
481            public static java.util.List<com.liferay.portal.model.Company> findAll()
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence().findAll();
484            }
485    
486            /**
487            * Finds a range of all the companies.
488            *
489            * <p>
490            * 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.
491            * </p>
492            *
493            * @param start the lower bound of the range of companies to return
494            * @param end the upper bound of the range of companies to return (not inclusive)
495            * @return the range of companies
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portal.model.Company> findAll(
499                    int start, int end)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getPersistence().findAll(start, end);
502            }
503    
504            /**
505            * Finds an ordered range of all the companies.
506            *
507            * <p>
508            * 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.
509            * </p>
510            *
511            * @param start the lower bound of the range of companies to return
512            * @param end the upper bound of the range of companies to return (not inclusive)
513            * @param orderByComparator the comparator to order the results by
514            * @return the ordered range of companies
515            * @throws SystemException if a system exception occurred
516            */
517            public static java.util.List<com.liferay.portal.model.Company> findAll(
518                    int start, int end,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence().findAll(start, end, orderByComparator);
522            }
523    
524            /**
525            * Removes the company where webId = &#63; from the database.
526            *
527            * @param webId the web id to search with
528            * @throws SystemException if a system exception occurred
529            */
530            public static void removeByWebId(java.lang.String webId)
531                    throws com.liferay.portal.NoSuchCompanyException,
532                            com.liferay.portal.kernel.exception.SystemException {
533                    getPersistence().removeByWebId(webId);
534            }
535    
536            /**
537            * Removes the company where virtualHost = &#63; from the database.
538            *
539            * @param virtualHost the virtual host to search with
540            * @throws SystemException if a system exception occurred
541            */
542            public static void removeByVirtualHost(java.lang.String virtualHost)
543                    throws com.liferay.portal.NoSuchCompanyException,
544                            com.liferay.portal.kernel.exception.SystemException {
545                    getPersistence().removeByVirtualHost(virtualHost);
546            }
547    
548            /**
549            * Removes the company where mx = &#63; from the database.
550            *
551            * @param mx the mx to search with
552            * @throws SystemException if a system exception occurred
553            */
554            public static void removeByMx(java.lang.String mx)
555                    throws com.liferay.portal.NoSuchCompanyException,
556                            com.liferay.portal.kernel.exception.SystemException {
557                    getPersistence().removeByMx(mx);
558            }
559    
560            /**
561            * Removes the company where logoId = &#63; from the database.
562            *
563            * @param logoId the logo id to search with
564            * @throws SystemException if a system exception occurred
565            */
566            public static void removeByLogoId(long logoId)
567                    throws com.liferay.portal.NoSuchCompanyException,
568                            com.liferay.portal.kernel.exception.SystemException {
569                    getPersistence().removeByLogoId(logoId);
570            }
571    
572            /**
573            * Removes all the companies where system = &#63; from the database.
574            *
575            * @param system the system to search with
576            * @throws SystemException if a system exception occurred
577            */
578            public static void removeBySystem(boolean system)
579                    throws com.liferay.portal.kernel.exception.SystemException {
580                    getPersistence().removeBySystem(system);
581            }
582    
583            /**
584            * Removes all the companies from the database.
585            *
586            * @throws SystemException if a system exception occurred
587            */
588            public static void removeAll()
589                    throws com.liferay.portal.kernel.exception.SystemException {
590                    getPersistence().removeAll();
591            }
592    
593            /**
594            * Counts all the companies where webId = &#63;.
595            *
596            * @param webId the web id to search with
597            * @return the number of matching companies
598            * @throws SystemException if a system exception occurred
599            */
600            public static int countByWebId(java.lang.String webId)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    return getPersistence().countByWebId(webId);
603            }
604    
605            /**
606            * Counts all the companies where virtualHost = &#63;.
607            *
608            * @param virtualHost the virtual host to search with
609            * @return the number of matching companies
610            * @throws SystemException if a system exception occurred
611            */
612            public static int countByVirtualHost(java.lang.String virtualHost)
613                    throws com.liferay.portal.kernel.exception.SystemException {
614                    return getPersistence().countByVirtualHost(virtualHost);
615            }
616    
617            /**
618            * Counts all the companies where mx = &#63;.
619            *
620            * @param mx the mx to search with
621            * @return the number of matching companies
622            * @throws SystemException if a system exception occurred
623            */
624            public static int countByMx(java.lang.String mx)
625                    throws com.liferay.portal.kernel.exception.SystemException {
626                    return getPersistence().countByMx(mx);
627            }
628    
629            /**
630            * Counts all the companies where logoId = &#63;.
631            *
632            * @param logoId the logo id to search with
633            * @return the number of matching companies
634            * @throws SystemException if a system exception occurred
635            */
636            public static int countByLogoId(long logoId)
637                    throws com.liferay.portal.kernel.exception.SystemException {
638                    return getPersistence().countByLogoId(logoId);
639            }
640    
641            /**
642            * Counts all the companies where system = &#63;.
643            *
644            * @param system the system to search with
645            * @return the number of matching companies
646            * @throws SystemException if a system exception occurred
647            */
648            public static int countBySystem(boolean system)
649                    throws com.liferay.portal.kernel.exception.SystemException {
650                    return getPersistence().countBySystem(system);
651            }
652    
653            /**
654            * Counts all the companies.
655            *
656            * @return the number of companies
657            * @throws SystemException if a system exception occurred
658            */
659            public static int countAll()
660                    throws com.liferay.portal.kernel.exception.SystemException {
661                    return getPersistence().countAll();
662            }
663    
664            public static CompanyPersistence getPersistence() {
665                    if (_persistence == null) {
666                            _persistence = (CompanyPersistence)PortalBeanLocatorUtil.locate(CompanyPersistence.class.getName());
667                    }
668    
669                    return _persistence;
670            }
671    
672            public void setPersistence(CompanyPersistence persistence) {
673                    _persistence = persistence;
674            }
675    
676            private static CompanyPersistence _persistence;
677    }