PageRenderTime 50ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/portlets/private-messaging-portlet/docroot/WEB-INF/service/com/liferay/privatemessaging/service/UserThreadLocalService.java

https://github.com/l15k4/liferay-plugins
Java | 307 lines | 124 code | 34 blank | 149 comment | 0 complexity | 4407283e200aeee71389029bf981c476 MD5 | raw file
  1. /**
  2. * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. package com.liferay.privatemessaging.service;
  15. import com.liferay.portal.kernel.exception.PortalException;
  16. import com.liferay.portal.kernel.exception.SystemException;
  17. import com.liferay.portal.kernel.transaction.Isolation;
  18. import com.liferay.portal.kernel.transaction.Propagation;
  19. import com.liferay.portal.kernel.transaction.Transactional;
  20. import com.liferay.portal.service.PersistedModelLocalService;
  21. /**
  22. * The interface for the user thread local service.
  23. *
  24. * <p>
  25. * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
  26. * </p>
  27. *
  28. * @author Brian Wing Shun Chan
  29. * @see UserThreadLocalServiceUtil
  30. * @see com.liferay.privatemessaging.service.base.UserThreadLocalServiceBaseImpl
  31. * @see com.liferay.privatemessaging.service.impl.UserThreadLocalServiceImpl
  32. * @generated
  33. */
  34. @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
  35. PortalException.class, SystemException.class})
  36. public interface UserThreadLocalService extends PersistedModelLocalService {
  37. /*
  38. * NOTE FOR DEVELOPERS:
  39. *
  40. * Never modify or reference this interface directly. Always use {@link UserThreadLocalServiceUtil} to access the user thread local service. Add custom service methods to {@link com.liferay.privatemessaging.service.impl.UserThreadLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
  41. */
  42. /**
  43. * Adds the user thread to the database. Also notifies the appropriate model listeners.
  44. *
  45. * @param userThread the user thread
  46. * @return the user thread that was added
  47. * @throws SystemException if a system exception occurred
  48. */
  49. public com.liferay.privatemessaging.model.UserThread addUserThread(
  50. com.liferay.privatemessaging.model.UserThread userThread)
  51. throws com.liferay.portal.kernel.exception.SystemException;
  52. /**
  53. * Creates a new user thread with the primary key. Does not add the user thread to the database.
  54. *
  55. * @param userThreadId the primary key for the new user thread
  56. * @return the new user thread
  57. */
  58. public com.liferay.privatemessaging.model.UserThread createUserThread(
  59. long userThreadId);
  60. /**
  61. * Deletes the user thread with the primary key from the database. Also notifies the appropriate model listeners.
  62. *
  63. * @param userThreadId the primary key of the user thread
  64. * @throws PortalException if a user thread with the primary key could not be found
  65. * @throws SystemException if a system exception occurred
  66. */
  67. public void deleteUserThread(long userThreadId)
  68. throws com.liferay.portal.kernel.exception.PortalException,
  69. com.liferay.portal.kernel.exception.SystemException;
  70. /**
  71. * Deletes the user thread from the database. Also notifies the appropriate model listeners.
  72. *
  73. * @param userThread the user thread
  74. * @throws SystemException if a system exception occurred
  75. */
  76. public void deleteUserThread(
  77. com.liferay.privatemessaging.model.UserThread userThread)
  78. throws com.liferay.portal.kernel.exception.SystemException;
  79. /**
  80. * Performs a dynamic query on the database and returns the matching rows.
  81. *
  82. * @param dynamicQuery the dynamic query
  83. * @return the matching rows
  84. * @throws SystemException if a system exception occurred
  85. */
  86. @SuppressWarnings("rawtypes")
  87. public java.util.List dynamicQuery(
  88. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
  89. throws com.liferay.portal.kernel.exception.SystemException;
  90. /**
  91. * Performs a dynamic query on the database and returns a range of the matching rows.
  92. *
  93. * <p>
  94. * 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.
  95. * </p>
  96. *
  97. * @param dynamicQuery the dynamic query
  98. * @param start the lower bound of the range of model instances
  99. * @param end the upper bound of the range of model instances (not inclusive)
  100. * @return the range of matching rows
  101. * @throws SystemException if a system exception occurred
  102. */
  103. @SuppressWarnings("rawtypes")
  104. public java.util.List dynamicQuery(
  105. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
  106. int end) throws com.liferay.portal.kernel.exception.SystemException;
  107. /**
  108. * Performs a dynamic query on the database and returns an ordered range of the matching rows.
  109. *
  110. * <p>
  111. * 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.
  112. * </p>
  113. *
  114. * @param dynamicQuery the dynamic query
  115. * @param start the lower bound of the range of model instances
  116. * @param end the upper bound of the range of model instances (not inclusive)
  117. * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
  118. * @return the ordered range of matching rows
  119. * @throws SystemException if a system exception occurred
  120. */
  121. @SuppressWarnings("rawtypes")
  122. public java.util.List dynamicQuery(
  123. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
  124. int end,
  125. com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
  126. throws com.liferay.portal.kernel.exception.SystemException;
  127. /**
  128. * Returns the number of rows that match the dynamic query.
  129. *
  130. * @param dynamicQuery the dynamic query
  131. * @return the number of rows that match the dynamic query
  132. * @throws SystemException if a system exception occurred
  133. */
  134. public long dynamicQueryCount(
  135. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
  136. throws com.liferay.portal.kernel.exception.SystemException;
  137. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  138. public com.liferay.privatemessaging.model.UserThread fetchUserThread(
  139. long userThreadId)
  140. throws com.liferay.portal.kernel.exception.SystemException;
  141. /**
  142. * Returns the user thread with the primary key.
  143. *
  144. * @param userThreadId the primary key of the user thread
  145. * @return the user thread
  146. * @throws PortalException if a user thread with the primary key could not be found
  147. * @throws SystemException if a system exception occurred
  148. */
  149. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  150. public com.liferay.privatemessaging.model.UserThread getUserThread(
  151. long userThreadId)
  152. throws com.liferay.portal.kernel.exception.PortalException,
  153. com.liferay.portal.kernel.exception.SystemException;
  154. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  155. public com.liferay.portal.model.PersistedModel getPersistedModel(
  156. java.io.Serializable primaryKeyObj)
  157. throws com.liferay.portal.kernel.exception.PortalException,
  158. com.liferay.portal.kernel.exception.SystemException;
  159. /**
  160. * Returns a range of all the user threads.
  161. *
  162. * <p>
  163. * 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.
  164. * </p>
  165. *
  166. * @param start the lower bound of the range of user threads
  167. * @param end the upper bound of the range of user threads (not inclusive)
  168. * @return the range of user threads
  169. * @throws SystemException if a system exception occurred
  170. */
  171. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  172. public java.util.List<com.liferay.privatemessaging.model.UserThread> getUserThreads(
  173. int start, int end)
  174. throws com.liferay.portal.kernel.exception.SystemException;
  175. /**
  176. * Returns the number of user threads.
  177. *
  178. * @return the number of user threads
  179. * @throws SystemException if a system exception occurred
  180. */
  181. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  182. public int getUserThreadsCount()
  183. throws com.liferay.portal.kernel.exception.SystemException;
  184. /**
  185. * Updates the user thread in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  186. *
  187. * @param userThread the user thread
  188. * @return the user thread that was updated
  189. * @throws SystemException if a system exception occurred
  190. */
  191. public com.liferay.privatemessaging.model.UserThread updateUserThread(
  192. com.liferay.privatemessaging.model.UserThread userThread)
  193. throws com.liferay.portal.kernel.exception.SystemException;
  194. /**
  195. * Updates the user thread in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  196. *
  197. * @param userThread the user thread
  198. * @param merge whether to merge the user thread with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
  199. * @return the user thread that was updated
  200. * @throws SystemException if a system exception occurred
  201. */
  202. public com.liferay.privatemessaging.model.UserThread updateUserThread(
  203. com.liferay.privatemessaging.model.UserThread userThread, boolean merge)
  204. throws com.liferay.portal.kernel.exception.SystemException;
  205. /**
  206. * Returns the Spring bean ID for this bean.
  207. *
  208. * @return the Spring bean ID for this bean
  209. */
  210. public java.lang.String getBeanIdentifier();
  211. /**
  212. * Sets the Spring bean ID for this bean.
  213. *
  214. * @param beanIdentifier the Spring bean ID for this bean
  215. */
  216. public void setBeanIdentifier(java.lang.String beanIdentifier);
  217. public com.liferay.portlet.messageboards.model.MBMessage addPrivateMessage(
  218. long userId, long mbThreadId, java.lang.String to,
  219. java.lang.String subject, java.lang.String body,
  220. java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
  221. com.liferay.portal.theme.ThemeDisplay themeDisplay)
  222. throws com.liferay.portal.kernel.exception.PortalException,
  223. com.liferay.portal.kernel.exception.SystemException;
  224. public com.liferay.portlet.messageboards.model.MBMessage addPrivateMessageBranch(
  225. long userId, long parentMBMessageId, java.lang.String body,
  226. java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
  227. com.liferay.portal.theme.ThemeDisplay themeDisplay)
  228. throws com.liferay.portal.kernel.exception.PortalException,
  229. com.liferay.portal.kernel.exception.SystemException;
  230. public void addUserThread(long userId, long mbThreadId,
  231. long topMBMessageId, boolean read, boolean deleted)
  232. throws com.liferay.portal.kernel.exception.PortalException,
  233. com.liferay.portal.kernel.exception.SystemException;
  234. public void deleteUser(long userId)
  235. throws com.liferay.portal.kernel.exception.PortalException,
  236. com.liferay.portal.kernel.exception.SystemException;
  237. public void deleteUserThread(long userId, long mbThreadId)
  238. throws com.liferay.portal.kernel.exception.PortalException,
  239. com.liferay.portal.kernel.exception.SystemException;
  240. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  241. public java.util.List<com.liferay.privatemessaging.model.UserThread> getMBThreadUserThreads(
  242. long mbThreadId)
  243. throws com.liferay.portal.kernel.exception.SystemException;
  244. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  245. public com.liferay.privatemessaging.model.UserThread getUserThread(
  246. long userId, long mbThreadId)
  247. throws com.liferay.portal.kernel.exception.PortalException,
  248. com.liferay.portal.kernel.exception.SystemException;
  249. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  250. public int getUserUserThreadCount(long userId, boolean deleted)
  251. throws com.liferay.portal.kernel.exception.SystemException;
  252. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  253. public int getUserUserThreadCount(long userId, boolean read, boolean deleted)
  254. throws com.liferay.portal.kernel.exception.SystemException;
  255. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  256. public java.util.List<com.liferay.privatemessaging.model.UserThread> getUserUserThreads(
  257. long userId, boolean deleted)
  258. throws com.liferay.portal.kernel.exception.SystemException;
  259. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  260. public java.util.List<com.liferay.privatemessaging.model.UserThread> getUserUserThreads(
  261. long userId, boolean read, boolean deleted)
  262. throws com.liferay.portal.kernel.exception.SystemException;
  263. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  264. public java.util.List<com.liferay.privatemessaging.model.UserThread> getUserUserThreads(
  265. long userId, boolean deleted, int start, int end)
  266. throws com.liferay.portal.kernel.exception.SystemException;
  267. public void markUserThreadAsRead(long userId, long mbThreadId)
  268. throws com.liferay.portal.kernel.exception.PortalException,
  269. com.liferay.portal.kernel.exception.SystemException;
  270. public void markUserThreadAsUnread(long userId, long mbThreadId)
  271. throws com.liferay.portal.kernel.exception.PortalException,
  272. com.liferay.portal.kernel.exception.SystemException;
  273. }