001    /**
002     * Copyright (c) 2000-2012 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.portlet.documentlibrary.service.persistence;
016    
017    import com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.documentlibrary.model.DLSync;
020    
021    /**
022     * The persistence interface for the d l sync service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see DLSyncPersistenceImpl
030     * @see DLSyncUtil
031     * @generated
032     */
033    public interface DLSyncPersistence extends BasePersistence<DLSync> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify or reference this interface directly. Always use {@link DLSyncUtil} to access the d l sync persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
038             */
039    
040            /**
041            * Returns the d l sync where fileId = &#63; or throws a {@link com.liferay.portlet.documentlibrary.NoSuchSyncException} if it could not be found.
042            *
043            * @param fileId the file ID
044            * @return the matching d l sync
045            * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a matching d l sync could not be found
046            * @throws SystemException if a system exception occurred
047            */
048            public com.liferay.portlet.documentlibrary.model.DLSync findByFileId(
049                    long fileId)
050                    throws com.liferay.portal.kernel.exception.SystemException,
051                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
052    
053            /**
054            * Returns the d l sync where fileId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
055            *
056            * @param fileId the file ID
057            * @return the matching d l sync, or <code>null</code> if a matching d l sync could not be found
058            * @throws SystemException if a system exception occurred
059            */
060            public com.liferay.portlet.documentlibrary.model.DLSync fetchByFileId(
061                    long fileId) throws com.liferay.portal.kernel.exception.SystemException;
062    
063            /**
064            * Returns the d l sync where fileId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
065            *
066            * @param fileId the file ID
067            * @param retrieveFromCache whether to use the finder cache
068            * @return the matching d l sync, or <code>null</code> if a matching d l sync could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portlet.documentlibrary.model.DLSync fetchByFileId(
072                    long fileId, boolean retrieveFromCache)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Removes the d l sync where fileId = &#63; from the database.
077            *
078            * @param fileId the file ID
079            * @return the d l sync that was removed
080            * @throws SystemException if a system exception occurred
081            */
082            public com.liferay.portlet.documentlibrary.model.DLSync removeByFileId(
083                    long fileId)
084                    throws com.liferay.portal.kernel.exception.SystemException,
085                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
086    
087            /**
088            * Returns the number of d l syncs where fileId = &#63;.
089            *
090            * @param fileId the file ID
091            * @return the number of matching d l syncs
092            * @throws SystemException if a system exception occurred
093            */
094            public int countByFileId(long fileId)
095                    throws com.liferay.portal.kernel.exception.SystemException;
096    
097            /**
098            * Returns all the d l syncs where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
099            *
100            * @param companyId the company ID
101            * @param modifiedDate the modified date
102            * @param repositoryId the repository ID
103            * @return the matching d l syncs
104            * @throws SystemException if a system exception occurred
105            */
106            public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findByC_M_R(
107                    long companyId, long modifiedDate, long repositoryId)
108                    throws com.liferay.portal.kernel.exception.SystemException;
109    
110            /**
111            * Returns a range of all the d l syncs where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
112            *
113            * <p>
114            * 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.DLSyncModelImpl}. 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.
115            * </p>
116            *
117            * @param companyId the company ID
118            * @param modifiedDate the modified date
119            * @param repositoryId the repository ID
120            * @param start the lower bound of the range of d l syncs
121            * @param end the upper bound of the range of d l syncs (not inclusive)
122            * @return the range of matching d l syncs
123            * @throws SystemException if a system exception occurred
124            */
125            public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findByC_M_R(
126                    long companyId, long modifiedDate, long repositoryId, int start, int end)
127                    throws com.liferay.portal.kernel.exception.SystemException;
128    
129            /**
130            * Returns an ordered range of all the d l syncs where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
131            *
132            * <p>
133            * 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.DLSyncModelImpl}. 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.
134            * </p>
135            *
136            * @param companyId the company ID
137            * @param modifiedDate the modified date
138            * @param repositoryId the repository ID
139            * @param start the lower bound of the range of d l syncs
140            * @param end the upper bound of the range of d l syncs (not inclusive)
141            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
142            * @return the ordered range of matching d l syncs
143            * @throws SystemException if a system exception occurred
144            */
145            public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findByC_M_R(
146                    long companyId, long modifiedDate, long repositoryId, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149                    throws com.liferay.portal.kernel.exception.SystemException;
150    
151            /**
152            * Returns the first d l sync in the ordered set where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
153            *
154            * @param companyId the company ID
155            * @param modifiedDate the modified date
156            * @param repositoryId the repository ID
157            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
158            * @return the first matching d l sync
159            * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a matching d l sync could not be found
160            * @throws SystemException if a system exception occurred
161            */
162            public com.liferay.portlet.documentlibrary.model.DLSync findByC_M_R_First(
163                    long companyId, long modifiedDate, long repositoryId,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException,
166                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
167    
168            /**
169            * Returns the first d l sync in the ordered set where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
170            *
171            * @param companyId the company ID
172            * @param modifiedDate the modified date
173            * @param repositoryId the repository ID
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the first matching d l sync, or <code>null</code> if a matching d l sync could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public com.liferay.portlet.documentlibrary.model.DLSync fetchByC_M_R_First(
179                    long companyId, long modifiedDate, long repositoryId,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.kernel.exception.SystemException;
182    
183            /**
184            * Returns the last d l sync in the ordered set where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
185            *
186            * @param companyId the company ID
187            * @param modifiedDate the modified date
188            * @param repositoryId the repository ID
189            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
190            * @return the last matching d l sync
191            * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a matching d l sync could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public com.liferay.portlet.documentlibrary.model.DLSync findByC_M_R_Last(
195                    long companyId, long modifiedDate, long repositoryId,
196                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197                    throws com.liferay.portal.kernel.exception.SystemException,
198                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
199    
200            /**
201            * Returns the last d l sync in the ordered set where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
202            *
203            * @param companyId the company ID
204            * @param modifiedDate the modified date
205            * @param repositoryId the repository ID
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @return the last matching d l sync, or <code>null</code> if a matching d l sync could not be found
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portlet.documentlibrary.model.DLSync fetchByC_M_R_Last(
211                    long companyId, long modifiedDate, long repositoryId,
212                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Returns the d l syncs before and after the current d l sync in the ordered set where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
217            *
218            * @param syncId the primary key of the current d l sync
219            * @param companyId the company ID
220            * @param modifiedDate the modified date
221            * @param repositoryId the repository ID
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the previous, current, and next d l sync
224            * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a d l sync with the primary key could not be found
225            * @throws SystemException if a system exception occurred
226            */
227            public com.liferay.portlet.documentlibrary.model.DLSync[] findByC_M_R_PrevAndNext(
228                    long syncId, long companyId, long modifiedDate, long repositoryId,
229                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230                    throws com.liferay.portal.kernel.exception.SystemException,
231                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
232    
233            /**
234            * Removes all the d l syncs where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63; from the database.
235            *
236            * @param companyId the company ID
237            * @param modifiedDate the modified date
238            * @param repositoryId the repository ID
239            * @throws SystemException if a system exception occurred
240            */
241            public void removeByC_M_R(long companyId, long modifiedDate,
242                    long repositoryId)
243                    throws com.liferay.portal.kernel.exception.SystemException;
244    
245            /**
246            * Returns the number of d l syncs where companyId = &#63; and modifiedDate &gt; &#63; and repositoryId = &#63;.
247            *
248            * @param companyId the company ID
249            * @param modifiedDate the modified date
250            * @param repositoryId the repository ID
251            * @return the number of matching d l syncs
252            * @throws SystemException if a system exception occurred
253            */
254            public int countByC_M_R(long companyId, long modifiedDate, long repositoryId)
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * Caches the d l sync in the entity cache if it is enabled.
259            *
260            * @param dlSync the d l sync
261            */
262            public void cacheResult(
263                    com.liferay.portlet.documentlibrary.model.DLSync dlSync);
264    
265            /**
266            * Caches the d l syncs in the entity cache if it is enabled.
267            *
268            * @param dlSyncs the d l syncs
269            */
270            public void cacheResult(
271                    java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> dlSyncs);
272    
273            /**
274            * Creates a new d l sync with the primary key. Does not add the d l sync to the database.
275            *
276            * @param syncId the primary key for the new d l sync
277            * @return the new d l sync
278            */
279            public com.liferay.portlet.documentlibrary.model.DLSync create(long syncId);
280    
281            /**
282            * Removes the d l sync with the primary key from the database. Also notifies the appropriate model listeners.
283            *
284            * @param syncId the primary key of the d l sync
285            * @return the d l sync that was removed
286            * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a d l sync with the primary key could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public com.liferay.portlet.documentlibrary.model.DLSync remove(long syncId)
290                    throws com.liferay.portal.kernel.exception.SystemException,
291                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
292    
293            public com.liferay.portlet.documentlibrary.model.DLSync updateImpl(
294                    com.liferay.portlet.documentlibrary.model.DLSync dlSync)
295                    throws com.liferay.portal.kernel.exception.SystemException;
296    
297            /**
298            * Returns the d l sync with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchSyncException} if it could not be found.
299            *
300            * @param syncId the primary key of the d l sync
301            * @return the d l sync
302            * @throws com.liferay.portlet.documentlibrary.NoSuchSyncException if a d l sync with the primary key could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public com.liferay.portlet.documentlibrary.model.DLSync findByPrimaryKey(
306                    long syncId)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.documentlibrary.NoSuchSyncException;
309    
310            /**
311            * Returns the d l sync with the primary key or returns <code>null</code> if it could not be found.
312            *
313            * @param syncId the primary key of the d l sync
314            * @return the d l sync, or <code>null</code> if a d l sync with the primary key could not be found
315            * @throws SystemException if a system exception occurred
316            */
317            public com.liferay.portlet.documentlibrary.model.DLSync fetchByPrimaryKey(
318                    long syncId) throws com.liferay.portal.kernel.exception.SystemException;
319    
320            /**
321            * Returns all the d l syncs.
322            *
323            * @return the d l syncs
324            * @throws SystemException if a system exception occurred
325            */
326            public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findAll()
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Returns a range of all the d l syncs.
331            *
332            * <p>
333            * 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.DLSyncModelImpl}. 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.
334            * </p>
335            *
336            * @param start the lower bound of the range of d l syncs
337            * @param end the upper bound of the range of d l syncs (not inclusive)
338            * @return the range of d l syncs
339            * @throws SystemException if a system exception occurred
340            */
341            public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findAll(
342                    int start, int end)
343                    throws com.liferay.portal.kernel.exception.SystemException;
344    
345            /**
346            * Returns an ordered range of all the d l syncs.
347            *
348            * <p>
349            * 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.DLSyncModelImpl}. 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.
350            * </p>
351            *
352            * @param start the lower bound of the range of d l syncs
353            * @param end the upper bound of the range of d l syncs (not inclusive)
354            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
355            * @return the ordered range of d l syncs
356            * @throws SystemException if a system exception occurred
357            */
358            public java.util.List<com.liferay.portlet.documentlibrary.model.DLSync> findAll(
359                    int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * Removes all the d l syncs from the database.
365            *
366            * @throws SystemException if a system exception occurred
367            */
368            public void removeAll()
369                    throws com.liferay.portal.kernel.exception.SystemException;
370    
371            /**
372            * Returns the number of d l syncs.
373            *
374            * @return the number of d l syncs
375            * @throws SystemException if a system exception occurred
376            */
377            public int countAll()
378                    throws com.liferay.portal.kernel.exception.SystemException;
379    }