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="DLFileShortcutPersistence.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 DLFileShortcutPersistence {
39      public com.liferay.portlet.documentlibrary.model.DLFileShortcut create(
40          long fileShortcutId);
41  
42      public com.liferay.portlet.documentlibrary.model.DLFileShortcut remove(
43          long fileShortcutId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
46  
47      public com.liferay.portlet.documentlibrary.model.DLFileShortcut remove(
48          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(DLFileShortcut dlFileShortcut, boolean merge)</code>.
53       */
54      public com.liferay.portlet.documentlibrary.model.DLFileShortcut update(
55          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
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        dlFileShortcut 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 dlFileShortcut 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.DLFileShortcut update(
72          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.documentlibrary.model.DLFileShortcut updateImpl(
76          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portlet.documentlibrary.model.DLFileShortcut findByPrimaryKey(
81          long fileShortcutId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
84  
85      public com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchByPrimaryKey(
86          long fileShortcutId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> 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.DLFileShortcut> 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.DLFileShortcut> 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.DLFileShortcut 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.NoSuchFileShortcutException;
109 
110     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111     public com.liferay.portlet.documentlibrary.model.DLFileShortcut 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.NoSuchFileShortcutException;
116 
117     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByUuid_PrevAndNext(
119         long fileShortcutId, java.lang.String uuid,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
126         long folderId) throws com.liferay.portal.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
130         long folderId, 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.DLFileShortcut> findByFolderId(
135         long folderId, 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.DLFileShortcut findByFolderId_First(
141         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public com.liferay.portlet.documentlibrary.model.DLFileShortcut findByFolderId_Last(
147         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException,
149             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByFolderId_PrevAndNext(
153         long fileShortcutId, long folderId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
157 
158     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
160         long toFolderId, java.lang.String toName)
161         throws com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
165         long toFolderId, java.lang.String toName, 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.DLFileShortcut> findByTF_TN(
170         long toFolderId, java.lang.String toName, 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.DLFileShortcut findByTF_TN_First(
176         long toFolderId, java.lang.String toName,
177         com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public com.liferay.portlet.documentlibrary.model.DLFileShortcut findByTF_TN_Last(
183         long toFolderId, java.lang.String toName,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException,
186             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
187 
188     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189     public com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByTF_TN_PrevAndNext(
190         long fileShortcutId, long toFolderId, java.lang.String toName,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException;
194 
195     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196     public java.util.List<Object> findWithDynamicQuery(
197         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
198         throws com.liferay.portal.SystemException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public java.util.List<Object> findWithDynamicQuery(
202         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
203         int end) throws com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll()
207         throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
211         int start, int end) throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
215         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException;
217 
218     public void removeByUuid(java.lang.String uuid)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeByFolderId(long folderId)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeByTF_TN(long toFolderId, java.lang.String toName)
225         throws com.liferay.portal.SystemException;
226 
227     public void removeAll() throws com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public int countByUuid(java.lang.String uuid)
231         throws com.liferay.portal.SystemException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public int countByFolderId(long folderId)
235         throws com.liferay.portal.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public int countByTF_TN(long toFolderId, java.lang.String toName)
239         throws com.liferay.portal.SystemException;
240 
241     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242     public int countAll() throws com.liferay.portal.SystemException;
243 
244     public void registerListener(
245         com.liferay.portal.model.ModelListener listener);
246 
247     public void unregisterListener(
248         com.liferay.portal.model.ModelListener listener);
249 }