1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.Company;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="CompanyUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       CompanyPersistence
34   * @see       CompanyPersistenceImpl
35   * @generated
36   */
37  public class CompanyUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Company)
47       */
48      public static void clearCache(Company company) {
49          getPersistence().clearCache(company);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery)
64          throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Company> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Company remove(Company company) throws SystemException {
81          return getPersistence().remove(company);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static Company update(Company company, boolean merge)
88          throws SystemException {
89          return getPersistence().update(company, merge);
90      }
91  
92      public static void cacheResult(com.liferay.portal.model.Company company) {
93          getPersistence().cacheResult(company);
94      }
95  
96      public static void cacheResult(
97          java.util.List<com.liferay.portal.model.Company> companies) {
98          getPersistence().cacheResult(companies);
99      }
100 
101     public static com.liferay.portal.model.Company create(long companyId) {
102         return getPersistence().create(companyId);
103     }
104 
105     public static com.liferay.portal.model.Company remove(long companyId)
106         throws com.liferay.portal.NoSuchCompanyException,
107             com.liferay.portal.kernel.exception.SystemException {
108         return getPersistence().remove(companyId);
109     }
110 
111     public static com.liferay.portal.model.Company updateImpl(
112         com.liferay.portal.model.Company company, boolean merge)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getPersistence().updateImpl(company, merge);
115     }
116 
117     public static com.liferay.portal.model.Company findByPrimaryKey(
118         long companyId)
119         throws com.liferay.portal.NoSuchCompanyException,
120             com.liferay.portal.kernel.exception.SystemException {
121         return getPersistence().findByPrimaryKey(companyId);
122     }
123 
124     public static com.liferay.portal.model.Company fetchByPrimaryKey(
125         long companyId)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         return getPersistence().fetchByPrimaryKey(companyId);
128     }
129 
130     public static com.liferay.portal.model.Company findByWebId(
131         java.lang.String webId)
132         throws com.liferay.portal.NoSuchCompanyException,
133             com.liferay.portal.kernel.exception.SystemException {
134         return getPersistence().findByWebId(webId);
135     }
136 
137     public static com.liferay.portal.model.Company fetchByWebId(
138         java.lang.String webId)
139         throws com.liferay.portal.kernel.exception.SystemException {
140         return getPersistence().fetchByWebId(webId);
141     }
142 
143     public static com.liferay.portal.model.Company fetchByWebId(
144         java.lang.String webId, boolean retrieveFromCache)
145         throws com.liferay.portal.kernel.exception.SystemException {
146         return getPersistence().fetchByWebId(webId, retrieveFromCache);
147     }
148 
149     public static com.liferay.portal.model.Company findByVirtualHost(
150         java.lang.String virtualHost)
151         throws com.liferay.portal.NoSuchCompanyException,
152             com.liferay.portal.kernel.exception.SystemException {
153         return getPersistence().findByVirtualHost(virtualHost);
154     }
155 
156     public static com.liferay.portal.model.Company fetchByVirtualHost(
157         java.lang.String virtualHost)
158         throws com.liferay.portal.kernel.exception.SystemException {
159         return getPersistence().fetchByVirtualHost(virtualHost);
160     }
161 
162     public static com.liferay.portal.model.Company fetchByVirtualHost(
163         java.lang.String virtualHost, boolean retrieveFromCache)
164         throws com.liferay.portal.kernel.exception.SystemException {
165         return getPersistence()
166                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
167     }
168 
169     public static com.liferay.portal.model.Company findByMx(java.lang.String mx)
170         throws com.liferay.portal.NoSuchCompanyException,
171             com.liferay.portal.kernel.exception.SystemException {
172         return getPersistence().findByMx(mx);
173     }
174 
175     public static com.liferay.portal.model.Company fetchByMx(
176         java.lang.String mx)
177         throws com.liferay.portal.kernel.exception.SystemException {
178         return getPersistence().fetchByMx(mx);
179     }
180 
181     public static com.liferay.portal.model.Company fetchByMx(
182         java.lang.String mx, boolean retrieveFromCache)
183         throws com.liferay.portal.kernel.exception.SystemException {
184         return getPersistence().fetchByMx(mx, retrieveFromCache);
185     }
186 
187     public static com.liferay.portal.model.Company findByLogoId(long logoId)
188         throws com.liferay.portal.NoSuchCompanyException,
189             com.liferay.portal.kernel.exception.SystemException {
190         return getPersistence().findByLogoId(logoId);
191     }
192 
193     public static com.liferay.portal.model.Company fetchByLogoId(long logoId)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence().fetchByLogoId(logoId);
196     }
197 
198     public static com.liferay.portal.model.Company fetchByLogoId(long logoId,
199         boolean retrieveFromCache)
200         throws com.liferay.portal.kernel.exception.SystemException {
201         return getPersistence().fetchByLogoId(logoId, retrieveFromCache);
202     }
203 
204     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
205         boolean system)
206         throws com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence().findBySystem(system);
208     }
209 
210     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
211         boolean system, int start, int end)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().findBySystem(system, start, end);
214     }
215 
216     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
217         boolean system, int start, int end,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         return getPersistence()
221                    .findBySystem(system, start, end, orderByComparator);
222     }
223 
224     public static com.liferay.portal.model.Company findBySystem_First(
225         boolean system,
226         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227         throws com.liferay.portal.NoSuchCompanyException,
228             com.liferay.portal.kernel.exception.SystemException {
229         return getPersistence().findBySystem_First(system, orderByComparator);
230     }
231 
232     public static com.liferay.portal.model.Company findBySystem_Last(
233         boolean system,
234         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
235         throws com.liferay.portal.NoSuchCompanyException,
236             com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence().findBySystem_Last(system, orderByComparator);
238     }
239 
240     public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
241         long companyId, boolean system,
242         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243         throws com.liferay.portal.NoSuchCompanyException,
244             com.liferay.portal.kernel.exception.SystemException {
245         return getPersistence()
246                    .findBySystem_PrevAndNext(companyId, system,
247             orderByComparator);
248     }
249 
250     public static java.util.List<com.liferay.portal.model.Company> findAll()
251         throws com.liferay.portal.kernel.exception.SystemException {
252         return getPersistence().findAll();
253     }
254 
255     public static java.util.List<com.liferay.portal.model.Company> findAll(
256         int start, int end)
257         throws com.liferay.portal.kernel.exception.SystemException {
258         return getPersistence().findAll(start, end);
259     }
260 
261     public static java.util.List<com.liferay.portal.model.Company> findAll(
262         int start, int end,
263         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264         throws com.liferay.portal.kernel.exception.SystemException {
265         return getPersistence().findAll(start, end, orderByComparator);
266     }
267 
268     public static void removeByWebId(java.lang.String webId)
269         throws com.liferay.portal.NoSuchCompanyException,
270             com.liferay.portal.kernel.exception.SystemException {
271         getPersistence().removeByWebId(webId);
272     }
273 
274     public static void removeByVirtualHost(java.lang.String virtualHost)
275         throws com.liferay.portal.NoSuchCompanyException,
276             com.liferay.portal.kernel.exception.SystemException {
277         getPersistence().removeByVirtualHost(virtualHost);
278     }
279 
280     public static void removeByMx(java.lang.String mx)
281         throws com.liferay.portal.NoSuchCompanyException,
282             com.liferay.portal.kernel.exception.SystemException {
283         getPersistence().removeByMx(mx);
284     }
285 
286     public static void removeByLogoId(long logoId)
287         throws com.liferay.portal.NoSuchCompanyException,
288             com.liferay.portal.kernel.exception.SystemException {
289         getPersistence().removeByLogoId(logoId);
290     }
291 
292     public static void removeBySystem(boolean system)
293         throws com.liferay.portal.kernel.exception.SystemException {
294         getPersistence().removeBySystem(system);
295     }
296 
297     public static void removeAll()
298         throws com.liferay.portal.kernel.exception.SystemException {
299         getPersistence().removeAll();
300     }
301 
302     public static int countByWebId(java.lang.String webId)
303         throws com.liferay.portal.kernel.exception.SystemException {
304         return getPersistence().countByWebId(webId);
305     }
306 
307     public static int countByVirtualHost(java.lang.String virtualHost)
308         throws com.liferay.portal.kernel.exception.SystemException {
309         return getPersistence().countByVirtualHost(virtualHost);
310     }
311 
312     public static int countByMx(java.lang.String mx)
313         throws com.liferay.portal.kernel.exception.SystemException {
314         return getPersistence().countByMx(mx);
315     }
316 
317     public static int countByLogoId(long logoId)
318         throws com.liferay.portal.kernel.exception.SystemException {
319         return getPersistence().countByLogoId(logoId);
320     }
321 
322     public static int countBySystem(boolean system)
323         throws com.liferay.portal.kernel.exception.SystemException {
324         return getPersistence().countBySystem(system);
325     }
326 
327     public static int countAll()
328         throws com.liferay.portal.kernel.exception.SystemException {
329         return getPersistence().countAll();
330     }
331 
332     public static CompanyPersistence getPersistence() {
333         if (_persistence == null) {
334             _persistence = (CompanyPersistence)PortalBeanLocatorUtil.locate(CompanyPersistence.class.getName());
335         }
336 
337         return _persistence;
338     }
339 
340     public void setPersistence(CompanyPersistence persistence) {
341         _persistence = persistence;
342     }
343 
344     private static CompanyPersistence _persistence;
345 }