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;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="OrgLaborServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link OrgLaborService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       OrgLaborService
39   * @generated
40   */
41  public class OrgLaborServiceUtil {
42      public static com.liferay.portal.model.OrgLabor addOrgLabor(
43          long organizationId, int typeId, int sunOpen, int sunClose,
44          int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen,
45          int wedClose, int thuOpen, int thuClose, int friOpen, int friClose,
46          int satOpen, int satClose)
47          throws com.liferay.portal.PortalException,
48              com.liferay.portal.SystemException {
49          return getService()
50                     .addOrgLabor(organizationId, typeId, sunOpen, sunClose,
51              monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
52              thuClose, friOpen, friClose, satOpen, satClose);
53      }
54  
55      public static void deleteOrgLabor(long orgLaborId)
56          throws com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException {
58          getService().deleteOrgLabor(orgLaborId);
59      }
60  
61      public static com.liferay.portal.model.OrgLabor getOrgLabor(long orgLaborId)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException {
64          return getService().getOrgLabor(orgLaborId);
65      }
66  
67      public static java.util.List<com.liferay.portal.model.OrgLabor> getOrgLabors(
68          long organizationId)
69          throws com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException {
71          return getService().getOrgLabors(organizationId);
72      }
73  
74      public static com.liferay.portal.model.OrgLabor updateOrgLabor(
75          long orgLaborId, int typeId, int sunOpen, int sunClose, int monOpen,
76          int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose,
77          int thuOpen, int thuClose, int friOpen, int friClose, int satOpen,
78          int satClose)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService()
82                     .updateOrgLabor(orgLaborId, typeId, sunOpen, sunClose,
83              monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
84              thuClose, friOpen, friClose, satOpen, satClose);
85      }
86  
87      public static OrgLaborService getService() {
88          if (_service == null) {
89              _service = (OrgLaborService)PortalBeanLocatorUtil.locate(OrgLaborService.class.getName());
90  
91              ReferenceRegistry.registerReference(OrgLaborServiceUtil.class,
92                  "_service");
93              MethodCache.remove(OrgLaborService.class);
94          }
95  
96          return _service;
97      }
98  
99      public void setService(OrgLaborService service) {
100         MethodCache.remove(OrgLaborService.class);
101 
102         _service = service;
103 
104         ReferenceRegistry.registerReference(OrgLaborServiceUtil.class,
105             "_service");
106         MethodCache.remove(OrgLaborService.class);
107     }
108 
109     private static OrgLaborService _service;
110 }