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.kernel.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            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
044                    return getService().getActionableDynamicQuery();
045            }
046    
047            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
048                    return getService().dynamicQuery();
049            }
050    
051            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
052                    return getService().getIndexableActionableDynamicQuery();
053            }
054    
055            /**
056            * Adds the org labor to the database. Also notifies the appropriate model listeners.
057            *
058            * @param orgLabor the org labor
059            * @return the org labor that was added
060            */
061            public static com.liferay.portal.kernel.model.OrgLabor addOrgLabor(
062                    com.liferay.portal.kernel.model.OrgLabor orgLabor) {
063                    return getService().addOrgLabor(orgLabor);
064            }
065    
066            public static com.liferay.portal.kernel.model.OrgLabor addOrgLabor(
067                    long organizationId, long typeId, int sunOpen, int sunClose,
068                    int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen,
069                    int wedClose, int thuOpen, int thuClose, int friOpen, int friClose,
070                    int satOpen, int satClose)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    return getService()
073                                       .addOrgLabor(organizationId, typeId, sunOpen, sunClose,
074                            monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
075                            thuClose, friOpen, friClose, satOpen, satClose);
076            }
077    
078            /**
079            * Creates a new org labor with the primary key. Does not add the org labor to the database.
080            *
081            * @param orgLaborId the primary key for the new org labor
082            * @return the new org labor
083            */
084            public static com.liferay.portal.kernel.model.OrgLabor createOrgLabor(
085                    long orgLaborId) {
086                    return getService().createOrgLabor(orgLaborId);
087            }
088    
089            /**
090            * Deletes the org labor from the database. Also notifies the appropriate model listeners.
091            *
092            * @param orgLabor the org labor
093            * @return the org labor that was removed
094            */
095            public static com.liferay.portal.kernel.model.OrgLabor deleteOrgLabor(
096                    com.liferay.portal.kernel.model.OrgLabor orgLabor) {
097                    return getService().deleteOrgLabor(orgLabor);
098            }
099    
100            /**
101            * Deletes the org labor with the primary key from the database. Also notifies the appropriate model listeners.
102            *
103            * @param orgLaborId the primary key of the org labor
104            * @return the org labor that was removed
105            * @throws PortalException if a org labor with the primary key could not be found
106            */
107            public static com.liferay.portal.kernel.model.OrgLabor deleteOrgLabor(
108                    long orgLaborId)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().deleteOrgLabor(orgLaborId);
111            }
112    
113            public static com.liferay.portal.kernel.model.OrgLabor fetchOrgLabor(
114                    long orgLaborId) {
115                    return getService().fetchOrgLabor(orgLaborId);
116            }
117    
118            /**
119            * Returns the org labor with the primary key.
120            *
121            * @param orgLaborId the primary key of the org labor
122            * @return the org labor
123            * @throws PortalException if a org labor with the primary key could not be found
124            */
125            public static com.liferay.portal.kernel.model.OrgLabor getOrgLabor(
126                    long orgLaborId)
127                    throws com.liferay.portal.kernel.exception.PortalException {
128                    return getService().getOrgLabor(orgLaborId);
129            }
130    
131            /**
132            * Updates the org labor in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
133            *
134            * @param orgLabor the org labor
135            * @return the org labor that was updated
136            */
137            public static com.liferay.portal.kernel.model.OrgLabor updateOrgLabor(
138                    com.liferay.portal.kernel.model.OrgLabor orgLabor) {
139                    return getService().updateOrgLabor(orgLabor);
140            }
141    
142            public static com.liferay.portal.kernel.model.OrgLabor updateOrgLabor(
143                    long orgLaborId, long typeId, int sunOpen, int sunClose, int monOpen,
144                    int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose,
145                    int thuOpen, int thuClose, int friOpen, int friClose, int satOpen,
146                    int satClose)
147                    throws com.liferay.portal.kernel.exception.PortalException {
148                    return getService()
149                                       .updateOrgLabor(orgLaborId, typeId, sunOpen, sunClose,
150                            monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen,
151                            thuClose, friOpen, friClose, satOpen, satClose);
152            }
153    
154            /**
155            * @throws PortalException
156            */
157            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
158                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
159                    throws com.liferay.portal.kernel.exception.PortalException {
160                    return getService().deletePersistedModel(persistedModel);
161            }
162    
163            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
164                    java.io.Serializable primaryKeyObj)
165                    throws com.liferay.portal.kernel.exception.PortalException {
166                    return getService().getPersistedModel(primaryKeyObj);
167            }
168    
169            /**
170            * Returns the number of org labors.
171            *
172            * @return the number of org labors
173            */
174            public static int getOrgLaborsCount() {
175                    return getService().getOrgLaborsCount();
176            }
177    
178            /**
179            * Returns the OSGi service identifier.
180            *
181            * @return the OSGi service identifier
182            */
183            public static java.lang.String getOSGiServiceIdentifier() {
184                    return getService().getOSGiServiceIdentifier();
185            }
186    
187            /**
188            * Performs a dynamic query on the database and returns the matching rows.
189            *
190            * @param dynamicQuery the dynamic query
191            * @return the matching rows
192            */
193            public static <T> java.util.List<T> dynamicQuery(
194                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
195                    return getService().dynamicQuery(dynamicQuery);
196            }
197    
198            /**
199            * Performs a dynamic query on the database and returns a range of the matching rows.
200            *
201            * <p>
202            * 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.
203            * </p>
204            *
205            * @param dynamicQuery the dynamic query
206            * @param start the lower bound of the range of model instances
207            * @param end the upper bound of the range of model instances (not inclusive)
208            * @return the range of matching rows
209            */
210            public static <T> java.util.List<T> dynamicQuery(
211                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
212                    int end) {
213                    return getService().dynamicQuery(dynamicQuery, start, end);
214            }
215    
216            /**
217            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
218            *
219            * <p>
220            * 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.
221            * </p>
222            *
223            * @param dynamicQuery the dynamic query
224            * @param start the lower bound of the range of model instances
225            * @param end the upper bound of the range of model instances (not inclusive)
226            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
227            * @return the ordered range of matching rows
228            */
229            public static <T> java.util.List<T> dynamicQuery(
230                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
231                    int end,
232                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
233                    return getService()
234                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
235            }
236    
237            /**
238            * Returns a range of all the org labors.
239            *
240            * <p>
241            * 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.
242            * </p>
243            *
244            * @param start the lower bound of the range of org labors
245            * @param end the upper bound of the range of org labors (not inclusive)
246            * @return the range of org labors
247            */
248            public static java.util.List<com.liferay.portal.kernel.model.OrgLabor> getOrgLabors(
249                    int start, int end) {
250                    return getService().getOrgLabors(start, end);
251            }
252    
253            public static java.util.List<com.liferay.portal.kernel.model.OrgLabor> getOrgLabors(
254                    long organizationId) {
255                    return getService().getOrgLabors(organizationId);
256            }
257    
258            /**
259            * Returns the number of rows matching the dynamic query.
260            *
261            * @param dynamicQuery the dynamic query
262            * @return the number of rows matching the dynamic query
263            */
264            public static long dynamicQueryCount(
265                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
266                    return getService().dynamicQueryCount(dynamicQuery);
267            }
268    
269            /**
270            * Returns the number of rows matching the dynamic query.
271            *
272            * @param dynamicQuery the dynamic query
273            * @param projection the projection to apply to the query
274            * @return the number of rows matching the dynamic query
275            */
276            public static long dynamicQueryCount(
277                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
278                    com.liferay.portal.kernel.dao.orm.Projection projection) {
279                    return getService().dynamicQueryCount(dynamicQuery, projection);
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    }