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.blogs.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="BlogsStatsUserPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface BlogsStatsUserPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> blogsStatsUsers);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.blogs.model.BlogsStatsUser create(
40          long statsUserId);
41  
42      public com.liferay.portlet.blogs.model.BlogsStatsUser remove(
43          long statsUserId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.blogs.NoSuchStatsUserException;
46  
47      public com.liferay.portlet.blogs.model.BlogsStatsUser remove(
48          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(BlogsStatsUser blogsStatsUser, boolean merge)</code>.
53       */
54      public com.liferay.portlet.blogs.model.BlogsStatsUser update(
55          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser)
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        blogsStatsUser 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 blogsStatsUser 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.blogs.model.BlogsStatsUser update(
72          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.blogs.model.BlogsStatsUser updateImpl(
76          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.blogs.model.BlogsStatsUser findByPrimaryKey(
80          long statsUserId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.blogs.NoSuchStatsUserException;
83  
84      public com.liferay.portlet.blogs.model.BlogsStatsUser fetchByPrimaryKey(
85          long statsUserId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
88          long groupId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
91          long groupId, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
95          long groupId, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.blogs.model.BlogsStatsUser findByGroupId_First(
100         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException,
102             com.liferay.portlet.blogs.NoSuchStatsUserException;
103 
104     public com.liferay.portlet.blogs.model.BlogsStatsUser findByGroupId_Last(
105         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.blogs.NoSuchStatsUserException;
108 
109     public com.liferay.portlet.blogs.model.BlogsStatsUser[] findByGroupId_PrevAndNext(
110         long statsUserId, long groupId,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.blogs.NoSuchStatsUserException;
114 
115     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
116         long userId) throws com.liferay.portal.SystemException;
117 
118     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
119         long userId, int start, int end)
120         throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
123         long userId, int start, int end,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException;
126 
127     public com.liferay.portlet.blogs.model.BlogsStatsUser findByUserId_First(
128         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException,
130             com.liferay.portlet.blogs.NoSuchStatsUserException;
131 
132     public com.liferay.portlet.blogs.model.BlogsStatsUser findByUserId_Last(
133         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.blogs.NoSuchStatsUserException;
136 
137     public com.liferay.portlet.blogs.model.BlogsStatsUser[] findByUserId_PrevAndNext(
138         long statsUserId, long userId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.blogs.NoSuchStatsUserException;
142 
143     public com.liferay.portlet.blogs.model.BlogsStatsUser findByG_U(
144         long groupId, long userId)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.blogs.NoSuchStatsUserException;
147 
148     public com.liferay.portlet.blogs.model.BlogsStatsUser fetchByG_U(
149         long groupId, long userId) throws com.liferay.portal.SystemException;
150 
151     public com.liferay.portlet.blogs.model.BlogsStatsUser fetchByG_U(
152         long groupId, long userId, boolean retrieveFromCache)
153         throws com.liferay.portal.SystemException;
154 
155     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
156         long groupId, int entryCount) throws com.liferay.portal.SystemException;
157 
158     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
159         long groupId, int entryCount, int start, int end)
160         throws com.liferay.portal.SystemException;
161 
162     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
163         long groupId, int entryCount, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException;
166 
167     public com.liferay.portlet.blogs.model.BlogsStatsUser findByG_E_First(
168         long groupId, int entryCount,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.blogs.NoSuchStatsUserException;
172 
173     public com.liferay.portlet.blogs.model.BlogsStatsUser findByG_E_Last(
174         long groupId, int entryCount,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.blogs.NoSuchStatsUserException;
178 
179     public com.liferay.portlet.blogs.model.BlogsStatsUser[] findByG_E_PrevAndNext(
180         long statsUserId, long groupId, int entryCount,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.blogs.NoSuchStatsUserException;
184 
185     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
186         long companyId, int entryCount)
187         throws com.liferay.portal.SystemException;
188 
189     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
190         long companyId, int entryCount, int start, int end)
191         throws com.liferay.portal.SystemException;
192 
193     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
194         long companyId, int entryCount, int start, int end,
195         com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException;
197 
198     public com.liferay.portlet.blogs.model.BlogsStatsUser findByC_E_First(
199         long companyId, int entryCount,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.blogs.NoSuchStatsUserException;
203 
204     public com.liferay.portlet.blogs.model.BlogsStatsUser findByC_E_Last(
205         long companyId, int entryCount,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException,
208             com.liferay.portlet.blogs.NoSuchStatsUserException;
209 
210     public com.liferay.portlet.blogs.model.BlogsStatsUser[] findByC_E_PrevAndNext(
211         long statsUserId, long companyId, int entryCount,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.blogs.NoSuchStatsUserException;
215 
216     public java.util.List<Object> findWithDynamicQuery(
217         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
218         throws com.liferay.portal.SystemException;
219 
220     public java.util.List<Object> findWithDynamicQuery(
221         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
222         int end) throws com.liferay.portal.SystemException;
223 
224     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll()
225         throws com.liferay.portal.SystemException;
226 
227     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
228         int start, int end) throws com.liferay.portal.SystemException;
229 
230     public java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
231         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.SystemException;
233 
234     public void removeByGroupId(long groupId)
235         throws com.liferay.portal.SystemException;
236 
237     public void removeByUserId(long userId)
238         throws com.liferay.portal.SystemException;
239 
240     public void removeByG_U(long groupId, long userId)
241         throws com.liferay.portal.SystemException,
242             com.liferay.portlet.blogs.NoSuchStatsUserException;
243 
244     public void removeByG_E(long groupId, int entryCount)
245         throws com.liferay.portal.SystemException;
246 
247     public void removeByC_E(long companyId, int entryCount)
248         throws com.liferay.portal.SystemException;
249 
250     public void removeAll() throws com.liferay.portal.SystemException;
251 
252     public int countByGroupId(long groupId)
253         throws com.liferay.portal.SystemException;
254 
255     public int countByUserId(long userId)
256         throws com.liferay.portal.SystemException;
257 
258     public int countByG_U(long groupId, long userId)
259         throws com.liferay.portal.SystemException;
260 
261     public int countByG_E(long groupId, int entryCount)
262         throws com.liferay.portal.SystemException;
263 
264     public int countByC_E(long companyId, int entryCount)
265         throws com.liferay.portal.SystemException;
266 
267     public int countAll() throws com.liferay.portal.SystemException;
268 }