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 com.liferay.portal.model.Company create(long companyId) {
30          return getPersistence().create(companyId);
31      }
32  
33      public static com.liferay.portal.model.Company remove(long companyId)
34          throws com.liferay.portal.NoSuchCompanyException,
35              com.liferay.portal.SystemException {
36          return getPersistence().remove(companyId);
37      }
38  
39      public static com.liferay.portal.model.Company remove(
40          com.liferay.portal.model.Company company)
41          throws com.liferay.portal.SystemException {
42          return getPersistence().remove(company);
43      }
44  
45      /**
46       * @deprecated Use <code>update(Company company, boolean merge)</code>.
47       */
48      public static com.liferay.portal.model.Company update(
49          com.liferay.portal.model.Company company)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(company);
52      }
53  
54      /**
55       * Add, update, or merge, the entity. This method also calls the model
56       * listeners to trigger the proper events associated with adding, deleting,
57       * or updating an entity.
58       *
59       * @param        company the entity to add, update, or merge
60       * @param        merge boolean value for whether to merge the entity. The
61       *                default value is false. Setting merge to true is more
62       *                expensive and should only be true when company is
63       *                transient. See LEP-5473 for a detailed discussion of this
64       *                method.
65       * @return        true if the portlet can be displayed via Ajax
66       */
67      public static com.liferay.portal.model.Company update(
68          com.liferay.portal.model.Company company, boolean merge)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(company, merge);
71      }
72  
73      public static com.liferay.portal.model.Company updateImpl(
74          com.liferay.portal.model.Company company, boolean merge)
75          throws com.liferay.portal.SystemException {
76          return getPersistence().updateImpl(company, merge);
77      }
78  
79      public static com.liferay.portal.model.Company findByPrimaryKey(
80          long companyId)
81          throws com.liferay.portal.NoSuchCompanyException,
82              com.liferay.portal.SystemException {
83          return getPersistence().findByPrimaryKey(companyId);
84      }
85  
86      public static com.liferay.portal.model.Company fetchByPrimaryKey(
87          long companyId) throws com.liferay.portal.SystemException {
88          return getPersistence().fetchByPrimaryKey(companyId);
89      }
90  
91      public static com.liferay.portal.model.Company findByWebId(
92          java.lang.String webId)
93          throws com.liferay.portal.NoSuchCompanyException,
94              com.liferay.portal.SystemException {
95          return getPersistence().findByWebId(webId);
96      }
97  
98      public static com.liferay.portal.model.Company fetchByWebId(
99          java.lang.String webId) throws com.liferay.portal.SystemException {
100         return getPersistence().fetchByWebId(webId);
101     }
102 
103     public static com.liferay.portal.model.Company findByVirtualHost(
104         java.lang.String virtualHost)
105         throws com.liferay.portal.NoSuchCompanyException,
106             com.liferay.portal.SystemException {
107         return getPersistence().findByVirtualHost(virtualHost);
108     }
109 
110     public static com.liferay.portal.model.Company fetchByVirtualHost(
111         java.lang.String virtualHost) throws com.liferay.portal.SystemException {
112         return getPersistence().fetchByVirtualHost(virtualHost);
113     }
114 
115     public static com.liferay.portal.model.Company findByMx(java.lang.String mx)
116         throws com.liferay.portal.NoSuchCompanyException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByMx(mx);
119     }
120 
121     public static com.liferay.portal.model.Company fetchByMx(
122         java.lang.String mx) throws com.liferay.portal.SystemException {
123         return getPersistence().fetchByMx(mx);
124     }
125 
126     public static com.liferay.portal.model.Company findByLogoId(long logoId)
127         throws com.liferay.portal.NoSuchCompanyException,
128             com.liferay.portal.SystemException {
129         return getPersistence().findByLogoId(logoId);
130     }
131 
132     public static com.liferay.portal.model.Company fetchByLogoId(long logoId)
133         throws com.liferay.portal.SystemException {
134         return getPersistence().fetchByLogoId(logoId);
135     }
136 
137     public static java.util.List<Object> findWithDynamicQuery(
138         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
139         throws com.liferay.portal.SystemException {
140         return getPersistence().findWithDynamicQuery(dynamicQuery);
141     }
142 
143     public static java.util.List<Object> findWithDynamicQuery(
144         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145         int end) throws com.liferay.portal.SystemException {
146         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portal.model.Company> findAll()
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findAll();
152     }
153 
154     public static java.util.List<com.liferay.portal.model.Company> findAll(
155         int start, int end) throws com.liferay.portal.SystemException {
156         return getPersistence().findAll(start, end);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.Company> findAll(
160         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findAll(start, end, obc);
163     }
164 
165     public static void removeByWebId(java.lang.String webId)
166         throws com.liferay.portal.NoSuchCompanyException,
167             com.liferay.portal.SystemException {
168         getPersistence().removeByWebId(webId);
169     }
170 
171     public static void removeByVirtualHost(java.lang.String virtualHost)
172         throws com.liferay.portal.NoSuchCompanyException,
173             com.liferay.portal.SystemException {
174         getPersistence().removeByVirtualHost(virtualHost);
175     }
176 
177     public static void removeByMx(java.lang.String mx)
178         throws com.liferay.portal.NoSuchCompanyException,
179             com.liferay.portal.SystemException {
180         getPersistence().removeByMx(mx);
181     }
182 
183     public static void removeByLogoId(long logoId)
184         throws com.liferay.portal.NoSuchCompanyException,
185             com.liferay.portal.SystemException {
186         getPersistence().removeByLogoId(logoId);
187     }
188 
189     public static void removeAll() throws com.liferay.portal.SystemException {
190         getPersistence().removeAll();
191     }
192 
193     public static int countByWebId(java.lang.String webId)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().countByWebId(webId);
196     }
197 
198     public static int countByVirtualHost(java.lang.String virtualHost)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().countByVirtualHost(virtualHost);
201     }
202 
203     public static int countByMx(java.lang.String mx)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().countByMx(mx);
206     }
207 
208     public static int countByLogoId(long logoId)
209         throws com.liferay.portal.SystemException {
210         return getPersistence().countByLogoId(logoId);
211     }
212 
213     public static int countAll() throws com.liferay.portal.SystemException {
214         return getPersistence().countAll();
215     }
216 
217     public static CompanyPersistence getPersistence() {
218         return _persistence;
219     }
220 
221     public void setPersistence(CompanyPersistence persistence) {
222         _persistence = persistence;
223     }
224 
225     private static CompanyPersistence _persistence;
226 }