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