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