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