1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  /**
26   * <a href="OrgLaborUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class OrgLaborUtil {
32      public static com.liferay.portal.model.OrgLabor create(long orgLaborId) {
33          return getPersistence().create(orgLaborId);
34      }
35  
36      public static com.liferay.portal.model.OrgLabor remove(long orgLaborId)
37          throws com.liferay.portal.NoSuchOrgLaborException,
38              com.liferay.portal.SystemException {
39          return getPersistence().remove(orgLaborId);
40      }
41  
42      public static com.liferay.portal.model.OrgLabor remove(
43          com.liferay.portal.model.OrgLabor orgLabor)
44          throws com.liferay.portal.SystemException {
45          return getPersistence().remove(orgLabor);
46      }
47  
48      /**
49       * @deprecated Use <code>update(OrgLabor orgLabor, boolean merge)</code>.
50       */
51      public static com.liferay.portal.model.OrgLabor update(
52          com.liferay.portal.model.OrgLabor orgLabor)
53          throws com.liferay.portal.SystemException {
54          return getPersistence().update(orgLabor);
55      }
56  
57      /**
58       * Add, update, or merge, the entity. This method also calls the model
59       * listeners to trigger the proper events associated with adding, deleting,
60       * or updating an entity.
61       *
62       * @param        orgLabor the entity to add, update, or merge
63       * @param        merge boolean value for whether to merge the entity. The
64       *                default value is false. Setting merge to true is more
65       *                expensive and should only be true when orgLabor is
66       *                transient. See LEP-5473 for a detailed discussion of this
67       *                method.
68       * @return        true if the portlet can be displayed via Ajax
69       */
70      public static com.liferay.portal.model.OrgLabor update(
71          com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
72          throws com.liferay.portal.SystemException {
73          return getPersistence().update(orgLabor, merge);
74      }
75  
76      public static com.liferay.portal.model.OrgLabor updateImpl(
77          com.liferay.portal.model.OrgLabor orgLabor, boolean merge)
78          throws com.liferay.portal.SystemException {
79          return getPersistence().updateImpl(orgLabor, merge);
80      }
81  
82      public static com.liferay.portal.model.OrgLabor findByPrimaryKey(
83          long orgLaborId)
84          throws com.liferay.portal.NoSuchOrgLaborException,
85              com.liferay.portal.SystemException {
86          return getPersistence().findByPrimaryKey(orgLaborId);
87      }
88  
89      public static com.liferay.portal.model.OrgLabor fetchByPrimaryKey(
90          long orgLaborId) throws com.liferay.portal.SystemException {
91          return getPersistence().fetchByPrimaryKey(orgLaborId);
92      }
93  
94      public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
95          long organizationId) throws com.liferay.portal.SystemException {
96          return getPersistence().findByOrganizationId(organizationId);
97      }
98  
99      public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
100         long organizationId, int start, int end)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().findByOrganizationId(organizationId, start, end);
103     }
104 
105     public static java.util.List<com.liferay.portal.model.OrgLabor> findByOrganizationId(
106         long organizationId, int start, int end,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException {
109         return getPersistence()
110                    .findByOrganizationId(organizationId, start, end, obc);
111     }
112 
113     public static com.liferay.portal.model.OrgLabor findByOrganizationId_First(
114         long organizationId,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchOrgLaborException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByOrganizationId_First(organizationId, obc);
119     }
120 
121     public static com.liferay.portal.model.OrgLabor findByOrganizationId_Last(
122         long organizationId,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.NoSuchOrgLaborException,
125             com.liferay.portal.SystemException {
126         return getPersistence().findByOrganizationId_Last(organizationId, obc);
127     }
128 
129     public static com.liferay.portal.model.OrgLabor[] findByOrganizationId_PrevAndNext(
130         long orgLaborId, long organizationId,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.NoSuchOrgLaborException,
133             com.liferay.portal.SystemException {
134         return getPersistence()
135                    .findByOrganizationId_PrevAndNext(orgLaborId,
136             organizationId, obc);
137     }
138 
139     public static java.util.List<Object> findWithDynamicQuery(
140         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findWithDynamicQuery(dynamicQuery);
143     }
144 
145     public static java.util.List<Object> findWithDynamicQuery(
146         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147         int end) throws com.liferay.portal.SystemException {
148         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
149     }
150 
151     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll()
152         throws com.liferay.portal.SystemException {
153         return getPersistence().findAll();
154     }
155 
156     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
157         int start, int end) throws com.liferay.portal.SystemException {
158         return getPersistence().findAll(start, end);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.OrgLabor> findAll(
162         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException {
164         return getPersistence().findAll(start, end, obc);
165     }
166 
167     public static void removeByOrganizationId(long organizationId)
168         throws com.liferay.portal.SystemException {
169         getPersistence().removeByOrganizationId(organizationId);
170     }
171 
172     public static void removeAll() throws com.liferay.portal.SystemException {
173         getPersistence().removeAll();
174     }
175 
176     public static int countByOrganizationId(long organizationId)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().countByOrganizationId(organizationId);
179     }
180 
181     public static int countAll() throws com.liferay.portal.SystemException {
182         return getPersistence().countAll();
183     }
184 
185     public static OrgLaborPersistence getPersistence() {
186         return _persistence;
187     }
188 
189     public void setPersistence(OrgLaborPersistence persistence) {
190         _persistence = persistence;
191     }
192 
193     private static OrgLaborPersistence _persistence;
194 }