1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.documentlibrary.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="DLFileEntryPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface DLFileEntryPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> dlFileEntries);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.documentlibrary.model.DLFileEntry create(
40          long fileEntryId);
41  
42      public com.liferay.portlet.documentlibrary.model.DLFileEntry remove(
43          long fileEntryId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
46  
47      public com.liferay.portlet.documentlibrary.model.DLFileEntry remove(
48          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(DLFileEntry dlFileEntry, boolean merge)</code>.
53       */
54      public com.liferay.portlet.documentlibrary.model.DLFileEntry update(
55          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        dlFileEntry the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when dlFileEntry is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portlet.documentlibrary.model.DLFileEntry update(
72          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.documentlibrary.model.DLFileEntry updateImpl(
76          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.documentlibrary.model.DLFileEntry findByPrimaryKey(
80          long fileEntryId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
83  
84      public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByPrimaryKey(
85          long fileEntryId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
91          java.lang.String uuid, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
95          java.lang.String uuid, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUuid_First(
100         java.lang.String uuid,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
104 
105     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUuid_Last(
106         java.lang.String uuid,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
110 
111     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByUuid_PrevAndNext(
112         long fileEntryId, java.lang.String uuid,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
116 
117     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUUID_G(
118         java.lang.String uuid, long groupId)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
121 
122     public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByUUID_G(
123         java.lang.String uuid, long groupId)
124         throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByUUID_G(
127         java.lang.String uuid, long groupId, boolean retrieveFromCache)
128         throws com.liferay.portal.SystemException;
129 
130     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByGroupId(
131         long groupId) throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByGroupId(
134         long groupId, int start, int end)
135         throws com.liferay.portal.SystemException;
136 
137     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByGroupId(
138         long groupId, int start, int end,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException;
141 
142     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByGroupId_First(
143         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
146 
147     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByGroupId_Last(
148         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
151 
152     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByGroupId_PrevAndNext(
153         long fileEntryId, long groupId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
157 
158     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
159         long companyId) throws com.liferay.portal.SystemException;
160 
161     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
162         long companyId, int start, int end)
163         throws com.liferay.portal.SystemException;
164 
165     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
166         long companyId, int start, int end,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException;
169 
170     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_First(
171         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
174 
175     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_Last(
176         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
179 
180     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByCompanyId_PrevAndNext(
181         long fileEntryId, long companyId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
185 
186     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
187         long folderId) throws com.liferay.portal.SystemException;
188 
189     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
190         long folderId, int start, int end)
191         throws com.liferay.portal.SystemException;
192 
193     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
194         long folderId, int start, int end,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException;
197 
198     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_First(
199         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException,
201             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
202 
203     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_Last(
204         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException,
206             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
207 
208     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByFolderId_PrevAndNext(
209         long fileEntryId, long folderId,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
213 
214     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U(
215         long groupId, long userId) throws com.liferay.portal.SystemException;
216 
217     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U(
218         long groupId, long userId, int start, int end)
219         throws com.liferay.portal.SystemException;
220 
221     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U(
222         long groupId, long userId, int start, int end,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException;
225 
226     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByG_U_First(
227         long groupId, long userId,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
231 
232     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByG_U_Last(
233         long groupId, long userId,
234         com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.SystemException,
236             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
237 
238     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByG_U_PrevAndNext(
239         long fileEntryId, long groupId, long userId,
240         com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException,
242             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
243 
244     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_N(
245         long folderId, java.lang.String name)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
248 
249     public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByF_N(
250         long folderId, java.lang.String name)
251         throws com.liferay.portal.SystemException;
252 
253     public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByF_N(
254         long folderId, java.lang.String name, boolean retrieveFromCache)
255         throws com.liferay.portal.SystemException;
256 
257     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
258         long folderId, java.lang.String title)
259         throws com.liferay.portal.SystemException;
260 
261     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
262         long folderId, java.lang.String title, int start, int end)
263         throws com.liferay.portal.SystemException;
264 
265     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
266         long folderId, java.lang.String title, int start, int end,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException;
269 
270     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_First(
271         long folderId, java.lang.String title,
272         com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
275 
276     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_Last(
277         long folderId, java.lang.String title,
278         com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.SystemException,
280             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
281 
282     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByF_T_PrevAndNext(
283         long fileEntryId, long folderId, java.lang.String title,
284         com.liferay.portal.kernel.util.OrderByComparator obc)
285         throws com.liferay.portal.SystemException,
286             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
287 
288     public java.util.List<Object> findWithDynamicQuery(
289         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
290         throws com.liferay.portal.SystemException;
291 
292     public java.util.List<Object> findWithDynamicQuery(
293         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
294         int end) throws com.liferay.portal.SystemException;
295 
296     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll()
297         throws com.liferay.portal.SystemException;
298 
299     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
300         int start, int end) throws com.liferay.portal.SystemException;
301 
302     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
303         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
304         throws com.liferay.portal.SystemException;
305 
306     public void removeByUuid(java.lang.String uuid)
307         throws com.liferay.portal.SystemException;
308 
309     public void removeByUUID_G(java.lang.String uuid, long groupId)
310         throws com.liferay.portal.SystemException,
311             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
312 
313     public void removeByGroupId(long groupId)
314         throws com.liferay.portal.SystemException;
315 
316     public void removeByCompanyId(long companyId)
317         throws com.liferay.portal.SystemException;
318 
319     public void removeByFolderId(long folderId)
320         throws com.liferay.portal.SystemException;
321 
322     public void removeByG_U(long groupId, long userId)
323         throws com.liferay.portal.SystemException;
324 
325     public void removeByF_N(long folderId, java.lang.String name)
326         throws com.liferay.portal.SystemException,
327             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
328 
329     public void removeByF_T(long folderId, java.lang.String title)
330         throws com.liferay.portal.SystemException;
331 
332     public void removeAll() throws com.liferay.portal.SystemException;
333 
334     public int countByUuid(java.lang.String uuid)
335         throws com.liferay.portal.SystemException;
336 
337     public int countByUUID_G(java.lang.String uuid, long groupId)
338         throws com.liferay.portal.SystemException;
339 
340     public int countByGroupId(long groupId)
341         throws com.liferay.portal.SystemException;
342 
343     public int countByCompanyId(long companyId)
344         throws com.liferay.portal.SystemException;
345 
346     public int countByFolderId(long folderId)
347         throws com.liferay.portal.SystemException;
348 
349     public int countByG_U(long groupId, long userId)
350         throws com.liferay.portal.SystemException;
351 
352     public int countByF_N(long folderId, java.lang.String name)
353         throws com.liferay.portal.SystemException;
354 
355     public int countByF_T(long folderId, java.lang.String title)
356         throws com.liferay.portal.SystemException;
357 
358     public int countAll() throws com.liferay.portal.SystemException;
359 }