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