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.document.library.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 DLSyncEvent. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLSyncEventLocalServiceImpl} 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 DLSyncEventLocalService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLSyncEventLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLSyncEventLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLSyncEventLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLSyncEventLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the d l sync event to the database. Also notifies the appropriate model listeners.
046            *
047            * @param dlSyncEvent the d l sync event
048            * @return the d l sync event that was added
049            */
050            public static com.liferay.document.library.kernel.model.DLSyncEvent addDLSyncEvent(
051                    com.liferay.document.library.kernel.model.DLSyncEvent dlSyncEvent) {
052                    return getService().addDLSyncEvent(dlSyncEvent);
053            }
054    
055            public static com.liferay.document.library.kernel.model.DLSyncEvent addDLSyncEvent(
056                    java.lang.String event, java.lang.String type, long typePK) {
057                    return getService().addDLSyncEvent(event, type, typePK);
058            }
059    
060            /**
061            * Creates a new d l sync event with the primary key. Does not add the d l sync event to the database.
062            *
063            * @param syncEventId the primary key for the new d l sync event
064            * @return the new d l sync event
065            */
066            public static com.liferay.document.library.kernel.model.DLSyncEvent createDLSyncEvent(
067                    long syncEventId) {
068                    return getService().createDLSyncEvent(syncEventId);
069            }
070    
071            /**
072            * Deletes the d l sync event from the database. Also notifies the appropriate model listeners.
073            *
074            * @param dlSyncEvent the d l sync event
075            * @return the d l sync event that was removed
076            */
077            public static com.liferay.document.library.kernel.model.DLSyncEvent deleteDLSyncEvent(
078                    com.liferay.document.library.kernel.model.DLSyncEvent dlSyncEvent) {
079                    return getService().deleteDLSyncEvent(dlSyncEvent);
080            }
081    
082            /**
083            * Deletes the d l sync event with the primary key from the database. Also notifies the appropriate model listeners.
084            *
085            * @param syncEventId the primary key of the d l sync event
086            * @return the d l sync event that was removed
087            * @throws PortalException if a d l sync event with the primary key could not be found
088            */
089            public static com.liferay.document.library.kernel.model.DLSyncEvent deleteDLSyncEvent(
090                    long syncEventId)
091                    throws com.liferay.portal.kernel.exception.PortalException {
092                    return getService().deleteDLSyncEvent(syncEventId);
093            }
094    
095            public static com.liferay.document.library.kernel.model.DLSyncEvent fetchDLSyncEvent(
096                    long syncEventId) {
097                    return getService().fetchDLSyncEvent(syncEventId);
098            }
099    
100            /**
101            * Returns the d l sync event with the primary key.
102            *
103            * @param syncEventId the primary key of the d l sync event
104            * @return the d l sync event
105            * @throws PortalException if a d l sync event with the primary key could not be found
106            */
107            public static com.liferay.document.library.kernel.model.DLSyncEvent getDLSyncEvent(
108                    long syncEventId)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().getDLSyncEvent(syncEventId);
111            }
112    
113            /**
114            * Updates the d l sync event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
115            *
116            * @param dlSyncEvent the d l sync event
117            * @return the d l sync event that was updated
118            */
119            public static com.liferay.document.library.kernel.model.DLSyncEvent updateDLSyncEvent(
120                    com.liferay.document.library.kernel.model.DLSyncEvent dlSyncEvent) {
121                    return getService().updateDLSyncEvent(dlSyncEvent);
122            }
123    
124            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
125                    return getService().getActionableDynamicQuery();
126            }
127    
128            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
129                    return getService().dynamicQuery();
130            }
131    
132            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
133                    return getService().getIndexableActionableDynamicQuery();
134            }
135    
136            /**
137            * @throws PortalException
138            */
139            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
140                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
141                    throws com.liferay.portal.kernel.exception.PortalException {
142                    return getService().deletePersistedModel(persistedModel);
143            }
144    
145            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
146                    java.io.Serializable primaryKeyObj)
147                    throws com.liferay.portal.kernel.exception.PortalException {
148                    return getService().getPersistedModel(primaryKeyObj);
149            }
150    
151            /**
152            * Returns the number of d l sync events.
153            *
154            * @return the number of d l sync events
155            */
156            public static int getDLSyncEventsCount() {
157                    return getService().getDLSyncEventsCount();
158            }
159    
160            /**
161            * Returns the OSGi service identifier.
162            *
163            * @return the OSGi service identifier
164            */
165            public static java.lang.String getOSGiServiceIdentifier() {
166                    return getService().getOSGiServiceIdentifier();
167            }
168    
169            /**
170            * Performs a dynamic query on the database and returns the matching rows.
171            *
172            * @param dynamicQuery the dynamic query
173            * @return the matching rows
174            */
175            public static <T> java.util.List<T> dynamicQuery(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
177                    return getService().dynamicQuery(dynamicQuery);
178            }
179    
180            /**
181            * Performs a dynamic query on the database and returns a range of the matching rows.
182            *
183            * <p>
184            * 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.portlet.documentlibrary.model.impl.DLSyncEventModelImpl}. 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.
185            * </p>
186            *
187            * @param dynamicQuery the dynamic query
188            * @param start the lower bound of the range of model instances
189            * @param end the upper bound of the range of model instances (not inclusive)
190            * @return the range of matching rows
191            */
192            public static <T> java.util.List<T> dynamicQuery(
193                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
194                    int end) {
195                    return getService().dynamicQuery(dynamicQuery, start, end);
196            }
197    
198            /**
199            * Performs a dynamic query on the database and returns an ordered 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.portlet.documentlibrary.model.impl.DLSyncEventModelImpl}. 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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
209            * @return the ordered range of matching rows
210            */
211            public static <T> java.util.List<T> dynamicQuery(
212                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
213                    int end,
214                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
215                    return getService()
216                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
217            }
218    
219            /**
220            * Returns a range of all the d l sync events.
221            *
222            * <p>
223            * 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.portlet.documentlibrary.model.impl.DLSyncEventModelImpl}. 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.
224            * </p>
225            *
226            * @param start the lower bound of the range of d l sync events
227            * @param end the upper bound of the range of d l sync events (not inclusive)
228            * @return the range of d l sync events
229            */
230            public static java.util.List<com.liferay.document.library.kernel.model.DLSyncEvent> getDLSyncEvents(
231                    int start, int end) {
232                    return getService().getDLSyncEvents(start, end);
233            }
234    
235            public static java.util.List<com.liferay.document.library.kernel.model.DLSyncEvent> getDLSyncEvents(
236                    long modifiedTime) {
237                    return getService().getDLSyncEvents(modifiedTime);
238            }
239    
240            public static java.util.List<com.liferay.document.library.kernel.model.DLSyncEvent> getLatestDLSyncEvents() {
241                    return getService().getLatestDLSyncEvents();
242            }
243    
244            /**
245            * Returns the number of rows matching the dynamic query.
246            *
247            * @param dynamicQuery the dynamic query
248            * @return the number of rows matching the dynamic query
249            */
250            public static long dynamicQueryCount(
251                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
252                    return getService().dynamicQueryCount(dynamicQuery);
253            }
254    
255            /**
256            * Returns the number of rows matching the dynamic query.
257            *
258            * @param dynamicQuery the dynamic query
259            * @param projection the projection to apply to the query
260            * @return the number of rows matching the dynamic query
261            */
262            public static long dynamicQueryCount(
263                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
264                    com.liferay.portal.kernel.dao.orm.Projection projection) {
265                    return getService().dynamicQueryCount(dynamicQuery, projection);
266            }
267    
268            public static void deleteDLSyncEvents() {
269                    getService().deleteDLSyncEvents();
270            }
271    
272            public static DLSyncEventLocalService getService() {
273                    if (_service == null) {
274                            _service = (DLSyncEventLocalService)PortalBeanLocatorUtil.locate(DLSyncEventLocalService.class.getName());
275    
276                            ReferenceRegistry.registerReference(DLSyncEventLocalServiceUtil.class,
277                                    "_service");
278                    }
279    
280                    return _service;
281            }
282    
283            private static DLSyncEventLocalService _service;
284    }