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="OrgLaborUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class OrgLaborUtil {
29      public static void cacheResult(com.liferay.portal.model.OrgLabor orgLabor) {
30          getPersistence().cacheResult(orgLabor);
31      }
32  
33      public static void cacheResult(
34          java.util.List<com.liferay.portal.model.OrgLabor> orgLabors) {
35          getPersistence().cacheResult(orgLabors);
36      }
37  
38      public static void clearCache() {
39          getPersistence().clearCache();
40      }
41  
42      public static com.liferay.portal.model.OrgLabor create(long orgLaborId) {
43          return getPersistence().create(orgLaborId);
44      }
45  
46      public static com.liferay.portal.model.OrgLabor remove(long orgLaborId)
47          throws com.liferay.portal.NoSuchOrgLaborException,
48              com.liferay.portal.SystemException {
49          return getPersistence().remove(orgLaborId);
50      }
51  
52      public static com.liferay.portal.model.OrgLabor remove(
53          com.liferay.portal.model.OrgLabor orgLabor)
54          throws com.liferay.portal.SystemException {
55          return getPersistence().remove(orgLabor);
56      }
57  
58      /**
59       * @deprecated Use <code>update(OrgLabor orgLabor, boolean merge)</code>.
60       */
61      public static com.liferay.portal.model.OrgLabor update(
62          com.liferay.portal.model.OrgLabor orgLabor)
63          throws com.liferay.portal.SystemException {
64          return getPersistence().update(orgLabor);
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        orgLabor 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 orgLabor 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.OrgLabor update(
81          com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
82          throws com.liferay.portal.SystemException {
83          return getPersistence().update(orgLabor, merge);
84      }
85  
86      public static com.liferay.portal.model.OrgLabor updateImpl(
87          com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
88          throws com.liferay.portal.SystemException {
89          return getPersistence().updateImpl(orgLabor, merge);
90      }
91  
92      public static com.liferay.portal.model.OrgLabor findByPrimaryKey(
93          long orgLaborId)
94          throws com.liferay.portal.NoSuchOrgLaborException,
95              com.liferay.portal.SystemException {
96          return getPersistence().findByPrimaryKey(orgLaborId);
97      }
98  
99      public static com.liferay.portal.model.OrgLabor fetchByPrimaryKey(
100         long orgLaborId) throws com.liferay.portal.SystemException {
101         return getPersistence().fetchByPrimaryKey(orgLaborId);
102     }
103 
104     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
105         long organizationId) throws com.liferay.portal.SystemException {
106         return getPersistence().findByOrganizationId(organizationId);
107     }
108 
109     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
110         long organizationId, int start, int end)
111         throws com.liferay.portal.SystemException {
112         return getPersistence().findByOrganizationId(organizationId, start, end);
113     }
114 
115     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
116         long organizationId, int start, int end,
117         com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException {
119         return getPersistence()
120                    .findByOrganizationId(organizationId, start, end, obc);
121     }
122 
123     public static com.liferay.portal.model.OrgLabor findByOrganizationId_First(
124         long organizationId,
125         com.liferay.portal.kernel.util.OrderByComparator obc)
126         throws com.liferay.portal.NoSuchOrgLaborException,
127             com.liferay.portal.SystemException {
128         return getPersistence().findByOrganizationId_First(organizationId, obc);
129     }
130 
131     public static com.liferay.portal.model.OrgLabor findByOrganizationId_Last(
132         long organizationId,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchOrgLaborException,
135             com.liferay.portal.SystemException {
136         return getPersistence().findByOrganizationId_Last(organizationId, obc);
137     }
138 
139     public static com.liferay.portal.model.OrgLabor[] findByOrganizationId_PrevAndNext(
140         long orgLaborId, long organizationId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.NoSuchOrgLaborException,
143             com.liferay.portal.SystemException {
144         return getPersistence()
145                    .findByOrganizationId_PrevAndNext(orgLaborId,
146             organizationId, obc);
147     }
148 
149     public static java.util.List<Object> findWithDynamicQuery(
150         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findWithDynamicQuery(dynamicQuery);
153     }
154 
155     public static java.util.List<Object> findWithDynamicQuery(
156         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
157         int end) throws com.liferay.portal.SystemException {
158         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll()
162         throws com.liferay.portal.SystemException {
163         return getPersistence().findAll();
164     }
165 
166     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
167         int start, int end) throws com.liferay.portal.SystemException {
168         return getPersistence().findAll(start, end);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
172         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findAll(start, end, obc);
175     }
176 
177     public static void removeByOrganizationId(long organizationId)
178         throws com.liferay.portal.SystemException {
179         getPersistence().removeByOrganizationId(organizationId);
180     }
181 
182     public static void removeAll() throws com.liferay.portal.SystemException {
183         getPersistence().removeAll();
184     }
185 
186     public static int countByOrganizationId(long organizationId)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().countByOrganizationId(organizationId);
189     }
190 
191     public static int countAll() throws com.liferay.portal.SystemException {
192         return getPersistence().countAll();
193     }
194 
195     public static OrgLaborPersistence getPersistence() {
196         return _persistence;
197     }
198 
199     public void setPersistence(OrgLaborPersistence persistence) {
200         _persistence = persistence;
201     }
202 
203     private static OrgLaborPersistence _persistence;
204 }