001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for OrgLabor. This utility wraps
024     * {@link com.liferay.portal.service.impl.OrgLaborLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see OrgLaborLocalService
032     * @see com.liferay.portal.service.base.OrgLaborLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.OrgLaborLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class OrgLaborLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.OrgLaborLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the org labor to the database. Also notifies the appropriate model listeners.
046            *
047            * @param orgLabor the org labor
048            * @return the org labor that was added
049            */
050            public static com.liferay.portal.model.OrgLabor addOrgLabor(
051                    com.liferay.portal.model.OrgLabor orgLabor) {
052                    return getService().addOrgLabor(orgLabor);
053            }
054    
055            public static com.liferay.portal.model.OrgLabor addOrgLabor(
056                    long organizationId, long typeId, int sunOpen, int sunClose,
057                    int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen,
058                    int wedClose, int thuOpen, int thuClose, int friOpen, int friClose,
059                    int satOpen, int satClose)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService()
062                                       .addOrgLabor(organizationId, typeId, sunOpen, sunClose,
063                            monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
064                            thuClose, friOpen, friClose, satOpen, satClose);
065            }
066    
067            /**
068            * Creates a new org labor with the primary key. Does not add the org labor to the database.
069            *
070            * @param orgLaborId the primary key for the new org labor
071            * @return the new org labor
072            */
073            public static com.liferay.portal.model.OrgLabor createOrgLabor(
074                    long orgLaborId) {
075                    return getService().createOrgLabor(orgLaborId);
076            }
077    
078            /**
079            * Deletes the org labor from the database. Also notifies the appropriate model listeners.
080            *
081            * @param orgLabor the org labor
082            * @return the org labor that was removed
083            */
084            public static com.liferay.portal.model.OrgLabor deleteOrgLabor(
085                    com.liferay.portal.model.OrgLabor orgLabor) {
086                    return getService().deleteOrgLabor(orgLabor);
087            }
088    
089            /**
090            * Deletes the org labor with the primary key from the database. Also notifies the appropriate model listeners.
091            *
092            * @param orgLaborId the primary key of the org labor
093            * @return the org labor that was removed
094            * @throws PortalException if a org labor with the primary key could not be found
095            */
096            public static com.liferay.portal.model.OrgLabor deleteOrgLabor(
097                    long orgLaborId)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().deleteOrgLabor(orgLaborId);
100            }
101    
102            /**
103            * @throws PortalException
104            */
105            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
106                    com.liferay.portal.model.PersistedModel persistedModel)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    return getService().deletePersistedModel(persistedModel);
109            }
110    
111            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
112                    return getService().dynamicQuery();
113            }
114    
115            /**
116            * Performs a dynamic query on the database and returns the matching rows.
117            *
118            * @param dynamicQuery the dynamic query
119            * @return the matching rows
120            */
121            public static <T> java.util.List<T> dynamicQuery(
122                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
123                    return getService().dynamicQuery(dynamicQuery);
124            }
125    
126            /**
127            * Performs a dynamic query on the database and returns a range of the matching rows.
128            *
129            * <p>
130            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrgLaborModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
131            * </p>
132            *
133            * @param dynamicQuery the dynamic query
134            * @param start the lower bound of the range of model instances
135            * @param end the upper bound of the range of model instances (not inclusive)
136            * @return the range of matching rows
137            */
138            public static <T> java.util.List<T> dynamicQuery(
139                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
140                    int end) {
141                    return getService().dynamicQuery(dynamicQuery, start, end);
142            }
143    
144            /**
145            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
146            *
147            * <p>
148            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrgLaborModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
149            * </p>
150            *
151            * @param dynamicQuery the dynamic query
152            * @param start the lower bound of the range of model instances
153            * @param end the upper bound of the range of model instances (not inclusive)
154            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
155            * @return the ordered range of matching rows
156            */
157            public static <T> java.util.List<T> dynamicQuery(
158                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
159                    int end,
160                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
161                    return getService()
162                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
163            }
164    
165            /**
166            * Returns the number of rows matching the dynamic query.
167            *
168            * @param dynamicQuery the dynamic query
169            * @return the number of rows matching the dynamic query
170            */
171            public static long dynamicQueryCount(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
173                    return getService().dynamicQueryCount(dynamicQuery);
174            }
175    
176            /**
177            * Returns the number of rows matching the dynamic query.
178            *
179            * @param dynamicQuery the dynamic query
180            * @param projection the projection to apply to the query
181            * @return the number of rows matching the dynamic query
182            */
183            public static long dynamicQueryCount(
184                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
185                    com.liferay.portal.kernel.dao.orm.Projection projection) {
186                    return getService().dynamicQueryCount(dynamicQuery, projection);
187            }
188    
189            public static com.liferay.portal.model.OrgLabor fetchOrgLabor(
190                    long orgLaborId) {
191                    return getService().fetchOrgLabor(orgLaborId);
192            }
193    
194            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
195                    return getService().getActionableDynamicQuery();
196            }
197    
198            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
199                    return getService().getIndexableActionableDynamicQuery();
200            }
201    
202            /**
203            * Returns the OSGi service identifier.
204            *
205            * @return the OSGi service identifier
206            */
207            public static java.lang.String getOSGiServiceIdentifier() {
208                    return getService().getOSGiServiceIdentifier();
209            }
210    
211            /**
212            * Returns the org labor with the primary key.
213            *
214            * @param orgLaborId the primary key of the org labor
215            * @return the org labor
216            * @throws PortalException if a org labor with the primary key could not be found
217            */
218            public static com.liferay.portal.model.OrgLabor getOrgLabor(long orgLaborId)
219                    throws com.liferay.portal.kernel.exception.PortalException {
220                    return getService().getOrgLabor(orgLaborId);
221            }
222    
223            public static java.util.List<com.liferay.portal.model.OrgLabor> getOrgLabors(
224                    long organizationId) {
225                    return getService().getOrgLabors(organizationId);
226            }
227    
228            /**
229            * Returns a range of all the org labors.
230            *
231            * <p>
232            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.OrgLaborModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
233            * </p>
234            *
235            * @param start the lower bound of the range of org labors
236            * @param end the upper bound of the range of org labors (not inclusive)
237            * @return the range of org labors
238            */
239            public static java.util.List<com.liferay.portal.model.OrgLabor> getOrgLabors(
240                    int start, int end) {
241                    return getService().getOrgLabors(start, end);
242            }
243    
244            /**
245            * Returns the number of org labors.
246            *
247            * @return the number of org labors
248            */
249            public static int getOrgLaborsCount() {
250                    return getService().getOrgLaborsCount();
251            }
252    
253            public static com.liferay.portal.model.PersistedModel getPersistedModel(
254                    java.io.Serializable primaryKeyObj)
255                    throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().getPersistedModel(primaryKeyObj);
257            }
258    
259            /**
260            * Updates the org labor in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
261            *
262            * @param orgLabor the org labor
263            * @return the org labor that was updated
264            */
265            public static com.liferay.portal.model.OrgLabor updateOrgLabor(
266                    com.liferay.portal.model.OrgLabor orgLabor) {
267                    return getService().updateOrgLabor(orgLabor);
268            }
269    
270            public static com.liferay.portal.model.OrgLabor updateOrgLabor(
271                    long orgLaborId, long typeId, int sunOpen, int sunClose, int monOpen,
272                    int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose,
273                    int thuOpen, int thuClose, int friOpen, int friClose, int satOpen,
274                    int satClose)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    return getService()
277                                       .updateOrgLabor(orgLaborId, typeId, sunOpen, sunClose,
278                            monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
279                            thuClose, friOpen, friClose, satOpen, satClose);
280            }
281    
282            public static OrgLaborLocalService getService() {
283                    if (_service == null) {
284                            _service = (OrgLaborLocalService)PortalBeanLocatorUtil.locate(OrgLaborLocalService.class.getName());
285    
286                            ReferenceRegistry.registerReference(OrgLaborLocalServiceUtil.class,
287                                    "_service");
288                    }
289    
290                    return _service;
291            }
292    
293            private static OrgLaborLocalService _service;
294    }