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