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.service.BaseLocalService; 026 import com.liferay.portal.service.PersistedModelLocalService; 027 028 /** 029 * Provides the local service interface for MBDiscussion. 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 MBDiscussionLocalServiceUtil 036 * @see com.liferay.portlet.messageboards.service.base.MBDiscussionLocalServiceBaseImpl 037 * @see com.liferay.portlet.messageboards.service.impl.MBDiscussionLocalServiceImpl 038 * @generated 039 */ 040 @ProviderType 041 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 042 PortalException.class, SystemException.class}) 043 public interface MBDiscussionLocalService extends BaseLocalService, 044 PersistedModelLocalService { 045 /* 046 * NOTE FOR DEVELOPERS: 047 * 048 * Never modify or reference this interface directly. Always use {@link MBDiscussionLocalServiceUtil} to access the message boards discussion local service. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBDiscussionLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 049 */ 050 051 /** 052 * @deprecated As of 7.0.0, replaced by {@link #addDiscussion(long, long, 053 long, long, long, ServiceContext)} 054 */ 055 @java.lang.Deprecated 056 public com.liferay.portlet.messageboards.model.MBDiscussion addDiscussion( 057 long userId, long classNameId, long classPK, long threadId, 058 com.liferay.portal.service.ServiceContext serviceContext) 059 throws com.liferay.portal.kernel.exception.PortalException; 060 061 public com.liferay.portlet.messageboards.model.MBDiscussion addDiscussion( 062 long userId, long groupId, long classNameId, long classPK, 063 long threadId, com.liferay.portal.service.ServiceContext serviceContext) 064 throws com.liferay.portal.kernel.exception.PortalException; 065 066 /** 067 * Adds the message boards discussion to the database. Also notifies the appropriate model listeners. 068 * 069 * @param mbDiscussion the message boards discussion 070 * @return the message boards discussion that was added 071 */ 072 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 073 public com.liferay.portlet.messageboards.model.MBDiscussion addMBDiscussion( 074 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion); 075 076 /** 077 * Creates a new message boards discussion with the primary key. Does not add the message boards discussion to the database. 078 * 079 * @param discussionId the primary key for the new message boards discussion 080 * @return the new message boards discussion 081 */ 082 public com.liferay.portlet.messageboards.model.MBDiscussion createMBDiscussion( 083 long discussionId); 084 085 /** 086 * Deletes the message boards discussion with the primary key from the database. Also notifies the appropriate model listeners. 087 * 088 * @param discussionId the primary key of the message boards discussion 089 * @return the message boards discussion that was removed 090 * @throws PortalException if a message boards discussion with the primary key could not be found 091 */ 092 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 093 public com.liferay.portlet.messageboards.model.MBDiscussion deleteMBDiscussion( 094 long discussionId) 095 throws com.liferay.portal.kernel.exception.PortalException; 096 097 /** 098 * Deletes the message boards discussion from the database. Also notifies the appropriate model listeners. 099 * 100 * @param mbDiscussion the message boards discussion 101 * @return the message boards discussion that was removed 102 */ 103 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 104 public com.liferay.portlet.messageboards.model.MBDiscussion deleteMBDiscussion( 105 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion); 106 107 /** 108 * @throws PortalException 109 */ 110 @Override 111 public com.liferay.portal.model.PersistedModel deletePersistedModel( 112 com.liferay.portal.model.PersistedModel persistedModel) 113 throws com.liferay.portal.kernel.exception.PortalException; 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.MBDiscussionModelImpl}. 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.MBDiscussionModelImpl}. 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.MBDiscussion fetchDiscussion( 182 java.lang.String className, long classPK); 183 184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 185 public com.liferay.portlet.messageboards.model.MBDiscussion fetchDiscussion( 186 long discussionId); 187 188 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 189 public com.liferay.portlet.messageboards.model.MBDiscussion fetchMBDiscussion( 190 long discussionId); 191 192 /** 193 * Returns the message boards discussion matching the UUID and group. 194 * 195 * @param uuid the message boards discussion's UUID 196 * @param groupId the primary key of the group 197 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 198 */ 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public com.liferay.portlet.messageboards.model.MBDiscussion fetchMBDiscussionByUuidAndGroupId( 201 java.lang.String uuid, long groupId); 202 203 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 204 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 205 206 /** 207 * Returns the Spring bean ID for this bean. 208 * 209 * @return the Spring bean ID for this bean 210 */ 211 public java.lang.String getBeanIdentifier(); 212 213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 214 public com.liferay.portlet.messageboards.model.MBDiscussion getDiscussion( 215 java.lang.String className, long classPK) 216 throws com.liferay.portal.kernel.exception.PortalException; 217 218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 219 public com.liferay.portlet.messageboards.model.MBDiscussion getDiscussion( 220 long discussionId) 221 throws com.liferay.portal.kernel.exception.PortalException; 222 223 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 224 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 225 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext); 226 227 /** 228 * Returns the message boards discussion with the primary key. 229 * 230 * @param discussionId the primary key of the message boards discussion 231 * @return the message boards discussion 232 * @throws PortalException if a message boards discussion with the primary key could not be found 233 */ 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public com.liferay.portlet.messageboards.model.MBDiscussion getMBDiscussion( 236 long discussionId) 237 throws com.liferay.portal.kernel.exception.PortalException; 238 239 /** 240 * Returns the message boards discussion matching the UUID and group. 241 * 242 * @param uuid the message boards discussion's UUID 243 * @param groupId the primary key of the group 244 * @return the matching message boards discussion 245 * @throws PortalException if a matching message boards discussion could not be found 246 */ 247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 248 public com.liferay.portlet.messageboards.model.MBDiscussion getMBDiscussionByUuidAndGroupId( 249 java.lang.String uuid, long groupId) 250 throws com.liferay.portal.kernel.exception.PortalException; 251 252 /** 253 * Returns a range of all the message boards discussions. 254 * 255 * <p> 256 * 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.MBDiscussionModelImpl}. 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. 257 * </p> 258 * 259 * @param start the lower bound of the range of message boards discussions 260 * @param end the upper bound of the range of message boards discussions (not inclusive) 261 * @return the range of message boards discussions 262 */ 263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 264 public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getMBDiscussions( 265 int start, int end); 266 267 /** 268 * Returns all the message boards discussions matching the UUID and company. 269 * 270 * @param uuid the UUID of the message boards discussions 271 * @param companyId the primary key of the company 272 * @return the matching message boards discussions, or an empty list if no matches were found 273 */ 274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 275 public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getMBDiscussionsByUuidAndCompanyId( 276 java.lang.String uuid, long companyId); 277 278 /** 279 * Returns a range of message boards discussions matching the UUID and company. 280 * 281 * @param uuid the UUID of the message boards discussions 282 * @param companyId the primary key of the company 283 * @param start the lower bound of the range of message boards discussions 284 * @param end the upper bound of the range of message boards discussions (not inclusive) 285 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 286 * @return the range of matching message boards discussions, or an empty list if no matches were found 287 */ 288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 289 public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getMBDiscussionsByUuidAndCompanyId( 290 java.lang.String uuid, long companyId, int start, int end, 291 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator); 292 293 /** 294 * Returns the number of message boards discussions. 295 * 296 * @return the number of message boards discussions 297 */ 298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 299 public int getMBDiscussionsCount(); 300 301 @Override 302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 303 public com.liferay.portal.model.PersistedModel getPersistedModel( 304 java.io.Serializable primaryKeyObj) 305 throws com.liferay.portal.kernel.exception.PortalException; 306 307 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 308 public com.liferay.portlet.messageboards.model.MBDiscussion getThreadDiscussion( 309 long threadId) 310 throws com.liferay.portal.kernel.exception.PortalException; 311 312 /** 313 * Sets the Spring bean ID for this bean. 314 * 315 * @param beanIdentifier the Spring bean ID for this bean 316 */ 317 public void setBeanIdentifier(java.lang.String beanIdentifier); 318 319 public void subscribeDiscussion(long userId, long groupId, 320 java.lang.String className, long classPK) 321 throws com.liferay.portal.kernel.exception.PortalException; 322 323 public void unsubscribeDiscussion(long userId, java.lang.String className, 324 long classPK) 325 throws com.liferay.portal.kernel.exception.PortalException; 326 327 /** 328 * Updates the message boards discussion in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 329 * 330 * @param mbDiscussion the message boards discussion 331 * @return the message boards discussion that was updated 332 */ 333 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 334 public com.liferay.portlet.messageboards.model.MBDiscussion updateMBDiscussion( 335 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion); 336 }