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