/portal-service/src/com/liferay/portal/service/EmailAddressLocalService.java

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