/portal-service/src/com/liferay/portlet/announcements/service/AnnouncementsFlagLocalService.java

https://github.com/spreddy/liferay-portal · Java · 255 lines · 82 code · 24 blank · 149 comment · 0 complexity · dee851c2a0337d12056973842d88ec76 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.portlet.announcements.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 announcements flag 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 AnnouncementsFlagLocalServiceUtil
  30. * @see com.liferay.portlet.announcements.service.base.AnnouncementsFlagLocalServiceBaseImpl
  31. * @see com.liferay.portlet.announcements.service.impl.AnnouncementsFlagLocalServiceImpl
  32. * @generated
  33. */
  34. @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
  35. PortalException.class, SystemException.class})
  36. public interface AnnouncementsFlagLocalService
  37. extends PersistedModelLocalService {
  38. /*
  39. * NOTE FOR DEVELOPERS:
  40. *
  41. * Never modify or reference this interface directly. Always use {@link AnnouncementsFlagLocalServiceUtil} to access the announcements flag local service. Add custom service methods to {@link com.liferay.portlet.announcements.service.impl.AnnouncementsFlagLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
  42. */
  43. /**
  44. * Adds the announcements flag to the database. Also notifies the appropriate model listeners.
  45. *
  46. * @param announcementsFlag the announcements flag
  47. * @return the announcements flag that was added
  48. * @throws SystemException if a system exception occurred
  49. */
  50. public com.liferay.portlet.announcements.model.AnnouncementsFlag addAnnouncementsFlag(
  51. com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag)
  52. throws com.liferay.portal.kernel.exception.SystemException;
  53. /**
  54. * Creates a new announcements flag with the primary key. Does not add the announcements flag to the database.
  55. *
  56. * @param flagId the primary key for the new announcements flag
  57. * @return the new announcements flag
  58. */
  59. public com.liferay.portlet.announcements.model.AnnouncementsFlag createAnnouncementsFlag(
  60. long flagId);
  61. /**
  62. * Deletes the announcements flag with the primary key from the database. Also notifies the appropriate model listeners.
  63. *
  64. * @param flagId the primary key of the announcements flag
  65. * @throws PortalException if a announcements flag with the primary key could not be found
  66. * @throws SystemException if a system exception occurred
  67. */
  68. public void deleteAnnouncementsFlag(long flagId)
  69. throws com.liferay.portal.kernel.exception.PortalException,
  70. com.liferay.portal.kernel.exception.SystemException;
  71. /**
  72. * Deletes the announcements flag from the database. Also notifies the appropriate model listeners.
  73. *
  74. * @param announcementsFlag the announcements flag
  75. * @throws SystemException if a system exception occurred
  76. */
  77. public void deleteAnnouncementsFlag(
  78. com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag)
  79. throws com.liferay.portal.kernel.exception.SystemException;
  80. /**
  81. * Performs a dynamic query on the database and returns the matching rows.
  82. *
  83. * @param dynamicQuery the dynamic query
  84. * @return the matching rows
  85. * @throws SystemException if a system exception occurred
  86. */
  87. @SuppressWarnings("rawtypes")
  88. public java.util.List dynamicQuery(
  89. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
  90. throws com.liferay.portal.kernel.exception.SystemException;
  91. /**
  92. * Performs a dynamic query on the database and returns a range of the matching rows.
  93. *
  94. * <p>
  95. * 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.
  96. * </p>
  97. *
  98. * @param dynamicQuery the dynamic query
  99. * @param start the lower bound of the range of model instances
  100. * @param end the upper bound of the range of model instances (not inclusive)
  101. * @return the range of matching rows
  102. * @throws SystemException if a system exception occurred
  103. */
  104. @SuppressWarnings("rawtypes")
  105. public java.util.List dynamicQuery(
  106. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
  107. int end) throws com.liferay.portal.kernel.exception.SystemException;
  108. /**
  109. * Performs a dynamic query on the database and returns an ordered range of the matching rows.
  110. *
  111. * <p>
  112. * 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.
  113. * </p>
  114. *
  115. * @param dynamicQuery the dynamic query
  116. * @param start the lower bound of the range of model instances
  117. * @param end the upper bound of the range of model instances (not inclusive)
  118. * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
  119. * @return the ordered range of matching rows
  120. * @throws SystemException if a system exception occurred
  121. */
  122. @SuppressWarnings("rawtypes")
  123. public java.util.List dynamicQuery(
  124. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
  125. int end,
  126. com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
  127. throws com.liferay.portal.kernel.exception.SystemException;
  128. /**
  129. * Returns the number of rows that match the dynamic query.
  130. *
  131. * @param dynamicQuery the dynamic query
  132. * @return the number of rows that match the dynamic query
  133. * @throws SystemException if a system exception occurred
  134. */
  135. public long dynamicQueryCount(
  136. com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
  137. throws com.liferay.portal.kernel.exception.SystemException;
  138. /**
  139. * Returns the announcements flag with the primary key.
  140. *
  141. * @param flagId the primary key of the announcements flag
  142. * @return the announcements flag
  143. * @throws PortalException if a announcements flag with the primary key could not be found
  144. * @throws SystemException if a system exception occurred
  145. */
  146. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  147. public com.liferay.portlet.announcements.model.AnnouncementsFlag getAnnouncementsFlag(
  148. long flagId)
  149. throws com.liferay.portal.kernel.exception.PortalException,
  150. com.liferay.portal.kernel.exception.SystemException;
  151. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  152. public com.liferay.portal.model.PersistedModel getPersistedModel(
  153. java.io.Serializable primaryKeyObj)
  154. throws com.liferay.portal.kernel.exception.PortalException,
  155. com.liferay.portal.kernel.exception.SystemException;
  156. /**
  157. * Returns a range of all the announcements flags.
  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.
  161. * </p>
  162. *
  163. * @param start the lower bound of the range of announcements flags
  164. * @param end the upper bound of the range of announcements flags (not inclusive)
  165. * @return the range of announcements flags
  166. * @throws SystemException if a system exception occurred
  167. */
  168. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  169. public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsFlag> getAnnouncementsFlags(
  170. int start, int end)
  171. throws com.liferay.portal.kernel.exception.SystemException;
  172. /**
  173. * Returns the number of announcements flags.
  174. *
  175. * @return the number of announcements flags
  176. * @throws SystemException if a system exception occurred
  177. */
  178. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  179. public int getAnnouncementsFlagsCount()
  180. throws com.liferay.portal.kernel.exception.SystemException;
  181. /**
  182. * Updates the announcements flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  183. *
  184. * @param announcementsFlag the announcements flag
  185. * @return the announcements flag that was updated
  186. * @throws SystemException if a system exception occurred
  187. */
  188. public com.liferay.portlet.announcements.model.AnnouncementsFlag updateAnnouncementsFlag(
  189. com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag)
  190. throws com.liferay.portal.kernel.exception.SystemException;
  191. /**
  192. * Updates the announcements flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  193. *
  194. * @param announcementsFlag the announcements flag
  195. * @param merge whether to merge the announcements flag 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.
  196. * @return the announcements flag that was updated
  197. * @throws SystemException if a system exception occurred
  198. */
  199. public com.liferay.portlet.announcements.model.AnnouncementsFlag updateAnnouncementsFlag(
  200. com.liferay.portlet.announcements.model.AnnouncementsFlag announcementsFlag,
  201. boolean merge)
  202. throws com.liferay.portal.kernel.exception.SystemException;
  203. /**
  204. * Returns the Spring bean ID for this bean.
  205. *
  206. * @return the Spring bean ID for this bean
  207. */
  208. public java.lang.String getBeanIdentifier();
  209. /**
  210. * Sets the Spring bean ID for this bean.
  211. *
  212. * @param beanIdentifier the Spring bean ID for this bean
  213. */
  214. public void setBeanIdentifier(java.lang.String beanIdentifier);
  215. public com.liferay.portlet.announcements.model.AnnouncementsFlag addFlag(
  216. long userId, long entryId, int value)
  217. throws com.liferay.portal.kernel.exception.SystemException;
  218. public void deleteFlag(
  219. com.liferay.portlet.announcements.model.AnnouncementsFlag flag)
  220. throws com.liferay.portal.kernel.exception.SystemException;
  221. public void deleteFlag(long flagId)
  222. throws com.liferay.portal.kernel.exception.PortalException,
  223. com.liferay.portal.kernel.exception.SystemException;
  224. public void deleteFlags(long entryId)
  225. throws com.liferay.portal.kernel.exception.SystemException;
  226. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  227. public com.liferay.portlet.announcements.model.AnnouncementsFlag getFlag(
  228. long userId, long entryId, int value)
  229. throws com.liferay.portal.kernel.exception.PortalException,
  230. com.liferay.portal.kernel.exception.SystemException;
  231. }