1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.documentlibrary.service.persistence;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="DLFileEntryPersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface DLFileEntryPersistence {
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      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portlet.documentlibrary.model.DLFileEntry findByPrimaryKey(
81          long fileEntryId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
84  
85      public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByPrimaryKey(
86          long fileEntryId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
90          java.lang.String uuid) throws com.liferay.portal.SystemException;
91  
92      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
94          java.lang.String uuid, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
99          java.lang.String uuid, int start, int end,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException;
102 
103     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUuid_First(
105         java.lang.String uuid,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
109 
110     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUuid_Last(
112         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     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByUuid_PrevAndNext(
119         long fileEntryId, java.lang.String uuid,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
126         long companyId) throws com.liferay.portal.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
130         long companyId, int start, int end)
131         throws com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
135         long companyId, int start, int end,
136         com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException;
138 
139     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_First(
141         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_Last(
147         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByCompanyId_PrevAndNext(
153         long fileEntryId, long companyId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
157 
158     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
160         long folderId) throws com.liferay.portal.SystemException;
161 
162     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
164         long folderId, int start, int end)
165         throws com.liferay.portal.SystemException;
166 
167     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
169         long folderId, int start, int end,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException;
172 
173     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_First(
175         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_Last(
181         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByFolderId_PrevAndNext(
187         long fileEntryId, long folderId,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_N(
194         long folderId, java.lang.String name)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
197 
198     public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByF_N(
199         long folderId, java.lang.String name)
200         throws com.liferay.portal.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
204         long folderId, java.lang.String title)
205         throws com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
209         long folderId, java.lang.String title, int start, int end)
210         throws com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
214         long folderId, java.lang.String title, int start, int end,
215         com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_First(
220         long folderId, java.lang.String title,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException,
223             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
224 
225     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_Last(
227         long folderId, java.lang.String title,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByF_T_PrevAndNext(
234         long fileEntryId, long folderId, java.lang.String title,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public java.util.List<Object> findWithDynamicQuery(
241         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
242         throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public java.util.List<Object> findWithDynamicQuery(
246         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
247         int end) throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll()
251         throws com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
255         int start, int end) throws com.liferay.portal.SystemException;
256 
257     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
259         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException;
261 
262     public void removeByUuid(java.lang.String uuid)
263         throws com.liferay.portal.SystemException;
264 
265     public void removeByCompanyId(long companyId)
266         throws com.liferay.portal.SystemException;
267 
268     public void removeByFolderId(long folderId)
269         throws com.liferay.portal.SystemException;
270 
271     public void removeByF_N(long folderId, java.lang.String name)
272         throws com.liferay.portal.SystemException,
273             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
274 
275     public void removeByF_T(long folderId, java.lang.String title)
276         throws com.liferay.portal.SystemException;
277 
278     public void removeAll() throws com.liferay.portal.SystemException;
279 
280     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281     public int countByUuid(java.lang.String uuid)
282         throws com.liferay.portal.SystemException;
283 
284     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285     public int countByCompanyId(long companyId)
286         throws com.liferay.portal.SystemException;
287 
288     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289     public int countByFolderId(long folderId)
290         throws com.liferay.portal.SystemException;
291 
292     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293     public int countByF_N(long folderId, java.lang.String name)
294         throws com.liferay.portal.SystemException;
295 
296     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297     public int countByF_T(long folderId, java.lang.String title)
298         throws com.liferay.portal.SystemException;
299 
300     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301     public int countAll() throws com.liferay.portal.SystemException;
302 
303     public void registerListener(
304         com.liferay.portal.model.ModelListener listener);
305 
306     public void unregisterListener(
307         com.liferay.portal.model.ModelListener listener);
308 }