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.messageboards.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.model.SystemEventConstants; 026 import com.liferay.portal.service.BaseLocalService; 027 import com.liferay.portal.service.PersistedModelLocalService; 028 029 /** 030 * Provides the local service interface for MBThreadFlag. Methods of this 031 * service will not have security checks based on the propagated JAAS 032 * credentials because this service can only be accessed from within the same 033 * VM. 034 * 035 * @author Brian Wing Shun Chan 036 * @see MBThreadFlagLocalServiceUtil 037 * @see com.liferay.portlet.messageboards.service.base.MBThreadFlagLocalServiceBaseImpl 038 * @see com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl 039 * @generated 040 */ 041 @ProviderType 042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 043 PortalException.class, SystemException.class}) 044 public interface MBThreadFlagLocalService extends BaseLocalService, 045 PersistedModelLocalService { 046 /* 047 * NOTE FOR DEVELOPERS: 048 * 049 * Never modify or reference this interface directly. Always use {@link MBThreadFlagLocalServiceUtil} to access the message boards thread flag local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 050 */ 051 052 /** 053 * Adds the message boards thread flag to the database. Also notifies the appropriate model listeners. 054 * 055 * @param mbThreadFlag the message boards thread flag 056 * @return the message boards thread flag that was added 057 */ 058 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 059 public com.liferay.portlet.messageboards.model.MBThreadFlag addMBThreadFlag( 060 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag); 061 062 public com.liferay.portlet.messageboards.model.MBThreadFlag addThreadFlag( 063 long userId, com.liferay.portlet.messageboards.model.MBThread thread, 064 com.liferay.portal.service.ServiceContext serviceContext) 065 throws PortalException; 066 067 /** 068 * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database. 069 * 070 * @param threadFlagId the primary key for the new message boards thread flag 071 * @return the new message boards thread flag 072 */ 073 public com.liferay.portlet.messageboards.model.MBThreadFlag createMBThreadFlag( 074 long threadFlagId); 075 076 /** 077 * Deletes the message boards thread flag from the database. Also notifies the appropriate model listeners. 078 * 079 * @param mbThreadFlag the message boards thread flag 080 * @return the message boards thread flag that was removed 081 */ 082 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 083 public com.liferay.portlet.messageboards.model.MBThreadFlag deleteMBThreadFlag( 084 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag); 085 086 /** 087 * Deletes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners. 088 * 089 * @param threadFlagId the primary key of the message boards thread flag 090 * @return the message boards thread flag that was removed 091 * @throws PortalException if a message boards thread flag with the primary key could not be found 092 */ 093 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 094 public com.liferay.portlet.messageboards.model.MBThreadFlag deleteMBThreadFlag( 095 long threadFlagId) throws PortalException; 096 097 /** 098 * @throws PortalException 099 */ 100 @Override 101 public com.liferay.portal.model.PersistedModel deletePersistedModel( 102 com.liferay.portal.model.PersistedModel persistedModel) 103 throws PortalException; 104 105 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 106 public void deleteThreadFlag( 107 com.liferay.portlet.messageboards.model.MBThreadFlag threadFlag); 108 109 public void deleteThreadFlag(long threadFlagId) throws PortalException; 110 111 public void deleteThreadFlagsByThreadId(long threadId); 112 113 public void deleteThreadFlagsByUserId(long userId); 114 115 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 116 117 /** 118 * Performs a dynamic query on the database and returns the matching rows. 119 * 120 * @param dynamicQuery the dynamic query 121 * @return the matching rows 122 */ 123 public <T> java.util.List<T> dynamicQuery( 124 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 125 126 /** 127 * Performs a dynamic query on the database and returns a range of the matching rows. 128 * 129 * <p> 130 * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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. 131 * </p> 132 * 133 * @param dynamicQuery the dynamic query 134 * @param start the lower bound of the range of model instances 135 * @param end the upper bound of the range of model instances (not inclusive) 136 * @return the range of matching rows 137 */ 138 public <T> java.util.List<T> dynamicQuery( 139 com.liferay.portal.kernel.dao.orm.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.messageboards.model.impl.MBThreadFlagModelImpl}. 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> java.util.List<T> dynamicQuery( 156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 157 int end, 158 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 159 160 /** 161 * Returns the number of rows matching the dynamic query. 162 * 163 * @param dynamicQuery the dynamic query 164 * @return the number of rows matching the dynamic query 165 */ 166 public long dynamicQueryCount( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 168 169 /** 170 * Returns the number of rows matching the dynamic query. 171 * 172 * @param dynamicQuery the dynamic query 173 * @param projection the projection to apply to the query 174 * @return the number of rows matching the dynamic query 175 */ 176 public long dynamicQueryCount( 177 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 178 com.liferay.portal.kernel.dao.orm.Projection projection); 179 180 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 181 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlag( 182 long threadFlagId); 183 184 /** 185 * Returns the message boards thread flag matching the UUID and group. 186 * 187 * @param uuid the message boards thread flag's UUID 188 * @param groupId the primary key of the group 189 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 190 */ 191 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 192 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchMBThreadFlagByUuidAndGroupId( 193 java.lang.String uuid, long groupId); 194 195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 196 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 197 198 /** 199 * Returns the Spring bean ID for this bean. 200 * 201 * @return the Spring bean ID for this bean 202 */ 203 public java.lang.String getBeanIdentifier(); 204 205 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 206 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 207 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 208 209 /** 210 * Returns the message boards thread flag with the primary key. 211 * 212 * @param threadFlagId the primary key of the message boards thread flag 213 * @return the message boards thread flag 214 * @throws PortalException if a message boards thread flag with the primary key could not be found 215 */ 216 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 217 public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlag( 218 long threadFlagId) throws PortalException; 219 220 /** 221 * Returns the message boards thread flag matching the UUID and group. 222 * 223 * @param uuid the message boards thread flag's UUID 224 * @param groupId the primary key of the group 225 * @return the matching message boards thread flag 226 * @throws PortalException if a matching message boards thread flag could not be found 227 */ 228 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 229 public com.liferay.portlet.messageboards.model.MBThreadFlag getMBThreadFlagByUuidAndGroupId( 230 java.lang.String uuid, long groupId) throws PortalException; 231 232 /** 233 * Returns a range of all the message boards thread flags. 234 * 235 * <p> 236 * 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.messageboards.model.impl.MBThreadFlagModelImpl}. 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. 237 * </p> 238 * 239 * @param start the lower bound of the range of message boards thread flags 240 * @param end the upper bound of the range of message boards thread flags (not inclusive) 241 * @return the range of message boards thread flags 242 */ 243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 244 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlags( 245 int start, int end); 246 247 /** 248 * Returns all the message boards thread flags matching the UUID and company. 249 * 250 * @param uuid the UUID of the message boards thread flags 251 * @param companyId the primary key of the company 252 * @return the matching message boards thread flags, or an empty list if no matches were found 253 */ 254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 255 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId( 256 java.lang.String uuid, long companyId); 257 258 /** 259 * Returns a range of message boards thread flags matching the UUID and company. 260 * 261 * @param uuid the UUID of the message boards thread flags 262 * @param companyId the primary key of the company 263 * @param start the lower bound of the range of message boards thread flags 264 * @param end the upper bound of the range of message boards thread flags (not inclusive) 265 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 266 * @return the range of matching message boards thread flags, or an empty list if no matches were found 267 */ 268 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 269 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId( 270 java.lang.String uuid, long companyId, int start, int end, 271 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBThreadFlag> orderByComparator); 272 273 /** 274 * Returns the number of message boards thread flags. 275 * 276 * @return the number of message boards thread flags 277 */ 278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 279 public int getMBThreadFlagsCount(); 280 281 @Override 282 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 283 public com.liferay.portal.model.PersistedModel getPersistedModel( 284 java.io.Serializable primaryKeyObj) throws PortalException; 285 286 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 287 public com.liferay.portlet.messageboards.model.MBThreadFlag getThreadFlag( 288 long userId, com.liferay.portlet.messageboards.model.MBThread thread) 289 throws PortalException; 290 291 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 292 public boolean hasThreadFlag(long userId, 293 com.liferay.portlet.messageboards.model.MBThread thread) 294 throws PortalException; 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 message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 305 * 306 * @param mbThreadFlag the message boards thread flag 307 * @return the message boards thread flag that was updated 308 */ 309 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 310 public com.liferay.portlet.messageboards.model.MBThreadFlag updateMBThreadFlag( 311 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag); 312 }