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     * @author    Brian Wing Shun Chan
028     * @see       CompanyPersistence
029     * @see       CompanyPersistenceImpl
030     * @generated
031     */
032    public class CompanyUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Company company) {
044                    getPersistence().clearCache(company);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery)
059                    throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Company> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<Company> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static Company remove(Company company) throws SystemException {
087                    return getPersistence().remove(company);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
092             */
093            public static Company update(Company company, boolean merge)
094                    throws SystemException {
095                    return getPersistence().update(company, merge);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
100             */
101            public static Company update(Company company, boolean merge,
102                    ServiceContext serviceContext) throws SystemException {
103                    return getPersistence().update(company, merge, serviceContext);
104            }
105    
106            public static void cacheResult(com.liferay.portal.model.Company company) {
107                    getPersistence().cacheResult(company);
108            }
109    
110            public static void cacheResult(
111                    java.util.List<com.liferay.portal.model.Company> companies) {
112                    getPersistence().cacheResult(companies);
113            }
114    
115            public static com.liferay.portal.model.Company create(long companyId) {
116                    return getPersistence().create(companyId);
117            }
118    
119            public static com.liferay.portal.model.Company remove(long companyId)
120                    throws com.liferay.portal.NoSuchCompanyException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    return getPersistence().remove(companyId);
123            }
124    
125            public static com.liferay.portal.model.Company updateImpl(
126                    com.liferay.portal.model.Company company, boolean merge)
127                    throws com.liferay.portal.kernel.exception.SystemException {
128                    return getPersistence().updateImpl(company, merge);
129            }
130    
131            public static com.liferay.portal.model.Company findByPrimaryKey(
132                    long companyId)
133                    throws com.liferay.portal.NoSuchCompanyException,
134                            com.liferay.portal.kernel.exception.SystemException {
135                    return getPersistence().findByPrimaryKey(companyId);
136            }
137    
138            public static com.liferay.portal.model.Company fetchByPrimaryKey(
139                    long companyId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getPersistence().fetchByPrimaryKey(companyId);
142            }
143    
144            public static com.liferay.portal.model.Company findByWebId(
145                    java.lang.String webId)
146                    throws com.liferay.portal.NoSuchCompanyException,
147                            com.liferay.portal.kernel.exception.SystemException {
148                    return getPersistence().findByWebId(webId);
149            }
150    
151            public static com.liferay.portal.model.Company fetchByWebId(
152                    java.lang.String webId)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getPersistence().fetchByWebId(webId);
155            }
156    
157            public static com.liferay.portal.model.Company fetchByWebId(
158                    java.lang.String webId, boolean retrieveFromCache)
159                    throws com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().fetchByWebId(webId, retrieveFromCache);
161            }
162    
163            public static com.liferay.portal.model.Company findByVirtualHost(
164                    java.lang.String virtualHost)
165                    throws com.liferay.portal.NoSuchCompanyException,
166                            com.liferay.portal.kernel.exception.SystemException {
167                    return getPersistence().findByVirtualHost(virtualHost);
168            }
169    
170            public static com.liferay.portal.model.Company fetchByVirtualHost(
171                    java.lang.String virtualHost)
172                    throws com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence().fetchByVirtualHost(virtualHost);
174            }
175    
176            public static com.liferay.portal.model.Company fetchByVirtualHost(
177                    java.lang.String virtualHost, boolean retrieveFromCache)
178                    throws com.liferay.portal.kernel.exception.SystemException {
179                    return getPersistence()
180                                       .fetchByVirtualHost(virtualHost, retrieveFromCache);
181            }
182    
183            public static com.liferay.portal.model.Company findByMx(java.lang.String mx)
184                    throws com.liferay.portal.NoSuchCompanyException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    return getPersistence().findByMx(mx);
187            }
188    
189            public static com.liferay.portal.model.Company fetchByMx(
190                    java.lang.String mx)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByMx(mx);
193            }
194    
195            public static com.liferay.portal.model.Company fetchByMx(
196                    java.lang.String mx, boolean retrieveFromCache)
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return getPersistence().fetchByMx(mx, retrieveFromCache);
199            }
200    
201            public static com.liferay.portal.model.Company findByLogoId(long logoId)
202                    throws com.liferay.portal.NoSuchCompanyException,
203                            com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByLogoId(logoId);
205            }
206    
207            public static com.liferay.portal.model.Company fetchByLogoId(long logoId)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getPersistence().fetchByLogoId(logoId);
210            }
211    
212            public static com.liferay.portal.model.Company fetchByLogoId(long logoId,
213                    boolean retrieveFromCache)
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence().fetchByLogoId(logoId, retrieveFromCache);
216            }
217    
218            public static java.util.List<com.liferay.portal.model.Company> findBySystem(
219                    boolean system)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findBySystem(system);
222            }
223    
224            public static java.util.List<com.liferay.portal.model.Company> findBySystem(
225                    boolean system, int start, int end)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findBySystem(system, start, end);
228            }
229    
230            public static java.util.List<com.liferay.portal.model.Company> findBySystem(
231                    boolean system, int start, int end,
232                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233                    throws com.liferay.portal.kernel.exception.SystemException {
234                    return getPersistence()
235                                       .findBySystem(system, start, end, orderByComparator);
236            }
237    
238            public static com.liferay.portal.model.Company findBySystem_First(
239                    boolean system,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.NoSuchCompanyException,
242                            com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence().findBySystem_First(system, orderByComparator);
244            }
245    
246            public static com.liferay.portal.model.Company findBySystem_Last(
247                    boolean system,
248                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249                    throws com.liferay.portal.NoSuchCompanyException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    return getPersistence().findBySystem_Last(system, orderByComparator);
252            }
253    
254            public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
255                    long companyId, boolean system,
256                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257                    throws com.liferay.portal.NoSuchCompanyException,
258                            com.liferay.portal.kernel.exception.SystemException {
259                    return getPersistence()
260                                       .findBySystem_PrevAndNext(companyId, system,
261                            orderByComparator);
262            }
263    
264            public static java.util.List<com.liferay.portal.model.Company> findAll()
265                    throws com.liferay.portal.kernel.exception.SystemException {
266                    return getPersistence().findAll();
267            }
268    
269            public static java.util.List<com.liferay.portal.model.Company> findAll(
270                    int start, int end)
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    return getPersistence().findAll(start, end);
273            }
274    
275            public static java.util.List<com.liferay.portal.model.Company> findAll(
276                    int start, int end,
277                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    return getPersistence().findAll(start, end, orderByComparator);
280            }
281    
282            public static void removeByWebId(java.lang.String webId)
283                    throws com.liferay.portal.NoSuchCompanyException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    getPersistence().removeByWebId(webId);
286            }
287    
288            public static void removeByVirtualHost(java.lang.String virtualHost)
289                    throws com.liferay.portal.NoSuchCompanyException,
290                            com.liferay.portal.kernel.exception.SystemException {
291                    getPersistence().removeByVirtualHost(virtualHost);
292            }
293    
294            public static void removeByMx(java.lang.String mx)
295                    throws com.liferay.portal.NoSuchCompanyException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    getPersistence().removeByMx(mx);
298            }
299    
300            public static void removeByLogoId(long logoId)
301                    throws com.liferay.portal.NoSuchCompanyException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    getPersistence().removeByLogoId(logoId);
304            }
305    
306            public static void removeBySystem(boolean system)
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    getPersistence().removeBySystem(system);
309            }
310    
311            public static void removeAll()
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    getPersistence().removeAll();
314            }
315    
316            public static int countByWebId(java.lang.String webId)
317                    throws com.liferay.portal.kernel.exception.SystemException {
318                    return getPersistence().countByWebId(webId);
319            }
320    
321            public static int countByVirtualHost(java.lang.String virtualHost)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence().countByVirtualHost(virtualHost);
324            }
325    
326            public static int countByMx(java.lang.String mx)
327                    throws com.liferay.portal.kernel.exception.SystemException {
328                    return getPersistence().countByMx(mx);
329            }
330    
331            public static int countByLogoId(long logoId)
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    return getPersistence().countByLogoId(logoId);
334            }
335    
336            public static int countBySystem(boolean system)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    return getPersistence().countBySystem(system);
339            }
340    
341            public static int countAll()
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().countAll();
344            }
345    
346            public static CompanyPersistence getPersistence() {
347                    if (_persistence == null) {
348                            _persistence = (CompanyPersistence)PortalBeanLocatorUtil.locate(CompanyPersistence.class.getName());
349                    }
350    
351                    return _persistence;
352            }
353    
354            public void setPersistence(CompanyPersistence persistence) {
355                    _persistence = persistence;
356            }
357    
358            private static CompanyPersistence _persistence;
359    }