001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.blogs.kernel.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.blogs.kernel.model.BlogsStatsUser; 020 021 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; 022 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 023 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; 024 import com.liferay.portal.kernel.dao.orm.Projection; 025 import com.liferay.portal.kernel.exception.PortalException; 026 import com.liferay.portal.kernel.exception.SystemException; 027 import com.liferay.portal.kernel.model.PersistedModel; 028 import com.liferay.portal.kernel.search.Indexable; 029 import com.liferay.portal.kernel.search.IndexableType; 030 import com.liferay.portal.kernel.service.BaseLocalService; 031 import com.liferay.portal.kernel.service.PersistedModelLocalService; 032 import com.liferay.portal.kernel.transaction.Isolation; 033 import com.liferay.portal.kernel.transaction.Propagation; 034 import com.liferay.portal.kernel.transaction.Transactional; 035 import com.liferay.portal.kernel.util.OrderByComparator; 036 037 import java.io.Serializable; 038 039 import java.util.Date; 040 import java.util.List; 041 042 /** 043 * Provides the local service interface for BlogsStatsUser. Methods of this 044 * service will not have security checks based on the propagated JAAS 045 * credentials because this service can only be accessed from within the same 046 * VM. 047 * 048 * @author Brian Wing Shun Chan 049 * @see BlogsStatsUserLocalServiceUtil 050 * @see com.liferay.portlet.blogs.service.base.BlogsStatsUserLocalServiceBaseImpl 051 * @see com.liferay.portlet.blogs.service.impl.BlogsStatsUserLocalServiceImpl 052 * @generated 053 */ 054 @ProviderType 055 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 056 PortalException.class, SystemException.class}) 057 public interface BlogsStatsUserLocalService extends BaseLocalService, 058 PersistedModelLocalService { 059 /* 060 * NOTE FOR DEVELOPERS: 061 * 062 * Never modify or reference this interface directly. Always use {@link BlogsStatsUserLocalServiceUtil} to access the blogs stats user local service. Add custom service methods to {@link com.liferay.portlet.blogs.service.impl.BlogsStatsUserLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 063 */ 064 065 /** 066 * Adds the blogs stats user to the database. Also notifies the appropriate model listeners. 067 * 068 * @param blogsStatsUser the blogs stats user 069 * @return the blogs stats user that was added 070 */ 071 @Indexable(type = IndexableType.REINDEX) 072 public BlogsStatsUser addBlogsStatsUser(BlogsStatsUser blogsStatsUser); 073 074 /** 075 * Creates a new blogs stats user with the primary key. Does not add the blogs stats user to the database. 076 * 077 * @param statsUserId the primary key for the new blogs stats user 078 * @return the new blogs stats user 079 */ 080 public BlogsStatsUser createBlogsStatsUser(long statsUserId); 081 082 /** 083 * Deletes the blogs stats user from the database. Also notifies the appropriate model listeners. 084 * 085 * @param blogsStatsUser the blogs stats user 086 * @return the blogs stats user that was removed 087 */ 088 @Indexable(type = IndexableType.DELETE) 089 public BlogsStatsUser deleteBlogsStatsUser(BlogsStatsUser blogsStatsUser); 090 091 /** 092 * Deletes the blogs stats user with the primary key from the database. Also notifies the appropriate model listeners. 093 * 094 * @param statsUserId the primary key of the blogs stats user 095 * @return the blogs stats user that was removed 096 * @throws PortalException if a blogs stats user with the primary key could not be found 097 */ 098 @Indexable(type = IndexableType.DELETE) 099 public BlogsStatsUser deleteBlogsStatsUser(long statsUserId) 100 throws PortalException; 101 102 /** 103 * @throws PortalException 104 */ 105 @Override 106 public PersistedModel deletePersistedModel(PersistedModel persistedModel) 107 throws PortalException; 108 109 public void deleteStatsUser(long statsUserId) throws PortalException; 110 111 public void deleteStatsUser(BlogsStatsUser statsUsers); 112 113 public void deleteStatsUserByGroupId(long groupId); 114 115 public void deleteStatsUserByUserId(long userId); 116 117 public DynamicQuery dynamicQuery(); 118 119 /** 120 * Performs a dynamic query on the database and returns the matching rows. 121 * 122 * @param dynamicQuery the dynamic query 123 * @return the matching rows 124 */ 125 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery); 126 127 /** 128 * Performs a dynamic query on the database and returns a range of the matching rows. 129 * 130 * <p> 131 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.blogs.model.impl.BlogsStatsUserModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 132 * </p> 133 * 134 * @param dynamicQuery the dynamic query 135 * @param start the lower bound of the range of model instances 136 * @param end the upper bound of the range of model instances (not inclusive) 137 * @return the range of matching rows 138 */ 139 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 140 int end); 141 142 /** 143 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 144 * 145 * <p> 146 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.blogs.model.impl.BlogsStatsUserModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 147 * </p> 148 * 149 * @param dynamicQuery the dynamic query 150 * @param start the lower bound of the range of model instances 151 * @param end the upper bound of the range of model instances (not inclusive) 152 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 153 * @return the ordered range of matching rows 154 */ 155 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 156 int end, OrderByComparator<T> orderByComparator); 157 158 /** 159 * Returns the number of rows matching the dynamic query. 160 * 161 * @param dynamicQuery the dynamic query 162 * @return the number of rows matching the dynamic query 163 */ 164 public long dynamicQueryCount(DynamicQuery dynamicQuery); 165 166 /** 167 * Returns the number of rows matching the dynamic query. 168 * 169 * @param dynamicQuery the dynamic query 170 * @param projection the projection to apply to the query 171 * @return the number of rows matching the dynamic query 172 */ 173 public long dynamicQueryCount(DynamicQuery dynamicQuery, 174 Projection projection); 175 176 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 177 public BlogsStatsUser fetchBlogsStatsUser(long statsUserId); 178 179 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 180 public ActionableDynamicQuery getActionableDynamicQuery(); 181 182 /** 183 * Returns the blogs stats user with the primary key. 184 * 185 * @param statsUserId the primary key of the blogs stats user 186 * @return the blogs stats user 187 * @throws PortalException if a blogs stats user with the primary key could not be found 188 */ 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public BlogsStatsUser getBlogsStatsUser(long statsUserId) 191 throws PortalException; 192 193 /** 194 * Returns a range of all the blogs stats users. 195 * 196 * <p> 197 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.blogs.model.impl.BlogsStatsUserModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 198 * </p> 199 * 200 * @param start the lower bound of the range of blogs stats users 201 * @param end the upper bound of the range of blogs stats users (not inclusive) 202 * @return the range of blogs stats users 203 */ 204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 205 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end); 206 207 /** 208 * Returns the number of blogs stats users. 209 * 210 * @return the number of blogs stats users 211 */ 212 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 213 public int getBlogsStatsUsersCount(); 214 215 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 216 public List<BlogsStatsUser> getCompanyStatsUsers(long companyId, int start, 217 int end); 218 219 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 220 public List<BlogsStatsUser> getCompanyStatsUsers(long companyId, int start, 221 int end, OrderByComparator<BlogsStatsUser> obc); 222 223 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 224 public int getCompanyStatsUsersCount(long companyId); 225 226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 227 public List<BlogsStatsUser> getGroupStatsUsers(long groupId, int start, 228 int end); 229 230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 231 public List<BlogsStatsUser> getGroupStatsUsers(long groupId, int start, 232 int end, OrderByComparator<BlogsStatsUser> obc); 233 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public int getGroupStatsUsersCount(long groupId); 236 237 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 238 public List<BlogsStatsUser> getGroupsStatsUsers(long companyId, 239 long groupId, int start, int end); 240 241 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 242 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 243 244 /** 245 * Returns the OSGi service identifier. 246 * 247 * @return the OSGi service identifier 248 */ 249 public java.lang.String getOSGiServiceIdentifier(); 250 251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 252 public List<BlogsStatsUser> getOrganizationStatsUsers(long organizationId, 253 int start, int end); 254 255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 256 public List<BlogsStatsUser> getOrganizationStatsUsers(long organizationId, 257 int start, int end, OrderByComparator<BlogsStatsUser> obc); 258 259 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 260 public int getOrganizationStatsUsersCount(long organizationId); 261 262 @Override 263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 264 public PersistedModel getPersistedModel(Serializable primaryKeyObj) 265 throws PortalException; 266 267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 268 public BlogsStatsUser getStatsUser(long groupId, long userId) 269 throws PortalException; 270 271 /** 272 * Updates the blogs stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 273 * 274 * @param blogsStatsUser the blogs stats user 275 * @return the blogs stats user that was updated 276 */ 277 @Indexable(type = IndexableType.REINDEX) 278 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser); 279 280 public void updateStatsUser(long groupId, long userId) 281 throws PortalException; 282 283 public void updateStatsUser(long groupId, long userId, Date displayDate) 284 throws PortalException; 285 }