1   /**
2    * Copyright (c) 2000-2009 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  import com.liferay.portal.service.persistence.BasePersistence;
30  
31  /**
32   * <a href="DLFileEntryPersistence.java.html"><b><i>View Source</i></b></a>
33   *
34   * @author Brian Wing Shun Chan
35   *
36   */
37  @Transactional(rollbackFor =  {
38      PortalException.class, SystemException.class})
39  public interface DLFileEntryPersistence extends BasePersistence {
40      public com.liferay.portlet.documentlibrary.model.DLFileEntry create(
41          long fileEntryId);
42  
43      public com.liferay.portlet.documentlibrary.model.DLFileEntry remove(
44          long fileEntryId)
45          throws com.liferay.portal.SystemException,
46              com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
47  
48      public com.liferay.portlet.documentlibrary.model.DLFileEntry remove(
49          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
50          throws com.liferay.portal.SystemException;
51  
52      /**
53       * @deprecated Use <code>update(DLFileEntry dlFileEntry, boolean merge)</code>.
54       */
55      public com.liferay.portlet.documentlibrary.model.DLFileEntry update(
56          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
57          throws com.liferay.portal.SystemException;
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        dlFileEntry the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when dlFileEntry is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public com.liferay.portlet.documentlibrary.model.DLFileEntry update(
73          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
74          boolean merge) throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portlet.documentlibrary.model.DLFileEntry updateImpl(
77          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
78          boolean merge) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portlet.documentlibrary.model.DLFileEntry findByPrimaryKey(
82          long fileEntryId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
85  
86      public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByPrimaryKey(
87          long fileEntryId) throws com.liferay.portal.SystemException;
88  
89      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
90      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
91          java.lang.String uuid) throws com.liferay.portal.SystemException;
92  
93      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
94      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
95          java.lang.String uuid, int start, int end)
96          throws com.liferay.portal.SystemException;
97  
98      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
99      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByUuid(
100         java.lang.String uuid, int start, int end,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException;
103 
104     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUuid_First(
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     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByUuid_Last(
113         java.lang.String uuid,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
117 
118     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByUuid_PrevAndNext(
120         long fileEntryId, java.lang.String uuid,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
127         long companyId) throws com.liferay.portal.SystemException;
128 
129     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
131         long companyId, int start, int end)
132         throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
136         long companyId, int start, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_First(
142         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.SystemException,
144             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_Last(
148         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByCompanyId_PrevAndNext(
154         long fileEntryId, long companyId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
161         long folderId) throws com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
165         long folderId, int start, int end)
166         throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
170         long folderId, int start, int end,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException;
173 
174     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_First(
176         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
179 
180     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_Last(
182         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByFolderId_PrevAndNext(
188         long fileEntryId, long folderId,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_N(
195         long folderId, java.lang.String name)
196         throws com.liferay.portal.SystemException,
197             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
198 
199     public com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByF_N(
200         long folderId, java.lang.String name)
201         throws com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
205         long folderId, java.lang.String title)
206         throws com.liferay.portal.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
210         long folderId, java.lang.String title, int start, int end)
211         throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
215         long folderId, java.lang.String title, int start, int end,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_First(
221         long folderId, java.lang.String title,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException,
224             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
225 
226     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227     public com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_Last(
228         long folderId, java.lang.String title,
229         com.liferay.portal.kernel.util.OrderByComparator obc)
230         throws com.liferay.portal.SystemException,
231             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByF_T_PrevAndNext(
235         long fileEntryId, long folderId, java.lang.String title,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
239 
240     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241     public java.util.List<Object> findWithDynamicQuery(
242         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
243         throws com.liferay.portal.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public java.util.List<Object> findWithDynamicQuery(
247         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
248         int end) throws com.liferay.portal.SystemException;
249 
250     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll()
252         throws com.liferay.portal.SystemException;
253 
254     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
256         int start, int end) throws com.liferay.portal.SystemException;
257 
258     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
260         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException;
262 
263     public void removeByUuid(java.lang.String uuid)
264         throws com.liferay.portal.SystemException;
265 
266     public void removeByCompanyId(long companyId)
267         throws com.liferay.portal.SystemException;
268 
269     public void removeByFolderId(long folderId)
270         throws com.liferay.portal.SystemException;
271 
272     public void removeByF_N(long folderId, java.lang.String name)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
275 
276     public void removeByF_T(long folderId, java.lang.String title)
277         throws com.liferay.portal.SystemException;
278 
279     public void removeAll() throws com.liferay.portal.SystemException;
280 
281     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282     public int countByUuid(java.lang.String uuid)
283         throws com.liferay.portal.SystemException;
284 
285     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286     public int countByCompanyId(long companyId)
287         throws com.liferay.portal.SystemException;
288 
289     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290     public int countByFolderId(long folderId)
291         throws com.liferay.portal.SystemException;
292 
293     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294     public int countByF_N(long folderId, java.lang.String name)
295         throws com.liferay.portal.SystemException;
296 
297     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298     public int countByF_T(long folderId, java.lang.String title)
299         throws com.liferay.portal.SystemException;
300 
301     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302     public int countAll() throws com.liferay.portal.SystemException;
303 }