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 */ 122 public void deleteTagStats(long tagStatsId) throws PortalException; 123 124 /** 125 * Deletes all asset tag statistics instances associated with the asset 126 * entry matching the class name ID. 127 * 128 * @param classNameId the asset entry's class name ID 129 */ 130 public void deleteTagStatsByClassNameId(long classNameId); 131 132 /** 133 * Deletes all asset tag statistics instances associated with the tag. 134 * 135 * @param tagId the primary key of the tag 136 */ 137 public void deleteTagStatsByTagId(long tagId); 138 139 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 140 141 /** 142 * Performs a dynamic query on the database and returns the matching rows. 143 * 144 * @param dynamicQuery the dynamic query 145 * @return the matching rows 146 */ 147 public <T> java.util.List<T> dynamicQuery( 148 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 149 150 /** 151 * Performs a dynamic query on the database and returns a range of the matching rows. 152 * 153 * <p> 154 * 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. 155 * </p> 156 * 157 * @param dynamicQuery the dynamic query 158 * @param start the lower bound of the range of model instances 159 * @param end the upper bound of the range of model instances (not inclusive) 160 * @return the range of matching rows 161 */ 162 public <T> java.util.List<T> dynamicQuery( 163 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 164 int end); 165 166 /** 167 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 168 * 169 * <p> 170 * 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. 171 * </p> 172 * 173 * @param dynamicQuery the dynamic query 174 * @param start the lower bound of the range of model instances 175 * @param end the upper bound of the range of model instances (not inclusive) 176 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 177 * @return the ordered range of matching rows 178 */ 179 public <T> java.util.List<T> dynamicQuery( 180 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 181 int end, 182 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 183 184 /** 185 * Returns the number of rows matching the dynamic query. 186 * 187 * @param dynamicQuery the dynamic query 188 * @return the number of rows matching the dynamic query 189 */ 190 public long dynamicQueryCount( 191 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 192 193 /** 194 * Returns the number of rows matching the dynamic query. 195 * 196 * @param dynamicQuery the dynamic query 197 * @param projection the projection to apply to the query 198 * @return the number of rows matching the dynamic query 199 */ 200 public long dynamicQueryCount( 201 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 202 com.liferay.portal.kernel.dao.orm.Projection projection); 203 204 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 205 public com.liferay.portlet.asset.model.AssetTagStats fetchAssetTagStats( 206 long tagStatsId); 207 208 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 209 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 210 211 /** 212 * Returns the asset tag stats with the primary key. 213 * 214 * @param tagStatsId the primary key of the asset tag stats 215 * @return the asset tag stats 216 * @throws PortalException if a asset tag stats with the primary key could not be found 217 */ 218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 219 public com.liferay.portlet.asset.model.AssetTagStats getAssetTagStats( 220 long tagStatsId) throws PortalException; 221 222 /** 223 * Returns a range of all the asset tag statses. 224 * 225 * <p> 226 * 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. 227 * </p> 228 * 229 * @param start the lower bound of the range of asset tag statses 230 * @param end the upper bound of the range of asset tag statses (not inclusive) 231 * @return the range of asset tag statses 232 */ 233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 234 public java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getAssetTagStatses( 235 int start, int end); 236 237 /** 238 * Returns the number of asset tag statses. 239 * 240 * @return the number of asset tag statses 241 */ 242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 243 public int getAssetTagStatsesCount(); 244 245 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 246 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 247 248 /** 249 * Returns the OSGi service identifier. 250 * 251 * @return the OSGi service identifier 252 */ 253 public java.lang.String getOSGiServiceIdentifier(); 254 255 @Override 256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 257 public com.liferay.portal.model.PersistedModel getPersistedModel( 258 java.io.Serializable primaryKeyObj) throws PortalException; 259 260 /** 261 * Returns a range of all the asset tag statistics instances associated with 262 * the asset entry matching the class name ID. 263 * 264 * <p> 265 * Useful when paginating results. Returns a maximum of <code>end - 266 * start</code> instances. <code>start</code> and <code>end</code> are not 267 * primary keys, they are indexes in the result set. Thus, <code>0</code> 268 * refers to the first result in the set. Setting both <code>start</code> 269 * and <code>end</code> to {@link 270 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 271 * result set. 272 * </p> 273 * 274 * @param classNameId the asset entry's class name ID 275 * @param start the lower bound of the range of results 276 * @param end the upper bound of the range of results (not inclusive) 277 * @return the range of asset tag statistics associated with the asset entry 278 matching the class name ID 279 */ 280 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 281 public java.util.List<com.liferay.portlet.asset.model.AssetTagStats> getTagStats( 282 long classNameId, int start, int end); 283 284 /** 285 * Returns the asset tag statistics instance with the tag and asset entry 286 * matching the class name ID 287 * 288 * @param tagId the primary key of the tag 289 * @param classNameId the asset entry's class name ID 290 * @return Returns the asset tag statistics instance with the tag and asset 291 entry matching the class name ID 292 */ 293 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 294 public com.liferay.portlet.asset.model.AssetTagStats getTagStats( 295 long tagId, long classNameId); 296 297 /** 298 * Updates the asset tag stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 299 * 300 * @param assetTagStats the asset tag stats 301 * @return the asset tag stats that was updated 302 */ 303 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 304 public com.liferay.portlet.asset.model.AssetTagStats updateAssetTagStats( 305 com.liferay.portlet.asset.model.AssetTagStats assetTagStats); 306 307 /** 308 * Updates the asset tag statistics instance. 309 * 310 * @param tagId the primary key of the tag 311 * @param classNameId the asset entry's class name ID 312 * @return the updated asset tag statistics instance 313 */ 314 public com.liferay.portlet.asset.model.AssetTagStats updateTagStats( 315 long tagId, long classNameId) throws PortalException; 316 }