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.portlet.asset.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.service.BaseLocalService; 026 import com.liferay.portal.service.PersistedModelLocalService; 027 028 /** 029 * Provides the local service interface for AssetTagStats. Methods of this 030 * service will not have security checks based on the propagated JAAS 031 * credentials because this service can only be accessed from within the same 032 * VM. 033 * 034 * @author Brian Wing Shun Chan 035 * @see AssetTagStatsLocalServiceUtil 036 * @see com.liferay.portlet.asset.service.base.AssetTagStatsLocalServiceBaseImpl 037 * @see com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl 038 * @generated 039 */ 040 @ProviderType 041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 042 PortalException.class, SystemException.class}) 043 public interface AssetTagStatsLocalService extends BaseLocalService, 044 PersistedModelLocalService { 045 /* 046 * NOTE FOR DEVELOPERS: 047 * 048 * Never modify or reference this interface directly. Always use {@link AssetTagStatsLocalServiceUtil} to access the asset tag stats local service. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 049 */ 050 051 /** 052 * Adds the asset tag stats to the database. Also notifies the appropriate model listeners. 053 * 054 * @param assetTagStats the asset tag stats 055 * @return the asset tag stats that was added 056 */ 057 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 058 public com.liferay.portlet.asset.model.AssetTagStats addAssetTagStats( 059 com.liferay.portlet.asset.model.AssetTagStats assetTagStats); 060 061 /** 062 * Adds an asset tag statistics instance. 063 * 064 * @param tagId the primary key of the tag 065 * @param classNameId the asset entry's class name ID 066 * @return the asset tag statistics instance 067 */ 068 public com.liferay.portlet.asset.model.AssetTagStats addTagStats( 069 long tagId, long classNameId); 070 071 /** 072 * Creates a new asset tag stats with the primary key. Does not add the asset tag stats to the database. 073 * 074 * @param tagStatsId the primary key for the new asset tag stats 075 * @return the new asset tag stats 076 */ 077 public com.liferay.portlet.asset.model.AssetTagStats createAssetTagStats( 078 long tagStatsId); 079 080 /** 081 * Deletes the asset tag stats from the database. Also notifies the appropriate model listeners. 082 * 083 * @param assetTagStats the asset tag stats 084 * @return the asset tag stats that was removed 085 */ 086 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 087 public com.liferay.portlet.asset.model.AssetTagStats deleteAssetTagStats( 088 com.liferay.portlet.asset.model.AssetTagStats assetTagStats); 089 090 /** 091 * Deletes the asset tag stats with the primary key from the database. Also notifies the appropriate model listeners. 092 * 093 * @param tagStatsId the primary key of the asset tag stats 094 * @return the asset tag stats that was removed 095 * @throws PortalException if a asset tag stats with the primary key could not be found 096 */ 097 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 098 public com.liferay.portlet.asset.model.AssetTagStats deleteAssetTagStats( 099 long tagStatsId) throws PortalException; 100 101 /** 102 * @throws PortalException 103 */ 104 @Override 105 public com.liferay.portal.model.PersistedModel deletePersistedModel( 106 com.liferay.portal.model.PersistedModel persistedModel) 107 throws PortalException; 108 109 /** 110 * Deletes the asset tag statistics instance. 111 * 112 * @param tagStats the asset tag statistics instance 113 */ 114 public void deleteTagStats( 115 com.liferay.portlet.asset.model.AssetTagStats tagStats); 116 117 /** 118 * Deletes the asset tag statistics instance matching the tag statistics ID. 119 * 120 * @param tagStatsId the primary key of the asset tag statistics instance 121 * @throws PortalException if the assetTagStats with the primary key could 122 not be found 123 */ 124 public void deleteTagStats(long tagStatsId) throws PortalException; 125 126 /** 127 * Deletes all asset tag statistics instances associated with the asset 128 * entry matching the class name ID. 129 * 130 * @param classNameId the asset entry's class name ID 131 */ 132 public void deleteTagStatsByClassNameId(long classNameId); 133 134 /** 135 * Deletes all asset tag statistics instances associated with the tag. 136 * 137 * @param tagId the primary key of the tag 138 */ 139 public void deleteTagStatsByTagId(long tagId); 140 141 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 142 143 /** 144 * Performs a dynamic query on the database and returns the matching rows. 145 * 146 * @param dynamicQuery the dynamic query 147 * @return the matching rows 148 */ 149 public <T> java.util.List<T> dynamicQuery( 150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 151 152 /** 153 * Performs a dynamic query on the database and returns a range of the matching rows. 154 * 155 * <p> 156 * 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.asset.model.impl.AssetTagStatsModelImpl}. 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. 157 * </p> 158 * 159 * @param dynamicQuery the dynamic query 160 * @param start the lower bound of the range of model instances 161 * @param end the upper bound of the range of model instances (not inclusive) 162 * @return the range of matching rows 163 */ 164 public <T> java.util.List<T> dynamicQuery( 165 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 166 int end); 167 168 /** 169 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 170 * 171 * <p> 172 * 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.asset.model.impl.AssetTagStatsModelImpl}. 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. 173 * </p> 174 * 175 * @param dynamicQuery the dynamic query 176 * @param start the lower bound of the range of model instances 177 * @param end the upper bound of the range of model instances (not inclusive) 178 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 179 * @return the ordered range of matching rows 180 */ 181 public <T> java.util.List<T> dynamicQuery( 182 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 183 int end, 184 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 185 186 /** 187 * Returns the number of rows matching the dynamic query. 188 * 189 * @param dynamicQuery the dynamic query 190 * @return the number of rows matching the dynamic query 191 */ 192 public long dynamicQueryCount( 193 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 194 195 /** 196 * Returns the number of rows matching the dynamic query. 197 * 198 * @param dynamicQuery the dynamic query 199 * @param projection the projection to apply to the query 200 * @return the number of rows matching the dynamic query 201 */ 202 public long dynamicQueryCount( 203 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 204 com.liferay.portal.kernel.dao.orm.Projection projection); 205 206 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 207 public com.liferay.portlet.asset.model.AssetTagStats fetchAssetTagStats( 208 long tagStatsId); 209 210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 211 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 212 213 /** 214 * Returns the asset tag stats with the primary key. 215 * 216 * @param tagStatsId the primary key of the asset tag stats 217 * @return the asset tag stats 218 * @throws PortalException if a asset tag stats with the primary key could not be found 219 */ 220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 221 public com.liferay.portlet.asset.model.AssetTagStats getAssetTagStats( 222 long tagStatsId) throws PortalException; 223 224 /** 225 * Returns a range of all the asset tag statses. 226 * 227 * <p> 228 * 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.asset.model.impl.AssetTagStatsModelImpl}. 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. 229 * </p> 230 * 231 * @param start the lower bound of the range of asset tag statses 232 * @param end the upper bound of the range of asset tag statses (not inclusive) 233 * @return the range of asset tag statses 234 */ 235 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 236 public java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getAssetTagStatses( 237 int start, int end); 238 239 /** 240 * Returns the number of asset tag statses. 241 * 242 * @return the number of asset tag statses 243 */ 244 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 245 public int getAssetTagStatsesCount(); 246 247 /** 248 * Returns the Spring bean ID for this bean. 249 * 250 * @return the Spring bean ID for this bean 251 */ 252 public java.lang.String getBeanIdentifier(); 253 254 @Override 255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 256 public com.liferay.portal.model.PersistedModel getPersistedModel( 257 java.io.Serializable primaryKeyObj) throws PortalException; 258 259 /** 260 * Returns a range of all the asset tag statistics instances associated with 261 * the asset entry matching the class name ID. 262 * 263 * <p> 264 * Useful when paginating results. Returns a maximum of <code>end - 265 * start</code> instances. <code>start</code> and <code>end</code> are not 266 * primary keys, they are indexes in the result set. Thus, <code>0</code> 267 * refers to the first result in the set. Setting both <code>start</code> 268 * and <code>end</code> to {@link 269 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 270 * result set. 271 * </p> 272 * 273 * @param classNameId the asset entry's class name ID 274 * @param start the lower bound of the range of results 275 * @param end the upper bound of the range of results (not inclusive) 276 * @return the range of asset tag statistics associated with the asset entry 277 matching the class name ID 278 */ 279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 280 public java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getTagStats( 281 long classNameId, int start, int end); 282 283 /** 284 * Returns the asset tag statistics instance with the tag and asset entry 285 * matching the class name ID 286 * 287 * @param tagId the primary key of the tag 288 * @param classNameId the asset entry's class name ID 289 * @return Returns the asset tag statistics instance with the tag and asset 290 entry matching the class name ID 291 */ 292 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 293 public com.liferay.portlet.asset.model.AssetTagStats getTagStats( 294 long tagId, long classNameId); 295 296 /** 297 * Sets the Spring bean ID for this bean. 298 * 299 * @param beanIdentifier the Spring bean ID for this bean 300 */ 301 public void setBeanIdentifier(java.lang.String beanIdentifier); 302 303 /** 304 * Updates the asset tag stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 305 * 306 * @param assetTagStats the asset tag stats 307 * @return the asset tag stats that was updated 308 */ 309 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 310 public com.liferay.portlet.asset.model.AssetTagStats updateAssetTagStats( 311 com.liferay.portlet.asset.model.AssetTagStats assetTagStats); 312 313 /** 314 * Updates the asset tag statistics instance. 315 * 316 * @param tagId the primary key of the tag 317 * @param classNameId the asset entry's class name ID 318 * @return the updated asset tag statistics instance 319 * @throws PortalException if an asset tag with the tag ID could not be 320 found 321 */ 322 public com.liferay.portlet.asset.model.AssetTagStats updateTagStats( 323 long tagId, long classNameId) throws PortalException; 324 }