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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 103 public BlogsStatsUser fetchBlogsStatsUser(long statsUserId); 104 105 /** 106 * Returns the blogs stats user with the primary key. 107 * 108 * @param statsUserId the primary key of the blogs stats user 109 * @return the blogs stats user 110 * @throws PortalException if a blogs stats user with the primary key could not be found 111 */ 112 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 113 public BlogsStatsUser getBlogsStatsUser(long statsUserId) 114 throws PortalException; 115 116 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 117 public BlogsStatsUser getStatsUser(long groupId, long userId) 118 throws PortalException; 119 120 /** 121 * Updates the blogs stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 122 * 123 * @param blogsStatsUser the blogs stats user 124 * @return the blogs stats user that was updated 125 */ 126 @Indexable(type = IndexableType.REINDEX) 127 public BlogsStatsUser updateBlogsStatsUser(BlogsStatsUser blogsStatsUser); 128 129 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 130 public ActionableDynamicQuery getActionableDynamicQuery(); 131 132 public DynamicQuery dynamicQuery(); 133 134 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 135 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 136 137 /** 138 * @throws PortalException 139 */ 140 @Override 141 public PersistedModel deletePersistedModel(PersistedModel persistedModel) 142 throws PortalException; 143 144 @Override 145 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 146 public PersistedModel getPersistedModel(Serializable primaryKeyObj) 147 throws PortalException; 148 149 /** 150 * Returns the number of blogs stats users. 151 * 152 * @return the number of blogs stats users 153 */ 154 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 155 public int getBlogsStatsUsersCount(); 156 157 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 158 public int getCompanyStatsUsersCount(long companyId); 159 160 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 161 public int getGroupStatsUsersCount(long groupId); 162 163 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 164 public int getOrganizationStatsUsersCount(long organizationId); 165 166 /** 167 * Returns the OSGi service identifier. 168 * 169 * @return the OSGi service identifier 170 */ 171 public java.lang.String getOSGiServiceIdentifier(); 172 173 /** 174 * Performs a dynamic query on the database and returns the matching rows. 175 * 176 * @param dynamicQuery the dynamic query 177 * @return the matching rows 178 */ 179 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery); 180 181 /** 182 * Performs a dynamic query on the database and returns a range of the matching rows. 183 * 184 * <p> 185 * 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. 186 * </p> 187 * 188 * @param dynamicQuery the dynamic query 189 * @param start the lower bound of the range of model instances 190 * @param end the upper bound of the range of model instances (not inclusive) 191 * @return the range of matching rows 192 */ 193 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 194 int end); 195 196 /** 197 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 198 * 199 * <p> 200 * 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. 201 * </p> 202 * 203 * @param dynamicQuery the dynamic query 204 * @param start the lower bound of the range of model instances 205 * @param end the upper bound of the range of model instances (not inclusive) 206 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 207 * @return the ordered range of matching rows 208 */ 209 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 210 int end, OrderByComparator<T> orderByComparator); 211 212 /** 213 * Returns a range of all the blogs stats users. 214 * 215 * <p> 216 * 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. 217 * </p> 218 * 219 * @param start the lower bound of the range of blogs stats users 220 * @param end the upper bound of the range of blogs stats users (not inclusive) 221 * @return the range of blogs stats users 222 */ 223 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 224 public List<BlogsStatsUser> getBlogsStatsUsers(int start, int end); 225 226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 227 public List<BlogsStatsUser> getCompanyStatsUsers(long companyId, int start, 228 int end); 229 230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 231 public List<BlogsStatsUser> getCompanyStatsUsers(long companyId, int start, 232 int end, OrderByComparator<BlogsStatsUser> obc); 233 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public List<BlogsStatsUser> getGroupStatsUsers(long groupId, int start, 236 int end); 237 238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 239 public List<BlogsStatsUser> getGroupStatsUsers(long groupId, int start, 240 int end, OrderByComparator<BlogsStatsUser> obc); 241 242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 243 public List<BlogsStatsUser> getGroupsStatsUsers(long companyId, 244 long groupId, int start, int end); 245 246 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 247 public List<BlogsStatsUser> getOrganizationStatsUsers(long organizationId, 248 int start, int end); 249 250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 251 public List<BlogsStatsUser> getOrganizationStatsUsers(long organizationId, 252 int start, int end, OrderByComparator<BlogsStatsUser> obc); 253 254 /** 255 * Returns the number of rows matching the dynamic query. 256 * 257 * @param dynamicQuery the dynamic query 258 * @return the number of rows matching the dynamic query 259 */ 260 public long dynamicQueryCount(DynamicQuery dynamicQuery); 261 262 /** 263 * Returns the number of rows matching the dynamic query. 264 * 265 * @param dynamicQuery the dynamic query 266 * @param projection the projection to apply to the query 267 * @return the number of rows matching the dynamic query 268 */ 269 public long dynamicQueryCount(DynamicQuery dynamicQuery, 270 Projection projection); 271 272 public void deleteStatsUser(BlogsStatsUser statsUsers); 273 274 public void deleteStatsUser(long statsUserId) throws PortalException; 275 276 public void deleteStatsUserByGroupId(long groupId); 277 278 public void deleteStatsUserByUserId(long userId); 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 }