1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  
26  /**
27   * <a href="CompanyUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       CompanyPersistence
36   * @see       CompanyPersistenceImpl
37   * @generated
38   */
39  public class CompanyUtil {
40      public static void cacheResult(com.liferay.portal.model.Company company) {
41          getPersistence().cacheResult(company);
42      }
43  
44      public static void cacheResult(
45          java.util.List<com.liferay.portal.model.Company> companies) {
46          getPersistence().cacheResult(companies);
47      }
48  
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      public static com.liferay.portal.model.Company create(long companyId) {
54          return getPersistence().create(companyId);
55      }
56  
57      public static com.liferay.portal.model.Company remove(long companyId)
58          throws com.liferay.portal.NoSuchCompanyException,
59              com.liferay.portal.SystemException {
60          return getPersistence().remove(companyId);
61      }
62  
63      public static com.liferay.portal.model.Company remove(
64          com.liferay.portal.model.Company company)
65          throws com.liferay.portal.SystemException {
66          return getPersistence().remove(company);
67      }
68  
69      /**
70       * @deprecated Use {@link #update(Company, boolean merge)}.
71       */
72      public static com.liferay.portal.model.Company update(
73          com.liferay.portal.model.Company company)
74          throws com.liferay.portal.SystemException {
75          return getPersistence().update(company);
76      }
77  
78      /**
79       * Add, update, or merge, the entity. This method also calls the model
80       * listeners to trigger the proper events associated with adding, deleting,
81       * or updating an entity.
82       *
83       * @param  company the entity to add, update, or merge
84       * @param  merge boolean value for whether to merge the entity. The default
85       *         value is false. Setting merge to true is more expensive and
86       *         should only be true when company is transient. See
87       *         LEP-5473 for a detailed discussion of this method.
88       * @return the entity that was added, updated, or merged
89       */
90      public static com.liferay.portal.model.Company update(
91          com.liferay.portal.model.Company company, boolean merge)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().update(company, merge);
94      }
95  
96      public static com.liferay.portal.model.Company updateImpl(
97          com.liferay.portal.model.Company company, boolean merge)
98          throws com.liferay.portal.SystemException {
99          return getPersistence().updateImpl(company, merge);
100     }
101 
102     public static com.liferay.portal.model.Company findByPrimaryKey(
103         long companyId)
104         throws com.liferay.portal.NoSuchCompanyException,
105             com.liferay.portal.SystemException {
106         return getPersistence().findByPrimaryKey(companyId);
107     }
108 
109     public static com.liferay.portal.model.Company fetchByPrimaryKey(
110         long companyId) throws com.liferay.portal.SystemException {
111         return getPersistence().fetchByPrimaryKey(companyId);
112     }
113 
114     public static com.liferay.portal.model.Company findByWebId(
115         java.lang.String webId)
116         throws com.liferay.portal.NoSuchCompanyException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByWebId(webId);
119     }
120 
121     public static com.liferay.portal.model.Company fetchByWebId(
122         java.lang.String webId) throws com.liferay.portal.SystemException {
123         return getPersistence().fetchByWebId(webId);
124     }
125 
126     public static com.liferay.portal.model.Company fetchByWebId(
127         java.lang.String webId, boolean retrieveFromCache)
128         throws com.liferay.portal.SystemException {
129         return getPersistence().fetchByWebId(webId, retrieveFromCache);
130     }
131 
132     public static com.liferay.portal.model.Company findByVirtualHost(
133         java.lang.String virtualHost)
134         throws com.liferay.portal.NoSuchCompanyException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByVirtualHost(virtualHost);
137     }
138 
139     public static com.liferay.portal.model.Company fetchByVirtualHost(
140         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
141         return getPersistence().fetchByVirtualHost(virtualHost);
142     }
143 
144     public static com.liferay.portal.model.Company fetchByVirtualHost(
145         java.lang.String virtualHost, boolean retrieveFromCache)
146         throws com.liferay.portal.SystemException {
147         return getPersistence()
148                    .fetchByVirtualHost(virtualHost, retrieveFromCache);
149     }
150 
151     public static com.liferay.portal.model.Company findByMx(java.lang.String mx)
152         throws com.liferay.portal.NoSuchCompanyException,
153             com.liferay.portal.SystemException {
154         return getPersistence().findByMx(mx);
155     }
156 
157     public static com.liferay.portal.model.Company fetchByMx(
158         java.lang.String mx) throws com.liferay.portal.SystemException {
159         return getPersistence().fetchByMx(mx);
160     }
161 
162     public static com.liferay.portal.model.Company fetchByMx(
163         java.lang.String mx, boolean retrieveFromCache)
164         throws com.liferay.portal.SystemException {
165         return getPersistence().fetchByMx(mx, retrieveFromCache);
166     }
167 
168     public static com.liferay.portal.model.Company findByLogoId(long logoId)
169         throws com.liferay.portal.NoSuchCompanyException,
170             com.liferay.portal.SystemException {
171         return getPersistence().findByLogoId(logoId);
172     }
173 
174     public static com.liferay.portal.model.Company fetchByLogoId(long logoId)
175         throws com.liferay.portal.SystemException {
176         return getPersistence().fetchByLogoId(logoId);
177     }
178 
179     public static com.liferay.portal.model.Company fetchByLogoId(long logoId,
180         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
181         return getPersistence().fetchByLogoId(logoId, retrieveFromCache);
182     }
183 
184     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
185         boolean system) throws com.liferay.portal.SystemException {
186         return getPersistence().findBySystem(system);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
190         boolean system, int start, int end)
191         throws com.liferay.portal.SystemException {
192         return getPersistence().findBySystem(system, start, end);
193     }
194 
195     public static java.util.List<com.liferay.portal.model.Company> findBySystem(
196         boolean system, int start, int end,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findBySystem(system, start, end, obc);
200     }
201 
202     public static com.liferay.portal.model.Company findBySystem_First(
203         boolean system, com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.NoSuchCompanyException,
205             com.liferay.portal.SystemException {
206         return getPersistence().findBySystem_First(system, obc);
207     }
208 
209     public static com.liferay.portal.model.Company findBySystem_Last(
210         boolean system, com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.NoSuchCompanyException,
212             com.liferay.portal.SystemException {
213         return getPersistence().findBySystem_Last(system, obc);
214     }
215 
216     public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
217         long companyId, boolean system,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.NoSuchCompanyException,
220             com.liferay.portal.SystemException {
221         return getPersistence().findBySystem_PrevAndNext(companyId, system, obc);
222     }
223 
224     public static java.util.List<Object> findWithDynamicQuery(
225         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findWithDynamicQuery(dynamicQuery);
228     }
229 
230     public static java.util.List<Object> findWithDynamicQuery(
231         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
232         int end) throws com.liferay.portal.SystemException {
233         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
234     }
235 
236     public static java.util.List<com.liferay.portal.model.Company> findAll()
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findAll();
239     }
240 
241     public static java.util.List<com.liferay.portal.model.Company> findAll(
242         int start, int end) throws com.liferay.portal.SystemException {
243         return getPersistence().findAll(start, end);
244     }
245 
246     public static java.util.List<com.liferay.portal.model.Company> findAll(
247         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findAll(start, end, obc);
250     }
251 
252     public static void removeByWebId(java.lang.String webId)
253         throws com.liferay.portal.NoSuchCompanyException,
254             com.liferay.portal.SystemException {
255         getPersistence().removeByWebId(webId);
256     }
257 
258     public static void removeByVirtualHost(java.lang.String virtualHost)
259         throws com.liferay.portal.NoSuchCompanyException,
260             com.liferay.portal.SystemException {
261         getPersistence().removeByVirtualHost(virtualHost);
262     }
263 
264     public static void removeByMx(java.lang.String mx)
265         throws com.liferay.portal.NoSuchCompanyException,
266             com.liferay.portal.SystemException {
267         getPersistence().removeByMx(mx);
268     }
269 
270     public static void removeByLogoId(long logoId)
271         throws com.liferay.portal.NoSuchCompanyException,
272             com.liferay.portal.SystemException {
273         getPersistence().removeByLogoId(logoId);
274     }
275 
276     public static void removeBySystem(boolean system)
277         throws com.liferay.portal.SystemException {
278         getPersistence().removeBySystem(system);
279     }
280 
281     public static void removeAll() throws com.liferay.portal.SystemException {
282         getPersistence().removeAll();
283     }
284 
285     public static int countByWebId(java.lang.String webId)
286         throws com.liferay.portal.SystemException {
287         return getPersistence().countByWebId(webId);
288     }
289 
290     public static int countByVirtualHost(java.lang.String virtualHost)
291         throws com.liferay.portal.SystemException {
292         return getPersistence().countByVirtualHost(virtualHost);
293     }
294 
295     public static int countByMx(java.lang.String mx)
296         throws com.liferay.portal.SystemException {
297         return getPersistence().countByMx(mx);
298     }
299 
300     public static int countByLogoId(long logoId)
301         throws com.liferay.portal.SystemException {
302         return getPersistence().countByLogoId(logoId);
303     }
304 
305     public static int countBySystem(boolean system)
306         throws com.liferay.portal.SystemException {
307         return getPersistence().countBySystem(system);
308     }
309 
310     public static int countAll() throws com.liferay.portal.SystemException {
311         return getPersistence().countAll();
312     }
313 
314     public static CompanyPersistence getPersistence() {
315         return _persistence;
316     }
317 
318     public void setPersistence(CompanyPersistence persistence) {
319         _persistence = persistence;
320     }
321 
322     private static CompanyPersistence _persistence;
323 }