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