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.dao.orm.ActionableDynamicQuery; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; 022 import com.liferay.portal.kernel.dao.orm.Projection; 023 import com.liferay.portal.kernel.exception.PortalException; 024 import com.liferay.portal.kernel.exception.SystemException; 025 import com.liferay.portal.kernel.search.Indexable; 026 import com.liferay.portal.kernel.search.IndexableType; 027 import com.liferay.portal.kernel.transaction.Isolation; 028 import com.liferay.portal.kernel.transaction.Propagation; 029 import com.liferay.portal.kernel.transaction.Transactional; 030 import com.liferay.portal.kernel.util.OrderByComparator; 031 import com.liferay.portal.model.PersistedModel; 032 import com.liferay.portal.service.BaseLocalService; 033 import com.liferay.portal.service.PersistedModelLocalService; 034 035 import com.liferay.portlet.asset.model.AssetTagStats; 036 037 import java.io.Serializable; 038 039 import java.util.List; 040 041 /** 042 * Provides the local service interface for AssetTagStats. Methods of this 043 * service will not have security checks based on the propagated JAAS 044 * credentials because this service can only be accessed from within the same 045 * VM. 046 * 047 * @author Brian Wing Shun Chan 048 * @see AssetTagStatsLocalServiceUtil 049 * @see com.liferay.portlet.asset.service.base.AssetTagStatsLocalServiceBaseImpl 050 * @see com.liferay.portlet.asset.service.impl.AssetTagStatsLocalServiceImpl 051 * @generated 052 */ 053 @ProviderType 054 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 055 PortalException.class, SystemException.class}) 056 public interface AssetTagStatsLocalService extends BaseLocalService, 057 PersistedModelLocalService { 058 /* 059 * NOTE FOR DEVELOPERS: 060 * 061 * 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. 062 */ 063 064 /** 065 * Adds the asset tag stats to the database. Also notifies the appropriate model listeners. 066 * 067 * @param assetTagStats the asset tag stats 068 * @return the asset tag stats that was added 069 */ 070 @Indexable(type = IndexableType.REINDEX) 071 public AssetTagStats addAssetTagStats(AssetTagStats assetTagStats); 072 073 /** 074 * Adds an asset tag statistics instance. 075 * 076 * @param tagId the primary key of the tag 077 * @param classNameId the asset entry's class name ID 078 * @return the asset tag statistics instance 079 */ 080 public AssetTagStats addTagStats(long tagId, long classNameId); 081 082 /** 083 * Creates a new asset tag stats with the primary key. Does not add the asset tag stats to the database. 084 * 085 * @param tagStatsId the primary key for the new asset tag stats 086 * @return the new asset tag stats 087 */ 088 public AssetTagStats createAssetTagStats(long tagStatsId); 089 090 /** 091 * Deletes the asset tag stats from the database. Also notifies the appropriate model listeners. 092 * 093 * @param assetTagStats the asset tag stats 094 * @return the asset tag stats that was removed 095 */ 096 @Indexable(type = IndexableType.DELETE) 097 public AssetTagStats deleteAssetTagStats(AssetTagStats assetTagStats); 098 099 /** 100 * Deletes the asset tag stats with the primary key from the database. Also notifies the appropriate model listeners. 101 * 102 * @param tagStatsId the primary key of the asset tag stats 103 * @return the asset tag stats that was removed 104 * @throws PortalException if a asset tag stats with the primary key could not be found 105 */ 106 @Indexable(type = IndexableType.DELETE) 107 public AssetTagStats deleteAssetTagStats(long tagStatsId) 108 throws PortalException; 109 110 /** 111 * @throws PortalException 112 */ 113 @Override 114 public PersistedModel deletePersistedModel(PersistedModel persistedModel) 115 throws PortalException; 116 117 /** 118 * Deletes the asset tag statistics instance. 119 * 120 * @param tagStats the asset tag statistics instance 121 */ 122 public void deleteTagStats(AssetTagStats tagStats); 123 124 /** 125 * Deletes the asset tag statistics instance matching the tag statistics ID. 126 * 127 * @param tagStatsId the primary key of the asset tag statistics instance 128 */ 129 public void deleteTagStats(long tagStatsId) throws PortalException; 130 131 /** 132 * Deletes all asset tag statistics instances associated with the asset 133 * entry matching the class name ID. 134 * 135 * @param classNameId the asset entry's class name ID 136 */ 137 public void deleteTagStatsByClassNameId(long classNameId); 138 139 /** 140 * Deletes all asset tag statistics instances associated with the tag. 141 * 142 * @param tagId the primary key of the tag 143 */ 144 public void deleteTagStatsByTagId(long tagId); 145 146 public DynamicQuery dynamicQuery(); 147 148 /** 149 * Performs a dynamic query on the database and returns the matching rows. 150 * 151 * @param dynamicQuery the dynamic query 152 * @return the matching rows 153 */ 154 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery); 155 156 /** 157 * Performs a dynamic query on the database and returns a range of the matching rows. 158 * 159 * <p> 160 * 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. 161 * </p> 162 * 163 * @param dynamicQuery the dynamic query 164 * @param start the lower bound of the range of model instances 165 * @param end the upper bound of the range of model instances (not inclusive) 166 * @return the range of matching rows 167 */ 168 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 169 int end); 170 171 /** 172 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 173 * 174 * <p> 175 * 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. 176 * </p> 177 * 178 * @param dynamicQuery the dynamic query 179 * @param start the lower bound of the range of model instances 180 * @param end the upper bound of the range of model instances (not inclusive) 181 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 182 * @return the ordered range of matching rows 183 */ 184 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 185 int end, OrderByComparator<T> orderByComparator); 186 187 /** 188 * Returns the number of rows matching the dynamic query. 189 * 190 * @param dynamicQuery the dynamic query 191 * @return the number of rows matching the dynamic query 192 */ 193 public long dynamicQueryCount(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(DynamicQuery dynamicQuery, 203 Projection projection); 204 205 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 206 public AssetTagStats fetchAssetTagStats(long tagStatsId); 207 208 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 209 public 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 AssetTagStats getAssetTagStats(long tagStatsId) 220 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 List<AssetTagStats> getAssetTagStatses(int start, int end); 235 236 /** 237 * Returns the number of asset tag statses. 238 * 239 * @return the number of asset tag statses 240 */ 241 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 242 public int getAssetTagStatsesCount(); 243 244 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 245 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 246 247 /** 248 * Returns the OSGi service identifier. 249 * 250 * @return the OSGi service identifier 251 */ 252 public java.lang.String getOSGiServiceIdentifier(); 253 254 @Override 255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 256 public PersistedModel getPersistedModel(Serializable primaryKeyObj) 257 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 List<AssetTagStats> getTagStats(long classNameId, int start, int end); 281 282 /** 283 * Returns the asset tag statistics instance with the tag and asset entry 284 * matching the class name ID 285 * 286 * @param tagId the primary key of the tag 287 * @param classNameId the asset entry's class name ID 288 * @return Returns the asset tag statistics instance with the tag and asset 289 entry matching the class name ID 290 */ 291 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 292 public AssetTagStats getTagStats(long tagId, long classNameId); 293 294 /** 295 * Updates the asset tag stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 296 * 297 * @param assetTagStats the asset tag stats 298 * @return the asset tag stats that was updated 299 */ 300 @Indexable(type = IndexableType.REINDEX) 301 public AssetTagStats updateAssetTagStats(AssetTagStats assetTagStats); 302 303 /** 304 * Updates the asset tag statistics instance. 305 * 306 * @param tagId the primary key of the tag 307 * @param classNameId the asset entry's class name ID 308 * @return the updated asset tag statistics instance 309 */ 310 public AssetTagStats updateTagStats(long tagId, long classNameId) 311 throws PortalException; 312 }