/portal-service/src/com/liferay/portlet/ratings/service/RatingsStatsLocalService.java

https://github.com/monicali/liferay-portal · Java · 260 lines · 86 code · 25 blank · 149 comment · 0 complexity · f269d7611368e90f4ba42278017a9c2c MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-2012 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.ratings.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 ratings stats 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 RatingsStatsLocalServiceUtil
  30. * @see com.liferay.portlet.ratings.service.base.RatingsStatsLocalServiceBaseImpl
  31. * @see com.liferay.portlet.ratings.service.impl.RatingsStatsLocalServiceImpl
  32. * @generated
  33. */
  34. @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
  35. PortalException.class, SystemException.class})
  36. public interface RatingsStatsLocalService extends PersistedModelLocalService {
  37. /*
  38. * NOTE FOR DEVELOPERS:
  39. *
  40. * Never modify or reference this interface directly. Always use {@link RatingsStatsLocalServiceUtil} to access the ratings stats local service. Add custom service methods to {@link com.liferay.portlet.ratings.service.impl.RatingsStatsLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
  41. */
  42. /**
  43. * Adds the ratings stats to the database. Also notifies the appropriate model listeners.
  44. *
  45. * @param ratingsStats the ratings stats
  46. * @return the ratings stats that was added
  47. * @throws SystemException if a system exception occurred
  48. */
  49. public com.liferay.portlet.ratings.model.RatingsStats addRatingsStats(
  50. com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
  51. throws com.liferay.portal.kernel.exception.SystemException;
  52. /**
  53. * Creates a new ratings stats with the primary key. Does not add the ratings stats to the database.
  54. *
  55. * @param statsId the primary key for the new ratings stats
  56. * @return the new ratings stats
  57. */
  58. public com.liferay.portlet.ratings.model.RatingsStats createRatingsStats(
  59. long statsId);
  60. /**
  61. * Deletes the ratings stats with the primary key from the database. Also notifies the appropriate model listeners.
  62. *
  63. * @param statsId the primary key of the ratings stats
  64. * @throws PortalException if a ratings stats with the primary key could not be found
  65. * @throws SystemException if a system exception occurred
  66. */
  67. public void deleteRatingsStats(long statsId)
  68. throws com.liferay.portal.kernel.exception.PortalException,
  69. com.liferay.portal.kernel.exception.SystemException;
  70. /**
  71. * Deletes the ratings stats from the database. Also notifies the appropriate model listeners.
  72. *
  73. * @param ratingsStats the ratings stats
  74. * @throws SystemException if a system exception occurred
  75. */
  76. public void deleteRatingsStats(
  77. com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
  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.portlet.ratings.model.RatingsStats fetchRatingsStats(
  139. long statsId)
  140. throws com.liferay.portal.kernel.exception.SystemException;
  141. /**
  142. * Returns the ratings stats with the primary key.
  143. *
  144. * @param statsId the primary key of the ratings stats
  145. * @return the ratings stats
  146. * @throws PortalException if a ratings stats 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.portlet.ratings.model.RatingsStats getRatingsStats(
  151. long statsId)
  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 ratings statses.
  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 ratings statses
  167. * @param end the upper bound of the range of ratings statses (not inclusive)
  168. * @return the range of ratings statses
  169. * @throws SystemException if a system exception occurred
  170. */
  171. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  172. public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> getRatingsStatses(
  173. int start, int end)
  174. throws com.liferay.portal.kernel.exception.SystemException;
  175. /**
  176. * Returns the number of ratings statses.
  177. *
  178. * @return the number of ratings statses
  179. * @throws SystemException if a system exception occurred
  180. */
  181. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  182. public int getRatingsStatsesCount()
  183. throws com.liferay.portal.kernel.exception.SystemException;
  184. /**
  185. * Updates the ratings stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  186. *
  187. * @param ratingsStats the ratings stats
  188. * @return the ratings stats that was updated
  189. * @throws SystemException if a system exception occurred
  190. */
  191. public com.liferay.portlet.ratings.model.RatingsStats updateRatingsStats(
  192. com.liferay.portlet.ratings.model.RatingsStats ratingsStats)
  193. throws com.liferay.portal.kernel.exception.SystemException;
  194. /**
  195. * Updates the ratings stats in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
  196. *
  197. * @param ratingsStats the ratings stats
  198. * @param merge whether to merge the ratings stats 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 ratings stats that was updated
  200. * @throws SystemException if a system exception occurred
  201. */
  202. public com.liferay.portlet.ratings.model.RatingsStats updateRatingsStats(
  203. com.liferay.portlet.ratings.model.RatingsStats ratingsStats,
  204. boolean merge)
  205. throws com.liferay.portal.kernel.exception.SystemException;
  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. * Sets the Spring bean ID for this bean.
  214. *
  215. * @param beanIdentifier the Spring bean ID for this bean
  216. */
  217. public void setBeanIdentifier(java.lang.String beanIdentifier);
  218. public com.liferay.portlet.ratings.model.RatingsStats addStats(
  219. long classNameId, long classPK)
  220. throws com.liferay.portal.kernel.exception.SystemException;
  221. public void deleteStats(java.lang.String className, long classPK)
  222. throws com.liferay.portal.kernel.exception.SystemException;
  223. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  224. public com.liferay.portlet.ratings.model.RatingsStats getStats(long statsId)
  225. throws com.liferay.portal.kernel.exception.PortalException,
  226. com.liferay.portal.kernel.exception.SystemException;
  227. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  228. public java.util.List<com.liferay.portlet.ratings.model.RatingsStats> getStats(
  229. java.lang.String className, java.util.List<java.lang.Long> classPKs)
  230. throws com.liferay.portal.kernel.exception.SystemException;
  231. @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
  232. public com.liferay.portlet.ratings.model.RatingsStats getStats(
  233. java.lang.String className, long classPK)
  234. throws com.liferay.portal.kernel.exception.SystemException;
  235. }