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  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  import com.liferay.portal.model.OrgLabor;
29  
30  import java.util.List;
31  
32  /**
33   * <a href="OrgLaborUtil.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * @author    Brian Wing Shun Chan
41   * @see       OrgLaborPersistence
42   * @see       OrgLaborPersistenceImpl
43   * @generated
44   */
45  public class OrgLaborUtil {
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
48       */
49      public static void clearCache() {
50          getPersistence().clearCache();
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
55       */
56      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().findWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
65          int start, int end) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
71       */
72      public static OrgLabor remove(OrgLabor orgLabor) throws SystemException {
73          return getPersistence().remove(orgLabor);
74      }
75  
76      /**
77       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
78       */
79      public static OrgLabor update(OrgLabor orgLabor, boolean merge)
80          throws SystemException {
81          return getPersistence().update(orgLabor, merge);
82      }
83  
84      public static void cacheResult(com.liferay.portal.model.OrgLabor orgLabor) {
85          getPersistence().cacheResult(orgLabor);
86      }
87  
88      public static void cacheResult(
89          java.util.List<com.liferay.portal.model.OrgLabor> orgLabors) {
90          getPersistence().cacheResult(orgLabors);
91      }
92  
93      public static com.liferay.portal.model.OrgLabor create(long orgLaborId) {
94          return getPersistence().create(orgLaborId);
95      }
96  
97      public static com.liferay.portal.model.OrgLabor remove(long orgLaborId)
98          throws com.liferay.portal.NoSuchOrgLaborException,
99              com.liferay.portal.SystemException {
100         return getPersistence().remove(orgLaborId);
101     }
102 
103     /**
104      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
105      */
106     public static com.liferay.portal.model.OrgLabor update(
107         com.liferay.portal.model.OrgLabor orgLabor)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().update(orgLabor);
110     }
111 
112     public static com.liferay.portal.model.OrgLabor updateImpl(
113         com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().updateImpl(orgLabor, merge);
116     }
117 
118     public static com.liferay.portal.model.OrgLabor findByPrimaryKey(
119         long orgLaborId)
120         throws com.liferay.portal.NoSuchOrgLaborException,
121             com.liferay.portal.SystemException {
122         return getPersistence().findByPrimaryKey(orgLaborId);
123     }
124 
125     public static com.liferay.portal.model.OrgLabor fetchByPrimaryKey(
126         long orgLaborId) throws com.liferay.portal.SystemException {
127         return getPersistence().fetchByPrimaryKey(orgLaborId);
128     }
129 
130     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
131         long organizationId) throws com.liferay.portal.SystemException {
132         return getPersistence().findByOrganizationId(organizationId);
133     }
134 
135     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
136         long organizationId, int start, int end)
137         throws com.liferay.portal.SystemException {
138         return getPersistence().findByOrganizationId(organizationId, start, end);
139     }
140 
141     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
142         long organizationId, int start, int end,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException {
145         return getPersistence()
146                    .findByOrganizationId(organizationId, start, end, obc);
147     }
148 
149     public static com.liferay.portal.model.OrgLabor findByOrganizationId_First(
150         long organizationId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchOrgLaborException,
153             com.liferay.portal.SystemException {
154         return getPersistence().findByOrganizationId_First(organizationId, obc);
155     }
156 
157     public static com.liferay.portal.model.OrgLabor findByOrganizationId_Last(
158         long organizationId,
159         com.liferay.portal.kernel.util.OrderByComparator obc)
160         throws com.liferay.portal.NoSuchOrgLaborException,
161             com.liferay.portal.SystemException {
162         return getPersistence().findByOrganizationId_Last(organizationId, obc);
163     }
164 
165     public static com.liferay.portal.model.OrgLabor[] findByOrganizationId_PrevAndNext(
166         long orgLaborId, long organizationId,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.NoSuchOrgLaborException,
169             com.liferay.portal.SystemException {
170         return getPersistence()
171                    .findByOrganizationId_PrevAndNext(orgLaborId,
172             organizationId, obc);
173     }
174 
175     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll()
176         throws com.liferay.portal.SystemException {
177         return getPersistence().findAll();
178     }
179 
180     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
181         int start, int end) throws com.liferay.portal.SystemException {
182         return getPersistence().findAll(start, end);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
186         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().findAll(start, end, obc);
189     }
190 
191     public static void removeByOrganizationId(long organizationId)
192         throws com.liferay.portal.SystemException {
193         getPersistence().removeByOrganizationId(organizationId);
194     }
195 
196     public static void removeAll() throws com.liferay.portal.SystemException {
197         getPersistence().removeAll();
198     }
199 
200     public static int countByOrganizationId(long organizationId)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().countByOrganizationId(organizationId);
203     }
204 
205     public static int countAll() throws com.liferay.portal.SystemException {
206         return getPersistence().countAll();
207     }
208 
209     public static OrgLaborPersistence getPersistence() {
210         if (_persistence == null) {
211             _persistence = (OrgLaborPersistence)PortalBeanLocatorUtil.locate(OrgLaborPersistence.class.getName());
212         }
213 
214         return _persistence;
215     }
216 
217     public void setPersistence(OrgLaborPersistence persistence) {
218         _persistence = persistence;
219     }
220 
221     private static OrgLaborPersistence _persistence;
222 }