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.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="DLFileRankPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface DLFileRankPersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> dlFileRanks);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.documentlibrary.model.DLFileRank create(
43          long fileRankId);
44  
45      public com.liferay.portlet.documentlibrary.model.DLFileRank remove(
46          long fileRankId)
47          throws com.liferay.portal.SystemException,
48              com.liferay.portlet.documentlibrary.NoSuchFileRankException;
49  
50      public com.liferay.portlet.documentlibrary.model.DLFileRank remove(
51          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * @deprecated Use <code>update(DLFileRank dlFileRank, boolean merge)</code>.
56       */
57      public com.liferay.portlet.documentlibrary.model.DLFileRank update(
58          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * Add, update, or merge, the entity. This method also calls the model
63       * listeners to trigger the proper events associated with adding, deleting,
64       * or updating an entity.
65       *
66       * @param        dlFileRank the entity to add, update, or merge
67       * @param        merge boolean value for whether to merge the entity. The
68       *                default value is false. Setting merge to true is more
69       *                expensive and should only be true when dlFileRank is
70       *                transient. See LEP-5473 for a detailed discussion of this
71       *                method.
72       * @return        true if the portlet can be displayed via Ajax
73       */
74      public com.liferay.portlet.documentlibrary.model.DLFileRank update(
75          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
76          boolean merge) throws com.liferay.portal.SystemException;
77  
78      public com.liferay.portlet.documentlibrary.model.DLFileRank updateImpl(
79          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey(
83          long fileRankId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.documentlibrary.NoSuchFileRankException;
86  
87      public com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey(
88          long fileRankId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
91          long userId) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
94          long userId, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
98          long userId, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
102     public com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First(
103         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException,
105             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
106 
107     public com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last(
108         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException,
110             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
111 
112     public com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext(
113         long fileRankId, long userId,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
117 
118     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
119         long groupId, long userId) throws com.liferay.portal.SystemException;
120 
121     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
122         long groupId, long userId, int start, int end)
123         throws com.liferay.portal.SystemException;
124 
125     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
126         long groupId, long userId, int start, int end,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException;
129 
130     public com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_First(
131         long groupId, long userId,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
135 
136     public com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_Last(
137         long groupId, long userId,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
141 
142     public com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_PrevAndNext(
143         long fileRankId, long groupId, long userId,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
147 
148     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByF_N(
149         long folderId, java.lang.String name)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByF_N(
153         long folderId, java.lang.String name, int start, int end)
154         throws com.liferay.portal.SystemException;
155 
156     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByF_N(
157         long folderId, java.lang.String name, int start, int end,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException;
160 
161     public com.liferay.portlet.documentlibrary.model.DLFileRank findByF_N_First(
162         long folderId, java.lang.String name,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
166 
167     public com.liferay.portlet.documentlibrary.model.DLFileRank findByF_N_Last(
168         long folderId, java.lang.String name,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
172 
173     public com.liferay.portlet.documentlibrary.model.DLFileRank[] findByF_N_PrevAndNext(
174         long fileRankId, long folderId, java.lang.String name,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
178 
179     public com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F_N(
180         long companyId, long userId, long folderId, java.lang.String name)
181         throws com.liferay.portal.SystemException,
182             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
183 
184     public com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F_N(
185         long companyId, long userId, long folderId, java.lang.String name)
186         throws com.liferay.portal.SystemException;
187 
188     public com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F_N(
189         long companyId, long userId, long folderId, java.lang.String name,
190         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
191 
192     public java.util.List<Object> findWithDynamicQuery(
193         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
194         throws com.liferay.portal.SystemException;
195 
196     public java.util.List<Object> findWithDynamicQuery(
197         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
198         int end) throws com.liferay.portal.SystemException;
199 
200     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll()
201         throws com.liferay.portal.SystemException;
202 
203     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
204         int start, int end) throws com.liferay.portal.SystemException;
205 
206     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
207         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException;
209 
210     public void removeByUserId(long userId)
211         throws com.liferay.portal.SystemException;
212 
213     public void removeByG_U(long groupId, long userId)
214         throws com.liferay.portal.SystemException;
215 
216     public void removeByF_N(long folderId, java.lang.String name)
217         throws com.liferay.portal.SystemException;
218 
219     public void removeByC_U_F_N(long companyId, long userId, long folderId,
220         java.lang.String name)
221         throws com.liferay.portal.SystemException,
222             com.liferay.portlet.documentlibrary.NoSuchFileRankException;
223 
224     public void removeAll() throws com.liferay.portal.SystemException;
225 
226     public int countByUserId(long userId)
227         throws com.liferay.portal.SystemException;
228 
229     public int countByG_U(long groupId, long userId)
230         throws com.liferay.portal.SystemException;
231 
232     public int countByF_N(long folderId, java.lang.String name)
233         throws com.liferay.portal.SystemException;
234 
235     public int countByC_U_F_N(long companyId, long userId, long folderId,
236         java.lang.String name) throws com.liferay.portal.SystemException;
237 
238     public int countAll() throws com.liferay.portal.SystemException;
239 }