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