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 com.liferay.portal.model.OrgLabor create(long orgLaborId) {
30          return getPersistence().create(orgLaborId);
31      }
32  
33      public static com.liferay.portal.model.OrgLabor remove(long orgLaborId)
34          throws com.liferay.portal.NoSuchOrgLaborException,
35              com.liferay.portal.SystemException {
36          return getPersistence().remove(orgLaborId);
37      }
38  
39      public static com.liferay.portal.model.OrgLabor remove(
40          com.liferay.portal.model.OrgLabor orgLabor)
41          throws com.liferay.portal.SystemException {
42          return getPersistence().remove(orgLabor);
43      }
44  
45      /**
46       * @deprecated Use <code>update(OrgLabor orgLabor, boolean merge)</code>.
47       */
48      public static com.liferay.portal.model.OrgLabor update(
49          com.liferay.portal.model.OrgLabor orgLabor)
50          throws com.liferay.portal.SystemException {
51          return getPersistence().update(orgLabor);
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        orgLabor 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 orgLabor 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.OrgLabor update(
68          com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(orgLabor, merge);
71      }
72  
73      public static com.liferay.portal.model.OrgLabor updateImpl(
74          com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
75          throws com.liferay.portal.SystemException {
76          return getPersistence().updateImpl(orgLabor, merge);
77      }
78  
79      public static com.liferay.portal.model.OrgLabor findByPrimaryKey(
80          long orgLaborId)
81          throws com.liferay.portal.NoSuchOrgLaborException,
82              com.liferay.portal.SystemException {
83          return getPersistence().findByPrimaryKey(orgLaborId);
84      }
85  
86      public static com.liferay.portal.model.OrgLabor fetchByPrimaryKey(
87          long orgLaborId) throws com.liferay.portal.SystemException {
88          return getPersistence().fetchByPrimaryKey(orgLaborId);
89      }
90  
91      public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
92          long organizationId) throws com.liferay.portal.SystemException {
93          return getPersistence().findByOrganizationId(organizationId);
94      }
95  
96      public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
97          long organizationId, int start, int end)
98          throws com.liferay.portal.SystemException {
99          return getPersistence().findByOrganizationId(organizationId, start, end);
100     }
101 
102     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
103         long organizationId, int start, int end,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException {
106         return getPersistence()
107                    .findByOrganizationId(organizationId, start, end, obc);
108     }
109 
110     public static com.liferay.portal.model.OrgLabor findByOrganizationId_First(
111         long organizationId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.NoSuchOrgLaborException,
114             com.liferay.portal.SystemException {
115         return getPersistence().findByOrganizationId_First(organizationId, obc);
116     }
117 
118     public static com.liferay.portal.model.OrgLabor findByOrganizationId_Last(
119         long organizationId,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.NoSuchOrgLaborException,
122             com.liferay.portal.SystemException {
123         return getPersistence().findByOrganizationId_Last(organizationId, obc);
124     }
125 
126     public static com.liferay.portal.model.OrgLabor[] findByOrganizationId_PrevAndNext(
127         long orgLaborId, long organizationId,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.NoSuchOrgLaborException,
130             com.liferay.portal.SystemException {
131         return getPersistence()
132                    .findByOrganizationId_PrevAndNext(orgLaborId,
133             organizationId, obc);
134     }
135 
136     public static java.util.List<Object> findWithDynamicQuery(
137         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
138         throws com.liferay.portal.SystemException {
139         return getPersistence().findWithDynamicQuery(dynamicQuery);
140     }
141 
142     public static java.util.List<Object> findWithDynamicQuery(
143         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144         int end) throws com.liferay.portal.SystemException {
145         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll()
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findAll();
151     }
152 
153     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
154         int start, int end) throws com.liferay.portal.SystemException {
155         return getPersistence().findAll(start, end);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
159         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findAll(start, end, obc);
162     }
163 
164     public static void removeByOrganizationId(long organizationId)
165         throws com.liferay.portal.SystemException {
166         getPersistence().removeByOrganizationId(organizationId);
167     }
168 
169     public static void removeAll() throws com.liferay.portal.SystemException {
170         getPersistence().removeAll();
171     }
172 
173     public static int countByOrganizationId(long organizationId)
174         throws com.liferay.portal.SystemException {
175         return getPersistence().countByOrganizationId(organizationId);
176     }
177 
178     public static int countAll() throws com.liferay.portal.SystemException {
179         return getPersistence().countAll();
180     }
181 
182     public static OrgLaborPersistence getPersistence() {
183         return _persistence;
184     }
185 
186     public void setPersistence(OrgLaborPersistence persistence) {
187         _persistence = persistence;
188     }
189 
190     private static OrgLaborPersistence _persistence;
191 }