1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
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#findWithDynamicQuery(DynamicQuery)
47       */
48      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
49          throws SystemException {
50          return getPersistence().findWithDynamicQuery(dynamicQuery);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
57          int start, int end) throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
63       */
64      public static Company remove(Company company) throws SystemException {
65          return getPersistence().remove(company);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
70       */
71      public static Company update(Company company, boolean merge)
72          throws SystemException {
73          return getPersistence().update(company, merge);
74      }
75  
76      public static void cacheResult(com.liferay.portal.model.Company company) {
77          getPersistence().cacheResult(company);
78      }
79  
80      public static void cacheResult(
81          java.util.List<com.liferay.portal.model.Company> companies) {
82          getPersistence().cacheResult(companies);
83      }
84  
85      public static com.liferay.portal.model.Company create(long companyId) {
86          return getPersistence().create(companyId);
87      }
88  
89      public static com.liferay.portal.model.Company remove(long companyId)
90          throws com.liferay.portal.NoSuchCompanyException,
91              com.liferay.portal.SystemException {
92          return getPersistence().remove(companyId);
93      }
94  
95      /**
96       * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
97       */
98      public static com.liferay.portal.model.Company update(
99          com.liferay.portal.model.Company company)
100         throws com.liferay.portal.SystemException {
101         return getPersistence().update(company);
102     }
103 
104     public static com.liferay.portal.model.Company updateImpl(
105         com.liferay.portal.model.Company company, boolean merge)
106         throws com.liferay.portal.SystemException {
107         return getPersistence().updateImpl(company, merge);
108     }
109 
110     public static com.liferay.portal.model.Company findByPrimaryKey(
111         long companyId)
112         throws com.liferay.portal.NoSuchCompanyException,
113             com.liferay.portal.SystemException {
114         return getPersistence().findByPrimaryKey(companyId);
115     }
116 
117     public static com.liferay.portal.model.Company fetchByPrimaryKey(
118         long companyId) throws com.liferay.portal.SystemException {
119         return getPersistence().fetchByPrimaryKey(companyId);
120     }
121 
122     public static com.liferay.portal.model.Company findByWebId(
123         java.lang.String webId)
124         throws com.liferay.portal.NoSuchCompanyException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByWebId(webId);
127     }
128 
129     public static com.liferay.portal.model.Company fetchByWebId(
130         java.lang.String webId) throws com.liferay.portal.SystemException {
131         return getPersistence().fetchByWebId(webId);
132     }
133 
134     public static com.liferay.portal.model.Company fetchByWebId(
135         java.lang.String webId, boolean retrieveFromCache)
136         throws com.liferay.portal.SystemException {
137         return getPersistence().fetchByWebId(webId, retrieveFromCache);
138     }
139 
140     public static com.liferay.portal.model.Company findByVirtualHost(
141         java.lang.String virtualHost)
142         throws com.liferay.portal.NoSuchCompanyException,
143             com.liferay.portal.SystemException {
144         return getPersistence().findByVirtualHost(virtualHost);
145     }
146 
147     public static com.liferay.portal.model.Company fetchByVirtualHost(
148         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
149         return getPersistence().fetchByVirtualHost(virtualHost);
150     }
151 
152     public static com.liferay.portal.model.Company fetchByVirtualHost(
153         java.lang.String virtualHost, boolean retrieveFromCache)
154         throws com.liferay.portal.SystemException {
155         return getPersistence()
156                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
157     }
158 
159     public static com.liferay.portal.model.Company findByMx(java.lang.String mx)
160         throws com.liferay.portal.NoSuchCompanyException,
161             com.liferay.portal.SystemException {
162         return getPersistence().findByMx(mx);
163     }
164 
165     public static com.liferay.portal.model.Company fetchByMx(
166         java.lang.String mx) throws com.liferay.portal.SystemException {
167         return getPersistence().fetchByMx(mx);
168     }
169 
170     public static com.liferay.portal.model.Company fetchByMx(
171         java.lang.String mx, boolean retrieveFromCache)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().fetchByMx(mx, retrieveFromCache);
174     }
175 
176     public static com.liferay.portal.model.Company findByLogoId(long logoId)
177         throws com.liferay.portal.NoSuchCompanyException,
178             com.liferay.portal.SystemException {
179         return getPersistence().findByLogoId(logoId);
180     }
181 
182     public static com.liferay.portal.model.Company fetchByLogoId(long logoId)
183         throws com.liferay.portal.SystemException {
184         return getPersistence().fetchByLogoId(logoId);
185     }
186 
187     public static com.liferay.portal.model.Company fetchByLogoId(long logoId,
188         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
189         return getPersistence().fetchByLogoId(logoId, retrieveFromCache);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
193         boolean system) throws com.liferay.portal.SystemException {
194         return getPersistence().findBySystem(system);
195     }
196 
197     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
198         boolean system, int start, int end)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findBySystem(system, start, end);
201     }
202 
203     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
204         boolean system, int start, int end,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.SystemException {
207         return getPersistence()
208                    .findBySystem(system, start, end, orderByComparator);
209     }
210 
211     public static com.liferay.portal.model.Company findBySystem_First(
212         boolean system,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.NoSuchCompanyException,
215             com.liferay.portal.SystemException {
216         return getPersistence().findBySystem_First(system, orderByComparator);
217     }
218 
219     public static com.liferay.portal.model.Company findBySystem_Last(
220         boolean system,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.NoSuchCompanyException,
223             com.liferay.portal.SystemException {
224         return getPersistence().findBySystem_Last(system, orderByComparator);
225     }
226 
227     public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
228         long companyId, boolean system,
229         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230         throws com.liferay.portal.NoSuchCompanyException,
231             com.liferay.portal.SystemException {
232         return getPersistence()
233                    .findBySystem_PrevAndNext(companyId, system,
234             orderByComparator);
235     }
236 
237     public static java.util.List<com.liferay.portal.model.Company> findAll()
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findAll();
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Company> findAll(
243         int start, int end) throws com.liferay.portal.SystemException {
244         return getPersistence().findAll(start, end);
245     }
246 
247     public static java.util.List<com.liferay.portal.model.Company> findAll(
248         int start, int end,
249         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().findAll(start, end, orderByComparator);
252     }
253 
254     public static void removeByWebId(java.lang.String webId)
255         throws com.liferay.portal.NoSuchCompanyException,
256             com.liferay.portal.SystemException {
257         getPersistence().removeByWebId(webId);
258     }
259 
260     public static void removeByVirtualHost(java.lang.String virtualHost)
261         throws com.liferay.portal.NoSuchCompanyException,
262             com.liferay.portal.SystemException {
263         getPersistence().removeByVirtualHost(virtualHost);
264     }
265 
266     public static void removeByMx(java.lang.String mx)
267         throws com.liferay.portal.NoSuchCompanyException,
268             com.liferay.portal.SystemException {
269         getPersistence().removeByMx(mx);
270     }
271 
272     public static void removeByLogoId(long logoId)
273         throws com.liferay.portal.NoSuchCompanyException,
274             com.liferay.portal.SystemException {
275         getPersistence().removeByLogoId(logoId);
276     }
277 
278     public static void removeBySystem(boolean system)
279         throws com.liferay.portal.SystemException {
280         getPersistence().removeBySystem(system);
281     }
282 
283     public static void removeAll() throws com.liferay.portal.SystemException {
284         getPersistence().removeAll();
285     }
286 
287     public static int countByWebId(java.lang.String webId)
288         throws com.liferay.portal.SystemException {
289         return getPersistence().countByWebId(webId);
290     }
291 
292     public static int countByVirtualHost(java.lang.String virtualHost)
293         throws com.liferay.portal.SystemException {
294         return getPersistence().countByVirtualHost(virtualHost);
295     }
296 
297     public static int countByMx(java.lang.String mx)
298         throws com.liferay.portal.SystemException {
299         return getPersistence().countByMx(mx);
300     }
301 
302     public static int countByLogoId(long logoId)
303         throws com.liferay.portal.SystemException {
304         return getPersistence().countByLogoId(logoId);
305     }
306 
307     public static int countBySystem(boolean system)
308         throws com.liferay.portal.SystemException {
309         return getPersistence().countBySystem(system);
310     }
311 
312     public static int countAll() throws com.liferay.portal.SystemException {
313         return getPersistence().countAll();
314     }
315 
316     public static CompanyPersistence getPersistence() {
317         if (_persistence == null) {
318             _persistence = (CompanyPersistence)PortalBeanLocatorUtil.locate(CompanyPersistence.class.getName());
319         }
320 
321         return _persistence;
322     }
323 
324     public void setPersistence(CompanyPersistence persistence) {
325         _persistence = persistence;
326     }
327 
328     private static CompanyPersistence _persistence;
329 }