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 obc)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findBySystem(system, start, end, obc);
208     }
209 
210     public static com.liferay.portal.model.Company findBySystem_First(
211         boolean system, com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.NoSuchCompanyException,
213             com.liferay.portal.SystemException {
214         return getPersistence().findBySystem_First(system, obc);
215     }
216 
217     public static com.liferay.portal.model.Company findBySystem_Last(
218         boolean system, com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.NoSuchCompanyException,
220             com.liferay.portal.SystemException {
221         return getPersistence().findBySystem_Last(system, obc);
222     }
223 
224     public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
225         long companyId, boolean system,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.NoSuchCompanyException,
228             com.liferay.portal.SystemException {
229         return getPersistence().findBySystem_PrevAndNext(companyId, system, obc);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.Company> findAll()
233         throws com.liferay.portal.SystemException {
234         return getPersistence().findAll();
235     }
236 
237     public static java.util.List<com.liferay.portal.model.Company> findAll(
238         int start, int end) throws com.liferay.portal.SystemException {
239         return getPersistence().findAll(start, end);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Company> findAll(
243         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
244         throws com.liferay.portal.SystemException {
245         return getPersistence().findAll(start, end, obc);
246     }
247 
248     public static void removeByWebId(java.lang.String webId)
249         throws com.liferay.portal.NoSuchCompanyException,
250             com.liferay.portal.SystemException {
251         getPersistence().removeByWebId(webId);
252     }
253 
254     public static void removeByVirtualHost(java.lang.String virtualHost)
255         throws com.liferay.portal.NoSuchCompanyException,
256             com.liferay.portal.SystemException {
257         getPersistence().removeByVirtualHost(virtualHost);
258     }
259 
260     public static void removeByMx(java.lang.String mx)
261         throws com.liferay.portal.NoSuchCompanyException,
262             com.liferay.portal.SystemException {
263         getPersistence().removeByMx(mx);
264     }
265 
266     public static void removeByLogoId(long logoId)
267         throws com.liferay.portal.NoSuchCompanyException,
268             com.liferay.portal.SystemException {
269         getPersistence().removeByLogoId(logoId);
270     }
271 
272     public static void removeBySystem(boolean system)
273         throws com.liferay.portal.SystemException {
274         getPersistence().removeBySystem(system);
275     }
276 
277     public static void removeAll() throws com.liferay.portal.SystemException {
278         getPersistence().removeAll();
279     }
280 
281     public static int countByWebId(java.lang.String webId)
282         throws com.liferay.portal.SystemException {
283         return getPersistence().countByWebId(webId);
284     }
285 
286     public static int countByVirtualHost(java.lang.String virtualHost)
287         throws com.liferay.portal.SystemException {
288         return getPersistence().countByVirtualHost(virtualHost);
289     }
290 
291     public static int countByMx(java.lang.String mx)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().countByMx(mx);
294     }
295 
296     public static int countByLogoId(long logoId)
297         throws com.liferay.portal.SystemException {
298         return getPersistence().countByLogoId(logoId);
299     }
300 
301     public static int countBySystem(boolean system)
302         throws com.liferay.portal.SystemException {
303         return getPersistence().countBySystem(system);
304     }
305 
306     public static int countAll() throws com.liferay.portal.SystemException {
307         return getPersistence().countAll();
308     }
309 
310     public static CompanyPersistence getPersistence() {
311         if (_persistence == null) {
312             _persistence = (CompanyPersistence)PortalBeanLocatorUtil.locate(CompanyPersistence.class.getName());
313         }
314 
315         return _persistence;
316     }
317 
318     public void setPersistence(CompanyPersistence persistence) {
319         _persistence = persistence;
320     }
321 
322     private static CompanyPersistence _persistence;
323 }