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